Skip to content

Use the REPL

Get productive with chimera code, the interactive coding session that gives you a conversational agent with full tool access.


Terminal window
pip install chimera-run[anthropic]
export ANTHROPIC_API_KEY="sk-ant-..."

Terminal window
chimera code --model claude-sonnet-4 --workdir ./my-project

You will see a startup banner like:

chimera code v0.1.0 | model: claude-sonnet-4 | /help for commands

The --workdir flag sets the working directory for all file operations. Omit it to default to the current directory. --max-steps 80 raises the per-turn tool-call limit (default 50).


Type naturally at the > prompt. The agent has access to all 20 built-in tools (read, write, edit, bash, search, git, think, todo, etc.) and will use them automatically.

> Find all TODO comments in the codebase and list them by file
> Refactor the User class to use dataclasses
> Run the test suite and fix any failures

After each turn, the REPL prints cost and step count:

[cost: $0.0312 | steps: 4]

Press Ctrl-C to interrupt a long-running turn. Press Ctrl-D or type /exit to quit.


All commands start with / and support tab completion.

CommandDescription
/helpList all available commands.
/modelShow the current model name.
/costShow total cost, per-model breakdown, and remaining budget.
/contextShow message count and estimated token usage.
/historyShow the last 10 messages (role + first 80 chars).
/toolsList all loaded tools with descriptions.
CommandDescription
/clearClear the entire conversation context and start fresh.
/compactCompress context when the token window fills up.
/debugToggle debug mode on/off (shows raw tool calls).
/initRe-initialize the agent with updated project context.
/yoloToggle YOLO mode (auto-approve all tool calls).
/exitQuit the REPL and print total session cost.
CommandDescription
/session save my-featureSave the current session with an optional name.
/session listShow session management options.
/session forkFork the session (branch the conversation).
CommandDescription
/treeDisplay the full session branch tree.
/branch [name]Create a new named branch from the current point.
/switch <name>Switch to an existing branch.
CommandDescription
/checkpoint save before-refactorCreate a named checkpoint.
/checkpoint listList all checkpoints with IDs and timestamps.
/checkpoint restore before-refactorRoll back to a named checkpoint.
/checkpoint undoUndo to the most recent checkpoint.
CommandDescription
/auditShow a summary of tool execution decisions (allowed/denied counts).
/audit clearClear the audit log.
/agent listList available agent presets (build, review, explore, etc.).

  • Watch your costs. Run /cost periodically. The breakdown shows spending per model so you can spot expensive turns.
  • Compact before you hit limits. When /context reports high token counts, run /compact to compress the history and free up context window space.
  • Save before risky changes. Use /checkpoint save before asking the agent to do large refactors. Restore if things go sideways.
  • Use sessions across days. /session save my-feature persists the full conversation. Resume it tomorrow without losing context.
  • History is saved automatically. Readline history is written to ~/.chimera/history (up to 1000 entries) and restored on next launch.