2.6 KiB
2.6 KiB
AiSH Bundling
AiSH packages the app binary and llama-cli together. The GGUF model is not
embedded in the binary; it is downloaded into the user data directory on first
run after confirmation.
First-run flow
- User runs
aishfrom any directory. - AiSH creates its home directory if needed:
- Linux/macOS:
~/.aish - Windows:
%APPDATA%\AiSH
- Linux/macOS:
- AiSH loads or creates
config.toml. - AiSH checks for the configured model:
- default path:
~/.aish/models/aish.gguf - default source:
https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF/resolve/main/qwen2.5-coder-1.5b-instruct-q2_k.gguf
- default path:
- If the model is missing, AiSH prompts before downloading.
- If the user declines, AiSH exits without running a request.
- If the user accepts, AiSH downloads the model and then starts normally.
- AiSH resolves
llama-clifrom the bundle and uses it for local inference.
--yes skips confirmation for the model download and for non-blocked commands.
Runtime lookup
AiSH resolves llama-cli in this order:
AISH_LLAMA_BIN, if set.- Runtime bundled next to the executable:
runtime/llama-cli../runtime/llama-cli- Windows uses
llama-cli.exe.
- Installed runtime:
- Linux/macOS:
~/.local/share/aish/runtime/llama-cli - Windows:
%LOCALAPPDATA%\AiSH\runtime\llama-cli.exe
- Linux/macOS:
runtime_commandfrom config, defaulting tollama-cli.
This means a packaged install does not require the user to install llama.cpp.
The system llama-cli is only a fallback.
Linux bundle
Build:
scripts/package-linux.sh
Output:
dist/aish-linux-x86_64.tar.gz
Bundle layout:
aish-linux-x86_64/
bin/
aish
aish-download-model
runtime/
llama-cli
other llama.cpp runtime files
install.sh
Install:
tar -xzf dist/aish-linux-x86_64.tar.gz -C dist
dist/aish-linux-x86_64/install.sh
Windows bundle
Build from Docker on Linux/macOS:
scripts/package-windows-docker.sh
Or build from a native Windows machine with Rust, Git, CMake, and MSVC Build Tools:
powershell -ExecutionPolicy Bypass -File scripts\package-windows.ps1
Output:
dist\aish-windows-x86_64.zip
Bundle layout:
aish-windows-x86_64\
bin\
aish.exe
runtime\
llama-cli.exe
other llama.cpp runtime files
install.ps1
Install:
Expand-Archive dist\aish-windows-x86_64.zip -DestinationPath dist
powershell -ExecutionPolicy Bypass -File dist\aish-windows-x86_64\install.ps1
The installer creates an aish.cmd shim under %USERPROFILE%\.local\bin and
adds that directory to the user PATH if needed.