Skip to main content

The init wizard + doctor

Two commands that take a fresh clone to a working configuration in under a minute, with a clear preflight check that surfaces problems before they bite you on the first decision tick.

permafrost init

Walks an operator through:

  1. Captain's callsign (display only; defaults to "Captain Pole" in the arctic theme).
  2. Config path (default ./config.yaml).
  3. Keystore path (default ~/.permafrost/keystore.json).
  4. Env-file path for the generated keystore passphrase (default ~/.permafrost/env).
  5. Optional inference provider (openrouter / openai / groq / ollama / skip).
  6. EVM RPC nudge -- points you at chainlist.org when you're ready to trade EVM spot legs.

End state:

  • A starter config.yaml (copied from config.example.yaml if available; minimal stub otherwise).
  • A 64-hex-character keystore passphrase, written 0600 to a sourceable env file. The wizard prints it once on stdout -- back it up.
  • A clear next-steps block telling you exactly the next 5 commands to type.

The wizard is idempotent: re-running detects existing files and keeps them rather than overwriting.

Flags

FlagDefaultPurpose
--non-interactivefalseSkip prompts; accept defaults silently. CI / scripts.
--theme {arctic,plain}arcticVocabulary theme. plain strips arctic flavour text.
--config-out <path>./config.yamlWhere to write config.yaml
--keystore-out <path>~/.permafrost/keystore.jsonWhere to put the keystore
--env-out <path>~/.permafrost/envWhere to write the passphrase env file

Sourcing the env file

The wizard does not auto-source the env file or modify your shell profile. To load the passphrase into your current shell:

set -a; source ~/.permafrost/env; set +a

Or in CI / Docker, mount it as an env file (docker run --env-file ~/.permafrost/env …).

permafrost doctor

A preflight checker that verifies every system Permafrost depends on before you start an agent.

permafrost doctor
Permafrost preflight ───────────────────────────────────────────
✓ go version go1.25.5
✓ docker 28.0.0
✓ config loaded env=dev
✓ database reachable postgres://REDACTED@localhost:5432/permafrost?sslmode=disable
✓ keystore passphrase env PERMAFROST_KEYSTORE_PASSPHRASE set
⚠ keystore file ~/.permafrost/keystore.json (not yet created -- run `permafrost wallet generate` or `wallet import`)
⚠ inference: groq base_url=https://api.groq.com/openai/v1 but GROQ_API_KEY not set (provider may reject auth)
✓ inference: ollama base_url=http://localhost:11434/v1
✓ solana RPC https://api.mainnet-beta.solana.com (slot 414335213)
✓ evm RPC: base https://mainnet.base.org (block 0x2ad7400)
✓ evm RPC: ethereum https://ethereum-rpc.publicnode.com (block 0x17c3237)
✓ strategies registered dca_buy, market_maker_basic, noop
─────────────────────────────────────────────────────────────────
11 ok, 4 warning(s), 1 error(s). Fix errors before `permafrost agent start`.

What it checks

CategoryCheckFailure means
Toolchaingo versionGo binary missing on PATH
Toolchaindocker --versionDocker daemon not reachable
Configconfig loadedconfig.yaml missing or unparseable
Datadatabase reachablePostgres TCP + SQL ping
KeystorePERMAFROST_KEYSTORE_PASSPHRASE setWon't decrypt
Keystorekeystore file presentwallet import not run yet
Inferenceper-provider base_url + API key envProvider will reject auth
ChainSolana RPC getSlot round-tripRPC unreachable / rate-limited
ChainEVM RPC eth_blockNumber per chainSame per chain
Strategiesregistered countNo strategies linked into binary

Severity model

  • (green) -- passing.
  • (yellow) -- degraded but won't block agent start. Common cases: rate-limited RPC, missing optional inference key, keystore not yet populated.
  • (red) -- hard failure. Doctor exits 1.
  • (grey) -- intentionally skipped (e.g. Solana RPC check when no Solana RPC is configured).

Flags

permafrost doctor --verbose # show underlying error details for failures

Implementation notes

Doctor uses an explicit 5-second HTTP timeout per check (TLS-handshake hang protection). The Solana check uses getSlot rather than getHealth

  • commercial providers (Helius, Triton) restrict getHealth. RPC URLs are redacted (API keys stripped) before being printed.

Where they fit in your workflow

one-time
┌───────────┐
│ init │
└─────┬─────┘


┌────────────────────────────────┐
│ source ~/.permafrost/env │
│ (load keystore passphrase) │
└─────┬──────────────────────────┘


┌──────────┐ ┌──────────────────┐
│ doctor │ ──────►│ fix any errors │
└─────┬────┘ └──────────────────┘


┌──────────────────┐
│ agent start … │
└──────────────────┘

Next steps