cli/README.md
A unified command dispatcher for iii-engine tools. Automatically downloads and manages multiple binaries (iii-console, iii-tools) from GitHub, with built-in update checking and security advisories.
curl -fsSL https://install.iii.dev/iii-cli/main/install.sh | bash
Specific version:
curl -fsSL https://install.iii.dev/iii-cli/main/install.sh | bash -s -- -v VERSION_NUMBER
Custom directory:
curl -fsSL https://install.iii.dev/iii-cli/main/install.sh | INSTALL_DIR=/usr/local/bin bash
The script auto-detects your platform, downloads the correct binary, verifies the SHA256 checksum, and adds it to your PATH.
Download the latest release binary from the Releases page.
| Platform | Target |
|---|---|
| macOS (Apple Silicon) | aarch64-apple-darwin |
| macOS (Intel) | x86_64-apple-darwin |
| Linux (x86_64, glibc) | x86_64-unknown-linux-gnu |
| Linux (x86_64, musl) | x86_64-unknown-linux-musl |
| Linux (ARM64) | aarch64-unknown-linux-gnu |
| Windows (x86_64) | x86_64-pc-windows-msvc |
| Windows (ARM64) | aarch64-pc-windows-msvc |
Each release includes .sha256 checksum files for verification.
macOS blocks unsigned binaries downloaded from the internet. Remove the quarantine attribute:
xattr -d com.apple.quarantine ./iii-cli
cargo install --path .
git clone https://github.com/iii-hq/iii-cli.git
cd iii-cli
cargo build --release
./target/release/iii-cli --help
Launch the iii-engine web console:
iii-cli console [ARGS]
The console will auto-download on first use. Pass any arguments directly to iii-console:
iii-cli console --port 3000
Create a new iii project from a template:
iii-cli create [ARGS]
Examples:
iii-cli create --template my-template
iii-cli create my-project --help
Show all managed binaries and their versions:
iii-cli list
Output example:
Installed binaries:
• iii-console (v0.2.4) — installed 2026-02-25 — command: iii-cli console
• iii-tools (v1.0.2) — installed 2026-02-20 — command: iii-cli create
Storage: /Users/user/Library/Application Support/iii-cli/bin
Update iii-cli and all installed binaries to their latest versions:
iii-cli update
Update only iii-cli itself:
iii-cli update self
iii-cli update iii-cli
Update a specific managed binary:
iii-cli update console
iii-cli update create
Skip background update and advisory checks for a single command:
iii-cli --no-update-check console
When you run a command like iii-cli console:
~/Library/Application Support/iii-cli/bin/ on macOS)~/.local/bin/ and system $PATH for existing installationsThe entire download happens transparently on first use. Subsequent runs use the cached binary.
After each command execution, iii-cli runs a non-blocking background check (500ms timeout):
Example output:
info: Update available: iii-console v0.2.3 → v0.2.4 (run `iii-cli update console`)
To run an explicit update check without executing a command:
iii-cli update
| Platform | Architectures | Status |
|---|---|---|
| macOS | Apple Silicon (aarch64), Intel (x86_64) | Fully supported |
| Linux | x86_64 (musl), ARM64 (gnu) | Fully supported |
| Windows | x86_64, ARM64 | Fully supported |
Linux note: x86_64 uses musl for maximum portability; aarch64 uses gnu (musl builds unavailable).
cargo build
cargo build --release
cargo test
The project includes unit tests for:
src/main.rs - Entry point, command dispatch, and lifecyclesrc/cli.rs - CLI argument parsing with clapsrc/registry.rs - Binary registry and command resolutionsrc/platform.rs - Platform detection, asset naming, directory managementsrc/update.rs - Update checking and version comparisonsrc/advisory.rs - Security advisory fetching and matchingsrc/download.rs - Asset download with progress, checksum verification, extractionsrc/exec.rs - Binary execution (POSIX exec on Unix, spawn on Windows)src/state.rs - Persistent state managementsrc/github.rs - GitHub API clientsrc/error.rs - Error typesCore dependencies:
Apache-2.0
To contribute:
cargo testIf you see "Binary not found" after a download:
error: Binary not found at /path/to/binary
Try running the command again. The binary may be in a temporary location during extraction.
If you see a checksum mismatch:
error: SHA256 checksum mismatch for asset. Expected: ..., got: ...
The downloaded file may be corrupted. Run the command again to re-download.
If you see rate limit errors:
error: GitHub API rate limit exceeded
Set a GitHub token:
export GITHUB_TOKEN=ghp_your_token_here
iii-cli update
Update checks run with a 500ms timeout. If GitHub is slow, the check is skipped silently and will retry on the next command. To force an update check:
iii-cli update
If iii-cli finds an existing installation instead of downloading:
✓ Found existing iii-console at /usr/local/bin/iii-console
This is expected. iii-cli checks ~/.local/bin/ and system $PATH before downloading to avoid redundant downloads. To use iii-cli's managed version:
rm /usr/local/bin/iii-console
iii-cli console # Will re-download to managed directory