Installation & Updates
Supported platforms
Prebuilt release binaries are published for:
| OS | Architecture | Release archive | Baseline requirement |
|---|---|---|---|
| macOS | Apple Silicon (arm64 / aarch64) |
tuse_darwin_arm64.tar.gz |
macOS 11+ |
| macOS | Intel (x86_64 / amd64) |
tuse_darwin_amd64.tar.gz |
macOS 11+ |
| Linux | x86_64 / amd64 |
tuse_linux_amd64.tar.gz |
glibc 2.35+ |
| Linux | aarch64 / arm64 |
tuse_linux_arm64.tar.gz |
glibc 2.35+ |
Each archive contains a single tuse binary. Every GitHub release also publishes checksums.txt with SHA-256 checksums for all archives.
Install with the shell script
curl -fsSL https://raw.githubusercontent.com/ethanhamilthon/tuse/main/release/install.sh | sh
- Requirements: POSIX
sh,uname,mktemp,curl,grep,cut,tr,link,sha256sumorshasum,tar,mkdir, andinstall. - Stage 1 (binary install first):
- Platform detection: Maps
uname -s(Darwin->darwin,Linux->linux) anduname -m(arm64/aarch64->arm64,x86_64/amd64->amd64). Exits 1 on unsupported platforms. - Download URL precedence:
TUSE_RELEASE_URL(if non-empty) — takes precedence overTUSE_VERSION.TUSE_VERSION(if non-empty, optional leadingvstripped) ->https://github.com/ethanhamilthon/tuse/releases/download/v<VERSION>.- Default ->
https://github.com/ethanhamilthon/tuse/releases/latest/download.
- Verification and placement: Downloads
tuse_<os>_<arch>.tar.gzandchecksums.txtinto a temporary directory (cleaned up on exit), verifies the archive's SHA-256 digest (aborting on missing entry or mismatch before touching the destination), extractstuse, createsTUSE_BIN_DIR(default$HOME/.local/bin) if needed, installs with mode0755, verifies"$bin_dir/tuse" versionsucceeds before printingInstalled <version> to <bin_dir>/tuse, and printsAdd <bin_dir> to your PATH.whenbin_diris absent fromPATH. - If any step in Stage 1 fails (including the installed binary's
versioncheck), the installer exits non-zero immediately without prompting or creating~/.config/tuse/.
- Platform detection: Maps
- Stage 2 (first-run setup gating):
- Preserve existing global configs: If
$HOME/.config/tuse.luaor$HOME/.config/tuse/init.luaalready exists (regular file, directory, or symlink, including dangling symlinks), printsKeeping existing config: <path>and exits 0 without prompting or modifying any file. - Non-interactive binary-only path: Skips prompts and creates no config file when
--no-setupis passed (for examplecurl -fsSL ... | sh -s -- --no-setup), whenTUSE_NO_SETUPorCIis set to a non-empty value other than0orfalse, or when neither stdin is a TTY nor/dev/ttyis readable. - Binary capability probe: Before prompting, runs
HOME=<empty_temp_dir> "$bin_dir/tuse" models --config <temp_probe>offline with{ plugins = { { "tuse/default", opts = { theme = false, subs = false } } } }. IsolatingHOMEprevents older binaries from matching or executing an unrelated~/.tuse/plugins/tuse/defaultcheckout during install. On binaries that do not embed"tuse/default", printsInstalled tuse does not include the bundled default plugin; skipping first-run setup.and exits 0 without creating an incompatible config.
- Preserve existing global configs: If
- Stage 3 & 4 (interactive first-run setup & atomic config write):
- Reads prompt answers from stdin when stdin is a TTY, or from
/dev/ttywhen piped (curl ... | sh). - Prompts to enable the bundled
"tuse/default"plugin parts:theme(defaultY) andsubs(CLIProxyAPI wrapper, defaultN). Selectingsubsonly writes its plugin entry; the installer never installs or starts CLIProxyAPI or triggers logins. - On EOF during prompting, prints
Skipped first-run setup.and exits 0 with the binary intact and no config created; onSIGINT, cleans up temporary files and exits 130. - Re-checks for existing global configs and publishes
$HOME/.config/tuse/init.luaatomically without clobbering using exact-destinationlink(never writing into a raced directory or symlink-to-directory, and failing closed with a non-zero exit if atomic publication is unavailable): writesreturn {}if both options were skipped, or{ plugins = { { "tuse/default", opts = { theme = <bool>, subs = <bool> } } } }with both booleans explicit when one or both were enabled. PrintsCreated <HOME>/.config/tuse/init.luaand concise next steps.
- Reads prompt answers from stdin when stdin is a TTY, or from
See env.md for environment variable details.
Build from source
Requires the Rust toolchain pinned in rust-toolchain.toml (Rust edition 2024):
- From GitHub:
cargo install --locked --git https://github.com/ethanhamilthon/tuse tuse - From a local checkout:
make install(builds--locked --release -p tuseand installs intoBIN_DIR, defaulting to$HOME/.local/bin, with mode0755).
Updating (tuse update)
Unlike the shell installer, tuse update performs downloading, SHA-256 verification, and gzip/tar extraction entirely in-process (requiring no external curl, tar, or shasum tools). It replaces the currently running executable in place without touching ~/.tuse/tuse.db or any Lua config files.
- Determines the base URL from
TUSE_RELEASE_URL(if non-empty) orhttps://github.com/ethanhamilthon/tuse/releases/latest/download.TUSE_VERSIONandTUSE_BIN_DIRare not read bytuse update. - Detects the current OS and CPU (
darwin/linux,arm64/amd64), printsDownloading <asset>, and downloadstuse_<os>_<arch>.tar.gzandchecksums.txt. - Verifies the SHA-256 checksum against
checksums.txtand unpackstuseinto a temporary directory (cleaned up afterward). - Copies the unpacked binary to a sibling staging file next to the current executable, attempts best-effort
0755permissions on Unix, and atomically renames the staging file over the current executable. - After replacement completes, runs the new binary with
--versionto print<old_version> -> <new_version>(falling back toUpdated tuseif the version check fails or returns empty output).
Post-install setup
Defaults and the built-in system prompt are compiled into the binary; no config file is required to run Tuse. On interactive first-time installations (when the installed binary supports "tuse/default"), the installer can optionally create ~/.config/tuse/init.lua for you. To start talking to a model:
- Connect a provider:
tuse connect --base https://api.openai.com/v1 --key '$OPENAI_API_KEY' --name openai(or, if you enabledsubs, launchtuseand run/substo configure CLIProxyAPI). - Run
tuseand select a model and effort with/models. - Optionally customize your global config (
~/.config/tuse.luaor~/.config/tuse/init.lua) or create a project config (tuse init).