Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

Status: 🟢 Implemented. See Implementation Status.

Kargo is a single native binary. It brings its own Kotlin compiler, so Kotlin is the one thing you do not need to install first.

Prerequisites

RequirementWhy
A JDK (17 or newer)Needed to run the Kotlin compiler and JVM builds. Kargo discovers one, or installs it on request.

That is the whole list. Everything else — the Kotlin compiler, and the Compose compiler plugin when you enable it — Kargo downloads on demand. Rust is needed only if you choose to build from source.

Download a prebuilt binary

Five platforms are published with every release, each as a single-file archive:

PlatformAsset
Linux, x86-64kargo-x86_64-unknown-linux-gnu.tar.gz
Linux, ARM64kargo-aarch64-unknown-linux-gnu.tar.gz
macOS, Apple siliconkargo-aarch64-apple-darwin.tar.gz
macOS, Intelkargo-x86_64-apple-darwin.tar.gz
Windows, x86-64kargo-x86_64-pc-windows-msvc.zip

Every release also publishes sha256sums.txt, covering all five. The commands below verify against it before installing — one extra line, for a binary you are about to put on your PATH.

Linux (swap x86_64 for aarch64 on ARM):

base=https://github.com/dejanradmanovic/kargo/releases/latest/download
asset=kargo-x86_64-unknown-linux-gnu.tar.gz

curl -fsSLO "$base/$asset"
curl -fsSLO "$base/sha256sums.txt"
sha256sum --ignore-missing --check sha256sums.txt   # must print: OK

tar xzf "$asset"
install -Dm755 kargo ~/.local/bin/kargo

macOS (swap aarch64 for x86_64 on Intel):

base=https://github.com/dejanradmanovic/kargo/releases/latest/download
asset=kargo-aarch64-apple-darwin.tar.gz

curl -fsSLO "$base/$asset"
curl -fsSLO "$base/sha256sums.txt"
shasum -a 256 --ignore-missing --check sha256sums.txt   # must print: OK

tar xzf "$asset"
sudo install -m 755 kargo /usr/local/bin/kargo

The binaries are not notarized, so the first run may be blocked by Gatekeeper. Clear it with xattr -d com.apple.quarantine /usr/local/bin/kargo.

Windows (PowerShell):

$base  = "https://github.com/dejanradmanovic/kargo/releases/latest/download"
$asset = "kargo-x86_64-pc-windows-msvc.zip"

Invoke-WebRequest "$base/$asset" -OutFile $asset
Invoke-WebRequest "$base/sha256sums.txt" -OutFile sha256sums.txt

# Compare the archive's hash with its row in sha256sums.txt.
$want = (Select-String -Path sha256sums.txt -SimpleMatch $asset).Line.Split()[0]
$got  = (Get-FileHash $asset -Algorithm SHA256).Hash.ToLower()
if ($want -ne $got) { throw "checksum mismatch for $asset" }

Expand-Archive $asset -DestinationPath "$env:LOCALAPPDATA\Kargo" -Force

Then add %LOCALAPPDATA%\Kargo to your PATH.

To pin a version rather than take the newest, replace latest/download with download/v0.2.0.

Confirm it works:

kargo --version

Install from source

For a platform with no published binary, or to run an unreleased main. This path needs Rust 1.91 or newer (rustup) and Git. The Rust floor tracks [workspace.package].rust-version in the repository, so if cargo install reports an unsupported edition or a missing feature, run rustup update stable first.

git clone https://github.com/dejanradmanovic/kargo.git
cd kargo
cargo install --path crates/kargo-cli

This builds in release mode and drops the kargo binary in ~/.cargo/bin.

Make sure that directory is on your PATH:

# bash / zsh
export PATH="$HOME/.cargo/bin:$PATH"
# PowerShell
$env:PATH = "$HOME\.cargo\bin;$env:PATH"

Install a specific revision from source

To pin a commit or tag rather than tracking main:

cargo install --git https://github.com/dejanradmanovic/kargo \
  --tag v0.2.0 \
  kargo-cli

What Kargo writes to disk

Kargo keeps everything it downloads under one directory, so uninstalling is a single rm -rf.

PathContents
~/.kargo/toolchains/Downloaded Kotlin compilers, one directory per version
~/.kargo/cache/Maven artifact cache, mirroring the Maven repository layout
~/.kargo/build-cache/Content-addressed compiled outputs
~/.kargo/config.tomlYour global configuration

On Windows these live under %USERPROFILE%\.kargo\.

Nothing is written outside that directory and your project's build/ folder.

Updating

kargo self update

self update also regenerates the completion scripts it installed, so they describe the binary you now have. Re-running the download or rebuilding from source does not — run kargo completions <shell> --install again after either.

Or re-run the download above: latest/download always resolves to the newest release. From a source checkout:

git pull && cargo install --path crates/kargo-cli --force

Uninstalling

Remove the binary, then the one directory Kargo writes to:

rm -f ~/.local/bin/kargo       # or /usr/local/bin/kargo
rm -rf ~/.kargo

Installed from source instead? cargo uninstall kargo-cli removes the binary.

Platform notes

Linux — No extra setup. For Android targets, set ANDROID_HOME or add ANDROID_SDK=/path/to/sdk to your project's .kargo.env.

macOS — Install the Xcode command line tools (xcode-select --install) before building Apple targets. Kargo locates SDKs through xcrun.

Windows — Builds and runs natively; no WSL required. Paths in Kargo.toml use forward slashes and are normalized for you. Native Kotlin targets are not supported on Windows hosts.

Shell completions

Status: 🟢 Implemented.

--install writes the script where your shell reads it and prints anything left to do. bash, zsh, fish, powershell and elvish are accepted:

kargo completions bash --install

That is the whole setup for bash and fish: both load the directory the script lands in. Start a new shell and press Tab.

zsh installs to ~/.zfunc/_kargo, which zsh reads only if the directory is on $fpath. Add this to ~/.zshrc above its compinit line — compinit builds the completion table, so a line below it comes too late:

fpath=(~/.zfunc $fpath)

powershell and elvish have no completions directory, so their scripts go under ~/.kargo/completions/ and the install output prints the one line to add — a dot-source line for $PROFILE, an eval line for ~/.config/elvish/rc.elv. For PowerShell, $PROFILE may not exist yet; New-Item -Type File -Force $PROFILE creates it.

Installing again replaces the script, and kargo self update does that for every shell you installed this way, so an upgrade never leaves you completing commands the binary no longer has.

Without --install the script goes to stdout, which is what you want for a system-wide install or a path of your own:

kargo completions bash | sudo tee /etc/bash_completion.d/kargo > /dev/null
kargo completions powershell | Out-String | Invoke-Expression   # this session only

Scripts installed by hand are not refreshed on upgrade; regenerate them yourself. Completions cover kargo's own commands and flags — subcommands provided by plugins are not completed yet.

Next steps

Create something: Your First Project.