First-time setup (once, from this repo):
uv syncThis creates the project-local .venv with an editable install, including the
strands-code console script. Nothing is installed globally.
From this repo:
uv run strands-codeFrom any other directory (sessions stay local to that directory):
uv run --project /home/csaba/repos/AWS/strands-code strands-codeor directly:
/home/csaba/repos/AWS/strands-code/.venv/bin/strands-code- Sessions live in
./.agent/sessionsrelative to your working directory — each project directory gets its own session store.cdinto the repo you want to work on, then launch. - Resume with
strands-code --session-id <uuid>, or pick from the resume picker at launch (/resumeworks too, inside the REPL). - Delete with the picker's
Delete a session…row (nested confirm), or/forget <id-or-prefix>inside the REPL. Either way removes the snapshots, the thinking-stash sidecar, and the index entry; the active session is always refused.
Without AWS credentials the CLI stops with a Bedrock setup pointer (exit 2).
With credentials it uses Bedrock; the provider choice persists to a config
file for later /model switching (Phase 5).
Base install covers Bedrock and direct-provider ids. Two opt-in extras:
uv sync --extra agentcore # Bedrock model discovery + AgentCore sandbox (boto3)
uv sync --extra litellm # OpenRouter / exotic providers via litellm/ idsOpenRouter-style endpoints need two env vars (never stored in the repo):
export LITELLM_BASE_URL="https://openrouter.ai/api/v1"
export LITELLM_API_KEY="<key>"then /model litellm/openrouter/<vendor>/<model>.
Mid-session /model switches convert history to what the target accepts
(thinking blocks, media). Verdicts come from the harness first, with
fail-closed defaults for the unknown. When a verdict is wrong for a new
model, correct it without waiting for a release in
~/.config/strands-code/model-capabilities.yaml:
overrides:
- match: {provider: bedrock, vendor: amazon, family: nova}
reasoning: true
- match: {name_contains: gpt-oss}
media: trueFirst match wins; /context shows how many overrides are active. Typos
warn-and-skip — they never break startup. Restart the CLI to reload.
/costshows per-turn tokens plus session totals, with aPrices:line naming the source: live Bedrock Price List, live OpenRouter (foropenrouter/...ids), LiteLLM bundled data, or the static fallback. Display only — never budgets or enforcement./cost refreshre-fetches both live sources now (cached 24h in~/.cache/strands-code/);/cost table [filter]lists the cached per-1M-token prices without touching the network.- Set
STRANDS_CODE_NO_LIVE_PRICING=1to force static-only resolution (fully offline, unknown models show tokens without$).
- Type an ask, get a streamed answer, keep asking — one conversation.
/resume,/rename,/exitwork; unknown/slashshows a usage hint.- Ctrl-C cancels the current line; Ctrl-D exits with state saved.
kill -9mid-idle is survivable: relaunch with the same session id.