Installation¶
You can install asksh with the install script, from a GitHub Release archive, or from source with Go.
Install script (macOS and Linux)¶
Run the installer:
The script does the following:
- Detects your OS (
darwinorlinux) and architecture (amd64orarm64, switching toarm64automatically when running under macOS Rosetta). - Downloads
asksh_<version>_<os>_<arch>.tar.gzandchecksums.txtfrom GitHub Releases and verifies the SHA-256 checksum. - Installs the
askshbinary to~/.local/bin/asksh(with mode0755). - Runs
asksh setupif you have an interactive terminal and noconfig.tomlexists yet. - Adds
PATHandasksh init <shell>to your shell startup file forzsh,bash, orfish.
Installer environment variables¶
Set any of these variables before piping to sh to customize the install:
| Variable | Effect |
|---|---|
ASKSH_VERSION |
Install a specific release version (for example 0.2.1 or v0.2.1) instead of latest |
ASKSH_INSTALL_DIR |
Target binary directory (defaults to ~/.local/bin) |
ASKSH_NO_SETUP |
Set to 1 or true to skip running asksh setup |
ASKSH_NO_MODIFY_SHELL |
Set to 1 or true to skip editing your shell startup file |
ASKSH_SHELL |
Override $SHELL detection (zsh, bash, or fish) |
ASKSH_CONFIG_DIR |
Override where the installer checks for an existing config.toml |
Prebuilt archives¶
Prebuilt binaries for macOS, Linux, and Windows (amd64 and arm64) are published on GitHub Releases. Each archive includes asksh (or asksh.exe on Windows), LICENSE, README.md, and config.example.toml.
- Download the archive for your platform and
checksums.txt. - Verify the SHA-256 checksum (
sha256sum -con Linux orshasum -a 256 -con macOS). - Extract the archive and move
askshinto a directory on yourPATH. - Run
asksh setupand install the shell integration below.
Windows support
install.sh exits with an error on MINGW, MSYS, and CYGWIN shells. Download the .zip archive from GitHub Releases manually.
Build from source¶
Building from source requires Go matching go.mod (Go 1.27.1 or newer):
git clone https://github.com/askshell/asksh.git
cd asksh
CGO_ENABLED=0 go build -o asksh ./cmd/asksh
Move the compiled asksh binary to a directory on your PATH, then run asksh setup.
Install the shell integration¶
If you ran the install script without ASKSH_NO_MODIFY_SHELL, your startup file is already configured. Otherwise, add the hook for your shell manually:
Add to ~/.bashrc (or ~/.bash_profile on macOS if you use login shells):
Bash 4.0+ required for keybindings
macOS ships Bash 3.2 by default. Command recording still works on Bash 3.x, but the ? and Alt+? bindings require Bash 4.0 or newer (BASH_VERSINFO[0] >= 4). Install a newer Bash (for example via Homebrew) if you use those keybindings.
Upgrade¶
Update an installed release binary in place with:
asksh upgrade is an alias for asksh update. The updater checks the latest tag on GitHub Releases, verifies the archive checksum against checksums.txt, and atomically replaces the running executable. On macOS running under Rosetta, it downloads the arm64 binary.
By default, the interactive TUI also checks for a new release once every 24 hours and caches the result in ~/.local/share/asksh/update.json. Set ASKSH_NO_UPDATE_CHECK=1 to disable background checks.
Uninstall¶
See Uninstalling asksh.