cru chat
Start an interactive AI chat session with access to your kiln.
Synopsis
Section titled “Synopsis”cru chat [OPTIONS] [QUERY]Running cru with no arguments starts chat mode.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
[QUERY] | Optional one-shot query. If omitted, starts interactive mode. |
Description
Section titled “Description”The chat command connects an AI agent to your knowledge base. The agent can search, read, and explore your notes. In normal mode it has full tool access. Switch to plan mode for read-only exploration, or auto mode to skip tool confirmation prompts.
Options
Section titled “Options”Agent Selection
Section titled “Agent Selection”-a, --agent <AGENT>
Section titled “-a, --agent <AGENT>”Preferred ACP agent to use. Skips the splash screen and connects directly.
cru chat --agent claude-codecru chat --agent gemini-clicru chat --agent codexAvailable agents: claude-code, gemini-cli, codex, cursor, or any custom profile defined in crucible.toml. The agent must be installed and available in your PATH.
--provider <PROVIDER>
Section titled “--provider <PROVIDER>”LLM provider from your [llm.providers] config section.
cru chat --provider openaicru chat --provider ollamaSession Management
Section titled “Session Management”-r, --resume <SESSION_ID>
Section titled “-r, --resume <SESSION_ID>”Resume a previous session by ID. Session IDs follow the format chat-YYYYMMDD-HHMM-xxxx.
cru chat --resume chat-20250102-1430-a1b2--record <FILE>
Section titled “--record <FILE>”Record the TUI session to a JSONL file for later replay.
cru chat --record session-recording.jsonl--replay <FILE>
Section titled “--replay <FILE>”Replay a previously recorded JSONL session.
cru chat --replay session-recording.jsonl--replay-speed <N>
Section titled “--replay-speed <N>”Playback speed multiplier for replay (default: 1.0).
--replay-auto-exit [<DELAY_MS>]
Section titled “--replay-auto-exit [<DELAY_MS>]”Auto-exit after replay completes. Optional delay in milliseconds (default: 2000).
Context & Knowledge Base
Section titled “Context & Knowledge Base”--no-context
Section titled “--no-context”Skip context enrichment. Faster startup, but the agent won’t have knowledge base access.
cru chat --no-context "What's 2+2?"--max-context <TOKENS>
Section titled “--max-context <TOKENS>”Maximum context window tokens (default: 16384).
--context-size <N>
Section titled “--context-size <N>”Number of context results to include (default: 5).
Mode & Configuration
Section titled “Mode & Configuration”--plan
Section titled “--plan”Start in plan mode (read-only) instead of normal mode. The agent can search and read notes but can’t execute write operations. Toggle during a session with /plan and /normal commands.
cru chat --plan--set <KEY[=VALUE]>
Section titled “--set <KEY[=VALUE]>”Session configuration overrides using the same syntax as the TUI :set command. Can be repeated.
cru chat --set model=llama3 --set temperature=0.5cru chat --set perm.autoconfirm_session-e, --env <KEY=VALUE>
Section titled “-e, --env <KEY=VALUE>”Environment variables to pass to the ACP agent. Can be repeated.
cru chat --agent claude-code --env ANTHROPIC_BASE_URL=http://localhost:4000Runtime
Section titled “Runtime”--standalone
Section titled “--standalone”Run with an in-process daemon instead of connecting to the background server. Useful for single-session use, restricted environments, or testing. Data persists to the kiln’s .crucible/ directory.
cru chat --standaloneChat Modes
Section titled “Chat Modes”Crucible has three chat modes. Cycle between them with Shift+Tab during a session.
Normal Mode (Default)
Section titled “Normal Mode (Default)”Full tool access. The agent can search, read, create, modify, and delete notes. Tool calls prompt for confirmation before executing.
Plan Mode
Section titled “Plan Mode”Read-only. The agent can search and read your notes, but write operations are blocked. Good for exploration and brainstorming without risk of changes.
Toggle with /plan or start directly:
cru chat --planAuto Mode
Section titled “Auto Mode”Full tool access with automatic approval. Tool calls execute without confirmation prompts. Useful for trusted workflows where you don’t want to approve every action.
In-Chat Commands
Section titled “In-Chat Commands”Slash Commands
Section titled “Slash Commands”| Command | Description |
|---|---|
/help | Show available commands |
/plan | Switch to plan (read-only) mode |
/normal | Switch to normal (full access) mode |
/clear | Clear conversation history |
/agent <name> | Switch to a different agent |
REPL Commands
Section titled “REPL Commands”| Command | Description |
|---|---|
:model | Open model picker popup |
:model <name> | Switch to specific model |
:set option=value | Set runtime config option |
:set thinkingbudget=high | Enable extended thinking |
:session list | List available sessions |
:session load <id> | Resume existing session |
:quit / :q | Exit chat |
See Commands for complete REPL command reference.
Keyboard Shortcuts
Section titled “Keyboard Shortcuts”| Key | Action |
|---|---|
Ctrl+C | Cancel / Exit |
Alt+T | Toggle thinking display |
Shift+Tab | Cycle mode (Normal, Plan, Auto) |
Agent Access
Section titled “Agent Access”In chat mode, the agent has access to these tools:
Read operations:
semantic_search- Find conceptually related notestext_search- Find exact text matchesproperty_search- Filter by metadataread_note- Read note contents
Write operations (normal and auto modes):
create_note- Create new notesupdate_note- Modify existing notesdelete_note- Remove notes (with confirmation in normal mode)
Examples
Section titled “Examples”Quick Question
Section titled “Quick Question”cru chat "What do I know about project management?"Interactive Session
Section titled “Interactive Session”cruThen ask questions:
You: What are my notes about productivity?
Agent: I found several notes related to productivity...
You: Can you summarize the key techniques?
Agent: Based on your notes, the main techniques are...Use a Specific ACP Agent
Section titled “Use a Specific ACP Agent”cru chat --agent claude-code "Summarize my notes on API design"Resume a Previous Session
Section titled “Resume a Previous Session”cru chat --resume chat-20250102-1430-a1b2Plan Mode Exploration
Section titled “Plan Mode Exploration”cru chat --plan "What patterns do my testing notes share?"Custom Provider with Overrides
Section titled “Custom Provider with Overrides”cru chat --provider ollama --set model=llama3.2 --set temperature=0.7Record and Replay
Section titled “Record and Replay”# Record a sessioncru chat --record demo.jsonl
# Replay it latercru chat --replay demo.jsonl --replay-speed 2.0Model Switching
Section titled “Model Switching”Change models at runtime without restarting:
:model # Opens model picker:model claude-3-5-sonnet # Switch directly:model gpt-4oModel changes persist for the session and sync to the daemon.
Extended Thinking
Section titled “Extended Thinking”For models that support reasoning tokens (Claude with thinking budget, DeepSeek-R1, etc.):
:set thinkingbudget=high # Enable extended thinking (8192 tokens):set thinkingbudget=off # Disable thinking:set thinking # Show thinking in UI:set nothinking # Hide thinking displayToggle thinking display with Alt+T.
Presets: off, minimal (512), low (1024), medium (4096), high (8192), max (unlimited)
Session Resume
Section titled “Session Resume”Sessions auto-save and can be resumed:
cru session list # See available sessionscru chat --resume chat-20250102-1430-a1b2 # Resume specific sessionOr from within chat:
:session list:session load chat-20250102-1430-a1b2Statusline Notifications
Section titled “Statusline Notifications”The statusline displays notifications when files change in your kiln:
- File changes appear dimmed on the right side (e.g., “notes.md modified”)
- Multiple changes batch together (e.g., “3 files modified”)
- Errors appear in red and stay visible longer
Notification timing:
- Info notifications: 2 seconds
- Error notifications: 5 seconds
This provides real-time feedback when other tools or editors modify your notes while you’re chatting.
Effective Prompts
Section titled “Effective Prompts”Be specific about what you want:
"Find notes about React hooks and summarize the patterns I use"vs
"What do I have about React?"Building Context
Section titled “Building Context”The agent remembers conversation history. Build on previous answers:
You: What notes do I have about testing?Agent: [Lists notes]You: Focus on the integration testing onesAgent: [Narrows down]You: What patterns do they share?Verification
Section titled “Verification”Ask the agent to cite sources:
"What's my approach to error handling? Cite the specific notes."Implementation
Section titled “Implementation”Source code: crates/crucible-cli/src/commands/chat.rs
See Also
Section titled “See Also”- Commands - REPL command reference
- Keybindings - Keyboard shortcuts
- Sessions - Session management
- llm - LLM configuration
- agents - Agent configuration
- Agent Client Protocol - ACP specification