Fresh-Host Rebuild Runbook
Rebuild a working akm install on a new machine. It assumes your bundle lives in
a git remote and that you kept a copy of config.json somewhere you can
restore it from.
- Install the CLI. Prebuilt binary (no runtime needed):
curl -fsSL https://github.com/itlackey/akm/releases/latest/download/install.sh | bash(Windows:irm https://github.com/itlackey/akm/releases/latest/download/install.ps1 | iex). Or the npm package, which needs Node.js 22.15 or later:npm install -g akm-cli. A working Bun 1.0 or later onPATHis optional and preferred over Node. - Confirm the binary resolves:
akm --version. - Restore
config.json. akm reads one user config at~/.config/akm/config.json(%APPDATA%\akm\config.jsonon Windows; setAKM_CONFIG_DIRto move it). It holds yourconnections,harnesses, and your improve strategies. - Provide secrets.
config.jsonrefers to API keys as$VARor${VAR}. Export those environment variables, or restorecredentials.jsonfrom your own backup (it is never part ofconfig.json), so the connections and the embedding endpoint resolve. - Restore the working bundle. Clone your bundle's git remote to the path
of the working bundle's entry under
bundlesin the restored config (defaultBundleselects which one; the default path is~/akm). To start clean instead, runakm setup --yes, which scaffolds the bundle. - Check the other bundles.
akm bundle listshows the bundles the restored config defines. Re-add any that are missing withakm bundle add <ref>. - Rebuild the index:
akm index --full.index.dbis derived from your bundles and is rebuilt from scratch. - Verify health:
akm doctor, thenakm doctor infofor index stats and the effective config.akm doctorcreatesstate.dbif it is missing and applies its migrations. It exits 0 when every check passes, 4 on warnings, and 1 when a hard check fails. See Health Checks for what each check means. - Smoke-test discovery:
akm search <term>returns results.
$DATA/state.db holds proposals, events, and task history, and is not rebuilt
from your bundles. Copy it from the old host before step 8 if you want that
history.