Skip to content
Commands

Run kache <command> --help for the exact syntax in your installed version.

CommandPurpose
cargoRun Cargo with duplicate Cargo-home rustflags collapsed
listInspect local entries
gcEvict local entries
purgeRemove local cache entries
cleanRemove Cargo target directories below the current directory
initConfigure Cargo and optionally install the daemon service
doctorDiagnose setup and store integrity
syncPull from and push to a remote
save-manifestPublish build metadata for later prefetch
daemonInspect and manage the background daemon
monitorOpen the live dashboard
statsPrint a non-interactive summary
why-missExplain a crate's recent key change
reportProduce text, Markdown, JSON, or trace output
configOpen the configuration editor
install-shimsCreate Unix compiler-name symlinks
completionsGenerate shell completion scripts

kache cargo

kache cargo -- build
kache cargo -- test --workspace

Pass Cargo arguments after --. On Cargo 1.91 or newer, this command can keep intermediate worktree state separate while coordinating a shared final target directory.

kache list

kache list
kache list serde
kache list --sort size --no-pager

Sort values are name, size, hits, and age.

Interactive output uses KACHE_PAGER, then PAGER, then a platform default. --no-pager writes directly.

kache gc

kache gc
kache gc --max-age 7d
kache gc --stale-schema

A bare run enforces configured size and age policies. --max-age runs the requested age policy. --stale-schema removes entries created with old or unrecorded key schemas and conflicts with --max-age.

GC affects only the local store.

kache purge

kache purge --crate-name serde
kache purge

With no crate name, purge wipes the entire local cache after confirmation.

kache clean

kache clean
kache clean --dry-run --yes
kache clean --yes

clean recursively finds target/ directories below the current directory. The default opens a selector. Use --dry-run --yes before a scripted --yes run.

kache init

kache init
kache init --check
kache init --no-service
kache init --yes

--check reports proposed changes without writing. --no-service skips login-service installation.

kache doctor

kache doctor
kache doctor --fix
kache doctor --verify
kache doctor --checksums
kache doctor --repair
  • --fix repairs supported setup issues and can migrate sccache configuration.
  • --purge-sccache also removes sccache data and requires --fix.
  • --verify checks entries, blobs, and metadata.
  • --checksums also hashes blob contents and implies --verify.
  • --repair removes corrupted entries and implies --verify.

Review destructive options before running them.

kache sync

kache sync
kache sync --pull
kache sync --push
kache sync --dry-run
kache sync --pull --workspace
kache sync --pull --all

Options:

FlagEffect
--manifest-path <PATH>Select Cargo manifest for push-side workspace filtering
--pullSkip uploads
--pushSkip downloads
--dry-runPlan without transfer
--allIgnore normal pull filtering
--workspaceScope pull discovery to workspace members; conflicts with --all
--allow-partialExit successfully despite reported transfer/import failures

See Sync for filtering semantics.

kache save-manifest

kache save-manifest
kache save-manifest --manifest-key x86_64-linux-release
kache save-manifest --namespace x86_64-unknown-linux-gnu/rustc-hash/release

The default manifest key is the host target triple. A namespace plus Cargo.lock also publishes content-addressed shards.

kache daemon

kache daemon             # status
kache daemon status
kache daemon run
kache daemon start
kache daemon stop
kache daemon restart
kache daemon install
kache daemon uninstall
kache daemon log

See Daemon lifecycle.

kache monitor

kache monitor
kache monitor --since 7d

See Monitor.

kache stats

kache stats
kache stats --since 1h

The default window is 24 hours.

kache why-miss

kache why-miss serde

The command compares recorded key material for the named rustc crate and reports changed input groups.

kache report

kache report --format text --since 24h
kache report --format markdown --root "$PWD"
kache report --format json --output report.json
kache report --format trace --output trace.json
FlagDefaultValues or purpose
--formattextjson, trace, perfetto, chrome-trace, markdown, github, text
--since24hEvent window
--rootall rootsInclude events from one build tree
--output, -ostdoutWrite to a file
--top10Number of ranked entries

trace, perfetto, and chrome-trace select the same trace representation. The JSON contract is documented by report.schema.json.

kache config

kache config

This command can open even when the current config file is invalid. See Configuration.

kache install-shims

kache install-shims ~/.local/lib/kache/shims
kache install-shims --force ~/.local/lib/kache/shims

This Unix command creates cc, c++, gcc, g++, clang, and clang++ symlinks to Kache. Put the directory before the real compilers in PATH.

kache completions

kache completions zsh > ~/.zfunc/_kache
kache completions bash > ~/.local/share/bash-completion/completions/kache
kache completions fish > ~/.config/fish/completions/kache.fish

Supported shells are Bash, Elvish, Fish, PowerShell, and Zsh.

Available for:
Apple macOS logomacOSMicrosoft Windows logoWindowsLinux logoLinux
Download Kunobi