Interactive fzf-powered terminal UI for browsing, previewing, installing, and removing Termux packages β no more typing repetitive pkg install commands.
β‘ One keystroke. Instant preview. Persistent session. Search, install, remove, and export packages without leaving your terminal.
Quick Install β’ Usage β’ Configuration β’ Contributing
β Star this repo if you find it useful! It helps others discover it.
Problem with pkg |
How pkgs solves it |
|---|---|
| Typing full package names every time | Fuzzy search matches partial names instantly |
| No preview of what you're installing | Live pane shows version, size, deps, and description |
| Have to run install/remove separately for each package | Tab to select multiple, or use /install <query> for bulk ops |
| Session closes after every install | Persistent loop β keep managing packages until you press Esc |
| No way to audit installed packages | Color-coded [I] / [-] tags at a glance |
- Termux power users who manage dozens of packages regularly
- Android developers setting up fresh Termux environments
- Automation lovers who want to export install scripts in one click
- New Termux users overwhelmed by typing
pkg installrepeatedly
- Overview
- Features
- Requirements
- Quick Install
- Manual Installation
- Usage
- Key Bindings
- How It Works
- Configuration
- Troubleshooting
- FAQ
- Uninstallation
- Contributing
- License
- Disclaimer
- Acknowledgments
Termux TUI Package Store is a terminal UI for managing packages on Termux. It wraps pkg with an interactive fuzzy-finder that lets you search, preview, install, and remove packages β all without leaving a single screen.
The tool adapts to your terminal size, color-codes installed vs. available packages, and shows live metadata previews (version, size, dependencies, description) for every package you highlight. Type /install, /remove, /export, or /upgrade to run bulk operations directly from the search box.
| Feature | Description |
|---|---|
| π Fuzzy Search | Filter hundreds of packages instantly as you type |
| π Live Previews | See version, installed/download size, dependencies, and description for any package |
| π Persistent Session | Store stays open after install/remove β keep going until you press Esc |
| π Smart Layout | Automatically switches between landscape (side-by-side) and portrait (stacked) preview |
| π¨ Color-Coded Status | Installed packages tagged [I], available packages tagged [-] |
| β‘ Slash Commands | Type /install <query>, /remove <query>, /export <query>, or /upgrade in the search box |
| π‘οΈ Prerequisite Checks | Validates fzf, pkg, apt-cache, and dpkg-query on startup |
| β‘ Zero Config | No config files needed β runs as a single script at $PREFIX/bin/pkgs |
- Termux (Android 7+) β Get it from F-Droid or GitHub
- Zsh β the script runs on zsh
- Runtime dependencies:
| Package | Purpose | Required |
|---|---|---|
fzf |
Fuzzy-finder interface | Yes |
gawk |
Data processing (package list generation) | Yes |
grep, sed |
Text processing in previews | Yes |
ncurses |
Terminal handling (tput) |
Yes |
The installer also pulls curl, coreutils (numfmt), cowsay, and figlet for the install banner β these are not needed at runtime.
Note: Tested on Termux v0.118.x with fzf 0.53.0. Older versions may work but are not guaranteed.
zsh <(curl -fsSL https://raw.githubusercontent.com/Mark44928/Termux-TUI-Package-Store/main/install.sh)Note: If
zshis not your current shell, runbashinstead ofzshin the command above. The installer will set everything up regardless.
-
Install dependencies:
pkg update && pkg upgrade pkg install zsh fzf cowsay coreutils gawk grep sed ncurses curl figlet -
Download the script and make it executable:
curl -fsSL https://raw.githubusercontent.com/Mark44928/Termux-TUI-Package-Store/main/pkgs_core.zsh -o $PREFIX/bin/pkgs chmod +x $PREFIX/bin/pkgs
Note: The source file is
pkgs_core.zshin this repo, but it is installed as$PREFIX/bin/pkgson your device. Edit that file to customize behavior.
-
Run it:
pkgs
Launch the store by typing:
pkgsType to filter packages. The list updates in real time. Press Enter on any package to install it (if not installed) or remove it (if installed). After the operation completes, the store re-opens automatically. Press Esc or Ctrl+C to exit.
You can also pre-filter by passing a search term:
pkgs pythonThis opens the store with "python" already typed in the search box.
Type these directly in the search box:
| Command | Description |
|---|---|
/upgrade |
Upgrade all installed packages |
/install <query> |
Install all packages matching <query> |
/remove <query> |
Remove all packages matching <query> |
/export <query> |
Export matching packages to a runnable shell script in the current directory |
Examples:
/install pythonβ installs all packages with "python" in the name/remove vimβ removes all matching packages/export gitβ saves matching packages topkg-install-YYYYMMDD-HHMMSS.sh
| Key | Action |
|---|---|
Enter |
Install or remove the selected package (prompts y/N confirmation per package) |
Tab |
Select multiple packages |
? |
Toggle the preview pane |
Esc or Ctrl+C |
Exit the store |
| Typing | Search/filter packages in real time |
-
Layout Detection
The tool measures your terminal withtputand decides whether to show the preview alongside the package list (wide terminals) or below it (narrow terminals). -
Package Discovery
Anawk(gawk) script cross-references installed packages fromdpkg-queryagainst every available package fromapt-cache search ".*". Each line is tagged[I](installed) or[-](not installed). -
Live Previews
When you highlight a package,fzfrunsapt-cache showin the background and displays version, section, size, top dependencies, and the description. -
Slash Commands
Typing/upgrade,/install <query>,/remove <query>, or/export <query>in the search box triggers bulk operations instead of package selection. Packages are validated againstapt-cachebefore any action runs. -
Action & Loop
Pressing Enter triggers a per-packagey/Nconfirmation, thenpkg installorpkg remove. When the command finishes, the store refreshes the package list and re-opens β no need to relaunch.
Note:
$PREFIXis Termux's installation prefix, typically/data/data/com.termux/files/usr.
The entire script lives in a single file at $PREFIX/bin/pkgs. Edit it directly to customize behavior.
| Setting | Default | Description |
|---|---|---|
PORTRAIT_SPLIT |
down:48%:wrap |
Preview position/height in portrait mode |
LANDSCAPE_SPLIT |
right:40%:wrap |
Preview position/width in landscape mode |
Examples:
PORTRAIT_SPLIT="down:60%:wrap" # taller preview in portrait
LANDSCAPE_SPLIT="left:40%:wrap" # preview on the left in landscapeThe --color flag in _pkgs_build_fzf_args uses 256-color ANSI codes. Customize any element:
--color='fg:250,bg:-1,hl:063,fg+:231,bg+:235,hl+:063,info:144,prompt:161,pointer:161,marker:118,spinner:135,header:087'See the fzf documentation for available color slots.
| Variable | Default | Description |
|---|---|---|
C_INST_PREFIX |
[I] (cyan) |
Tag for installed packages |
C_NOT_INST_PREFIX |
[-] (dim white) |
Tag for not-installed packages |
C_PKG_NAME |
Green | Package name in list |
C_PKG_DESC |
Dim white | Description in list |
C_MSG_INSTALL |
Green | Install success messages |
C_MSG_REMOVE |
Red | Remove/failure messages |
C_MSG_INFO |
Yellow | Info/prompts |
| Variable | Default | Description |
|---|---|---|
PKG_MGR |
pkg |
Package manager command (pkg or apt) |
BORDER_STYLE |
rounded |
fzf border style (rounded, sharp, double, bold) |
- Reinstall instead of install: Change
${PKG_MGR} install "$pkg_name"to${PKG_MGR} reinstall "$pkg_name". - Log every action: Add
echo "$(date): $action $pkg_name" >> ~/.pkgs_historyinside the loop. - Exclude library packages: Append
| grep -vE '^(lib|python-|perl-|ruby-)'to the_pkgs_generate_listpipeline. - Hide already-installed packages: Pipe through
grep -v '\[I\]'after the awk script. - Floating overlay: Add
--height=80%toFZF_ARGSfor a non-fullscreen view. - Hide preview by default: Change
--preview-window="$PREVIEW_LAYOUT"to--preview-window="$PREVIEW_LAYOUT:hidden". Press?to toggle. - Keep search query across operations: Store the query in a variable before fzf exits and pass it back on re-entry.
| Problem | Likely Cause | Fix |
|---|---|---|
pkgs: command not found |
Script not in PATH | Run which pkgs β should show $PREFIX/bin/pkgs. Re-run install.sh if missing. |
zsh: no such file or directory |
Shebang path wrong | Run head -1 $(which pkgs) β should show #!/data/data/com.termux/files/usr/bin/zsh. Reinstall if corrupted. |
| Empty package list | apt-cache needs updating |
Run pkg update and try again. |
fzf: command not found |
Dependency missing | Run pkg install fzf. |
| Colors look wrong | Terminal lacks 256-color support | Simplify the --color flag to basic 16-color ANSI codes. |
| Preview shows nothing | apt-cache show failed for that package |
Try apt-cache show <package> manually to verify. |
Q: Why does the store re-open after I install something?
A: The tool loops back to the package list so you can manage multiple packages in one session. Press Esc or Ctrl+C to quit.
Q: Can I use apt instead of pkg?
A: Yes. Change PKG_MGR="pkg" to PKG_MGR="apt" in the configuration section.
Q: Does this work outside Termux?
A: No. The script depends on Termux-specific paths ($PREFIX) and package management tools (pkg, apt-cache, dpkg-query).
Q: How do I update to the latest version?
A: Re-run the one-liner install command. It overwrites $PREFIX/bin/pkgs with the latest version.
Q: Can I contribute?
A: Absolutely β see Contributing.
rm $PREFIX/bin/pkgsThat's it. No config files, no sourced shell lines, no lingering data.
Contributions are welcome! Whether it's a bug fix, a new feature, or improved documentation:
- Fork the repository.
- Create a feature branch (
git checkout -b feat/my-change). - Make your changes.
- Run
shellcheck install.shif you modified the installer. (Note:shellcheckdoes not support zsh syntax natively; test zsh scripts manually.) - Commit with a descriptive message (e.g.,
feat: add --dry-run flag). - Push and open a pull request.
Please follow the Contributor Covenant code of conduct. Be kind, be respectful, and keep discussions constructive.
This project is licensed under the MIT License. See LICENSE for details.
This tool runs pkg install and pkg remove commands that modify your Termux environment. Always review package names before confirming installations. The authors are not responsible for any system damage resulting from misuse.
- junegunn/fzf β the incredible fuzzy-finder that makes this tool possible
- The Termux community for maintaining an excellent Android terminal environment
- Everyone who has submitted issues, suggestions, or pull requests
If Termux TUI Package Store makes your Termux life easier, consider:
| β | Star the repo β it helps others discover the project |
| π | Report bugs β open an issue |
| π§ | Contribute β submit a pull request |
| π’ | Share it β tell your Termux-using friends |
| π¬ | Give feedback β ideas and suggestions are always welcome |
Every star, issue, and PR makes this project better. Thank you!
- NoNameOS - Pure C++ hobbyist OS simulation
- Anti-Bloatware List - Debloat rooted Android TV sticks
Made with β€οΈ for the Termux community
