Shell Execution
Crucible’s TUI allows you to execute shell commands directly and optionally share their output with the AI agent.
Quick Start
Section titled “Quick Start”Type ! followed by a command and press Enter:
!ls -la!git status!cargo buildA modal window opens showing the command output in real-time.
Shell Modal
Section titled “Shell Modal”When a shell command runs, a full-screen modal displays:
- Command: The command being executed
- Status: Running, completed (exit code), or failed
- Output: Real-time streaming stdout/stderr
Modal Keybindings
Section titled “Modal Keybindings”| Key | Action |
|---|---|
j / Down | Scroll down one line |
k / Up | Scroll up one line |
d | Scroll down half page |
u | Scroll up half page |
G | Jump to bottom |
g | Jump to top |
Ctrl+C | Cancel running command |
s | Save and send full output to agent |
t | Save and send truncated output (last 50 lines) |
e | Open output in $EDITOR |
Enter / Escape | Dismiss modal |
Sending Output to Agent
Section titled “Sending Output to Agent”After a command completes, you can share the output with the AI:
- Press
sto send the full output as context - Press
tto send only the last 50 lines (useful for long build logs)
The agent receives the output formatted with the command, exit code, and working directory.
Output Persistence
Section titled “Output Persistence”Shell outputs are saved to your session directory:
<kiln>/.crucible/sessions/<session-id>/shell/<timestamp>-<command>.outputFile format:
$ git statusExit: 0Duration: 0.15sCwd: /home/user/project---On branch mainYour branch is up to date with 'origin/main'.
nothing to commit, working tree cleanUse Cases
Section titled “Use Cases”Running Tests
Section titled “Running Tests”!cargo testThen press t to send failures to the agent for debugging help.
Checking Git Status
Section titled “Checking Git Status”!git diff --statPress s to share changes with the agent for commit message suggestions.
Build Errors
Section titled “Build Errors”!cargo build 2>&1Press s to let the agent help diagnose compilation errors.
- Commands run in the current working directory (where you started
cru chat) - Long-running commands show a spinner; press
Ctrl+Cto cancel - Use
eto open output in your editor for manual selection/copying - The modal auto-scrolls to bottom during streaming; scroll up to pause