Fresh-Host Rebuild Runbook
Rebuild a working akm install on a new machine. Assumes your bundle lives in a
git remote and that a versioned config.json copy is committed to the bundle
git (the 08-F1 recovery pattern — see step 3).
- Install the CLI. Prebuilt binary (no runtime needed):
curl -fsSL https://github.com/itlackey/akm/releases/latest/download/install.sh | bash— or npm package (Node.js >= 22 required):npm install -g akm-cli. If a working Bun >= 1.0 is also onPATH, the package prefers it after Node bootstrap; old, unusable, or absent Bun installations fall back to Node.js. The standalone binary is runtime-free. (Windows:irm https://github.com/itlackey/akm/releases/latest/download/install.ps1 | iex.) - Confirm the binary resolves:
akm --version. - Restore
config.json. akm reads a single user config at~/.config/akm/config.json(%APPDATA%\akm\config.jsonon Windows; override withAKM_CONFIG_DIR). This file is gitignored on the host, so the recovery source is the ONE versioned copy committed to the bundle git (08-F1 pattern). Copy that file into place; it carries namedengines,defaults.engine/defaults.llmEngine, and cron-load-bearing improve strategies that are otherwise unrecoverable. - Provide secrets/env.
config.jsonreferences API keys via${VAR}placeholders; export those environment variables (or restore your env/secret assets) so named engines and the embedding connection resolve. Never commit the resolved values. - Restore the working bundle. Clone your bundle git remote to the path
named by your working bundle's entry under
bundlesin the restored config (defaultBundleselects which one; default path~/akm). There is no top-levelstashDirconfig key in 0.9 — it is retired and rejected at load. If starting clean instead, runakm setup --yesto scaffold it. - Re-add non-git sources. For each managed source not carried in the bundle
git (websites, npm packages, GitHub repos), run
akm bundle add <ref>. Verify the full set withakm bundle list. - Rebuild the index:
akm index --full(forces a complete reindex rather than an incremental update). - Verify health:
akm health(checks runtime, artifacts, and improve metrics — exits non-zero ifstate.dbis missing) andakm infofor index stats and effective config. - Smoke-test discovery:
akm search <term>returns results, confirming the index and bundle are wired correctly.