A declarative mise bootstrap project for termux
Find a file
2026-10-03 17:51:18 +02:00
dotfiles fix: fix deserialization error in zielij config 2026-10-03 17:51:18 +02:00
mise.toml fix(termux): fix install issues with variable PACKAGES 2026-10-03 17:36:37 +02:00
README.md feat(termux): add hellix, yazi, archlinux-proot and termux-core with 2026-10-03 17:20:02 +02:00

Termux bootstrap

A declarative mise bootstrap project for an Android smartphone running Termux. This folder is the root of its own git repository: mise bootstrap --from <git_url> clones it and runs the bootstrap from the clone.

It provides:

  • zsh as the login shell, with mise activation (eval "$(mise activate zsh)").
  • Starship prompt using the Catppuccin Powerline Macchiato palette.
  • JetBrains Mono Nerd Font as the Termux terminal font.
  • Zellij terminal multiplexer, themed Catppuccin Macchiato, with a main session auto-attached.
  • Helix (hx) as the default $EDITOR, themed Catppuccin Macchiato, using Yazi as its file picker and the Termux clipboard.
  • Yazi file manager previewing images through chafa and opening files in the underlying Android apps via termux-open.
  • Lazygit TUI git client, themed Catppuccin Macchiato, opening files in Helix.
  • proot / proot-distro with an Arch Linux container assembled from the archlinux/archlinux:latest OCI image (only if not already present).
  • A ~/shared directory shared between Termux and the Arch container: the same folder is reachable at ~/shared on both sides.
  • core-termux with its ai module limited to the Kilo Code CLI (kilo / kilocode), installed through core-termux's own installer.

Every tool shares the Catppuccin Macchiato flavor and the JetBrains Mono Nerd Font.

Everything is declared in mise.toml; the config files copied into place live under dotfiles/.

Prerequisites (Termux side)

  1. Install the Termux app (F-Droid or GitHub build recommended).

  2. Update the package index and install mise and git:

    pkg update -y
    pkg install -y mise git
    
    • mise runs the bootstrap.
    • git is required by mise bootstrap --from to clone this repository.
  3. An internet connection (for pkg, the JetBrains Mono Nerd Font download from GitHub releases, and the archlinux/archlinux:latest image pull).

  4. Optional: install the Termux:API app for clipboard support (Zellij copy and the Helix clipboard provider). The matching termux-api package is installed best-effort by the bootstrap.

No [tools] are used: mise-managed tool installs do not work on Termux (bionic libc / TLS alignment), so all packages come from pkg/apt.

Bootstrap the configuration

Preview what will happen:

mise bootstrap --from <git_url> --dry-run

Apply it (the <git_url> is the repository that contains this folder at its root):

mise bootstrap --from <git_url> --yes

--from clones into ~/.local/share/mise/bootstrap-repo and runs the bootstrap from that clone, so the relative dotfiles/ sources resolve inside the checkout. Re-run with --update to refresh the clone first:

mise bootstrap --from <git_url> --update --yes

Then start a new shell (or restart the Termux app) to pick up zsh, Starship, and Zellij, and verify the result:

mise run doctor

From a local checkout instead

cd /path/to/this/repo
mise trust
mise bootstrap --yes

What the bootstrap does

Phase Action
pre-packages hook pkg update + pkg install (zsh, starship, zellij, helix, yazi, chafa, lazygit, proot, proot-distro, git, curl, tar, xz-utils, unzip, less, nano, sed, coreutils, termux-tools, termux-api), then chsh -s zsh.
pre-dotfiles hook Backs up pre-existing, unmanaged target files before they are overwritten.
dotfiles Copies dotfiles/** into ~/.zshrc, ~/.config/starship.toml, ~/.config/zellij/, ~/.config/helix/config.toml, ~/.config/yazi/, ~/.config/lazygit/config.yml, and ~/.termux/termux.properties.
proot task If absent, pulls archlinux/archlinux:latest and installs it as the archlinux proot container.
shared task Creates ~/shared and links it to ~/shared inside the archlinux container (idempotent).
core-termux task Installs the core-termux framework (official installer) and its ai module limited to kilocode-cli, skipped when already present.
bootstrap task Runs shared and core-termux, then downloads the JetBrains Mono Nerd Font to ~/.termux/font.ttf and reloads Termux settings.

All hooks and tasks abort unless they run inside Termux (TERMUX_VERSION set).

Notes

  • mise bootstrap --from is the correct mode for this repository: it is a bootstrap project (mise.toml + source files). mise bootstrap --adopt is for a repository whose root is a global mise configuration (config.toml, conf.d/, tasks/). To use --adopt, rename mise.toml to config.toml first.
  • Dotfiles use copy mode: applying overwrites the target files. The pre-dotfiles hook saves a .bak.<timestamp> copy of any unmanaged file it replaces. Files carrying the termux-bootstrap marker are skipped.
  • Zellij clipboard copy needs the Termux:API app; without it, copy fails harmlessly. Copy pipes the selection to termux-clipboard-set; pasting uses the Termux terminal's bracketed paste, which reads the Android clipboard. Helix uses the same device clipboard through its built-in termux provider (termux-clipboard-get / termux-clipboard-set).
  • Zellij's default mode keys (Ctrl-b/h/n/o/p/s/t) collide with Helix's Ctrl-based chords, so the Zellij config unbinds them and re-binds the modes on Alt: Alt-y (tmux), Alt-w (pane), Alt-m (move), Alt-r (resize), Alt-v (scroll), Alt-q (session), Alt-t (tab). Pane focus and resize movement stay on the default Alt h/j/k/l and Alt =/+/-.
  • Conflicts left (all pre-existing Zellij defaults, not the movement keys): Zellij claims Alt-i / Alt-o (MoveTab), Alt-p (pane group) and Alt-n (new pane), which shadow Helix's tree-selection keys Alt-i, Alt-o, Alt-p and Alt-n. The remap itself uses only Alt keys Helix leaves free (y/w/m/r/v/q/t), and the pane-focus Alt h/j/k/l are free in Helix too.
  • Helix opens Yazi with Ctrl-y (file picker); Yazi opens text in $EDITOR (hx) and images/other files through termux-open (the Android app chooser). Image preview inside Yazi uses chafa.
  • ~/shared is the shared directory: Termux's ~/shared and the container's root ~/shared are the same folder. This relies on proot-distro's default bindings (it mounts the Termux app data dir, and thus $HOME, at its original path) plus a symlink at /root/shared in the rootfs. It therefore does not work with proot-distro login --isolated/--minimal; re-run mise run shared if the container is reinstalled.
  • core-termux is installed with its own installer and kept in ~/.local/share/core-termux; only the ai module's kilocode-cli is installed. That installer prompts for a method, so the bootstrap feeds /dev/null to its picker, selecting the first (recommended) option: the glibc build of kilo. Logs land in ~/.cache/core-termux/; update the framework later with core update core.
  • Do not add a [tools] section: [settings] enable_tools = [] disables tool resolution so an inherited [tools] cannot trigger a broken Android install.