Skip to content

itsmuaaz/termux-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

107 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Termux Bootstrap (tb) v3.0.4

A modular, safe, and mobile-optimized bootstrap script and CLI manager for your Termux environment. Turn a fresh Termux install into a powerful development environment in minutes.

Now powered by the tb command-line manager.

📜 View Changelog

Setup Menu TB Manager Guide
Setup TB Menu

Features

🚀 Core Utilities

  • Git: Distributed version control.
  • Node.js: JavaScript runtime (LTS).
  • Python: Popular programming language.

🐠 Fish Shell (Optional)

  • Interactive Shell: Friendly shell with auto-completions and syntax highlighting.
  • Aliases: Pre-configured shortcuts for mobile efficiency (only available if Fish is installed).

📦 Community Extras (New!)

  • Media Suite: Installs yt-dlp (YouTube) and spotDL (Spotify) with FFmpeg.
    • Optimized: Automatically configures downloads to save to /sdcard/Download/Termux and /sdcard/Music.
    • Note: spotDL installation involves compiling heavy dependencies. It may take 5-15 minutes. A timeout protection is in place to prevent infinite hangs.
  • Termux Whisper: Installs termux-whisper for offline, privacy-focused AI speech transcription on your phone.

💻 Session & Workspace Management (v3.0)

Termux Bootstrap now acts as a full workspace manager, decoupling your sessions from your interface.

  • Persistent Workspaces: Start a named session locally (tb session my-project) and it stays alive in the background, even if you close the terminal app.
  • Web Portal: Instantly expose any session to your browser with tb web my-project. Work from your laptop on a big screen, then pick up exactly where you left off on your phone.
  • Multi-Project: Run multiple isolated environments simultaneously. tb web automatically finds free ports (8080, 8081, etc.).
  • Smart Utilities:
    • Downloads: Type dl <file> to generate a direct download link.
    • Mouse Toggle: Press F1 (VolumeUp+1) to toggle mouse. Double-Tap the Status Bar to quickly disable mouse (for keyboard access).
    • Clipboard: Native clipboard sync via OSC 52.

📱 Mobile Optimizations (Portrait Mode)

  • Starship (Portrait Config): Optional 2-line prompt optimized for narrow phone screens.
  • Micro Editor: Touch-friendly text editor with mouse/touch support enabled by default.
  • Narrow Aliases: Shortcuts like gl (git log graph) designed to fit on phone screens.
  • Clipboard Sync: copy and paste commands to sync with Android clipboard.

🎨 Modern UI ("The Ricing")

  • Lsd: The next gen ls command with colors and icons.
  • Bat: A cat clone with syntax highlighting and Git integration.
  • Zoxide: A smarter cd command that remembers your frequent directories.
  • Fzf: Command-line fuzzy finder.
  • Glow: Render Markdown on the CLI (used for Gemini outputs).
  • Nerd Fonts: Automatically installs JetBrains Mono Nerd Font (No Ligatures).
    • Why No Ligatures? Prevents rendering freezes/input lag on some Android devices while still providing icons.

🛡️ Safety & Config

  • Idempotent: Can be run multiple times without duplicating configurations.
  • Backups: Automatically backs up files (config.fish, fonts) before modifying them.
  • Interactive Menu: Select your components at the start ("Set & Forget").
  • Smart Notifications: Vibrates and sends a Toast notification when setup is complete.
  • Uninstaller: Includes uninstall.sh to revert changes and restore backups.

Installation

Install QR Code

Option 1: One-Liner (Recommended)

Requires curl.

pkg install curl -y
curl -sL https://raw.githubusercontent.com/itsmuaaz/termux-bootstrap/main/setup.sh | bash

Option 2: Clone and Run

pkg install git -y
git clone https://github.com/itsmuaaz/termux-bootstrap.git
cd termux-bootstrap
chmod +x setup.sh
./setup.sh

Silent Mode (No Prompts)

Ideal for automated setups.

./setup.sh -y

Uninstalling

To revert changes, run the uninstall.sh script included in the repository:

cd termux-bootstrap
./uninstall.sh

This script will:

  • Remove injected configurations from config.fish.
  • Restore backed-up configuration files and fonts (if found).
  • Offer to uninstall installed packages and tools.
  • Revert your default shell to Bash.

Shortcuts & Aliases

To make mobile usage easier, the following shortcuts are included. Type tb in your terminal to see this list anytime.

Alias Command Description
tb (Wrapper) Display help & manage environment
tb update ... Full System Update (System + Scripts)
tb sync ... Sync Bootstrap scripts with GitHub only
tb web ... Start Web Viewer ([name])
tb session ... Start Local Session ([name])
tb list tmux ls List active sessions
dl python... Serve file for download
video yt-dlp ... Download video to /sdcard/Download/Termux
music spotdl ... Smart download (Lyrics, LRC, Metadata)
whisper termux-whisper Launch the AI Transcriber
upgrade-all (Deprecated) Alias for tb update
open termux-open Open file in Android app
serve python... Start web server in current dir
copy termux-clipboard-set Pipe text to Android clipboard
paste termux-clipboard-get Paste from Android clipboard
gl git log --oneline... Narrow git log for phones
up pkg update && upgrade Update system packages
in pkg install Install package(s)
c clear Clear screen
.. cd .. Go up one directory

Note: For copy/paste to work, you must have the Termux:API app installed on your Android device.

Post-Install Guide

  1. Restart Termux to load the new settings.
  2. Configure Gemini:
    • Get a free API Key from Google AI Studio.
    • Run gemini configure and paste your key.
    • Test it: ask "Hello"
  3. Try the Extras:
    • video "https://youtube.com/watch?v=..."
    • music "https://open.spotify.com/track/..."

Credits

About

Modular, safe, and mobile-optimized Termux bootstrap. Features Fish, Gemini AI, Micro editor, and modern CLI tools with portrait mode support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages