Skip to content

Commit 837afc4

Browse files
Bruce Haumanclaude
andcommitted
Document prompt-cli --resume flag and add link in CHANGELOG
- Add --resume flag documentation to doc/prompt-cli.md - Document session persistence feature and storage location - Add examples showing how to resume sessions - Add link to prompt-cli docs in CHANGELOG v0.1.12 entry 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 952ed4e commit 837afc4

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This release changes the project license to EPL 2.0, adds an experimental prompt
1212
- **Changed license from AGPL 3.0 to Eclipse Public License 2.0** - The project now uses EPL 2.0, providing more flexibility for commercial use and integration with proprietary code while still requiring sharing of modifications
1313

1414
### Added
15-
- **Experimental Prompt CLI** (`clojure -M:prompt-cli`) for command-line AI interaction with session persistence and resume functionality
15+
- **Experimental Prompt CLI** (`clojure -M:prompt-cli`) for command-line AI interaction with session persistence and resume functionality - See [documentation](doc/prompt-cli.md)
1616
- **Prompt to save custom user prompts to config** (#117)
1717
- **Babashka script detection**: Improved detection of Babashka scripts with regex pattern matching for shebangs
1818
- **dry_run parameter** for file editing tools (#121, #122) - Allows preview of edits before applying, this is mainly for integration in to ECA https://github.com/editor-code-assistant/eca

doc/prompt-cli.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ clojure -M:prompt-cli -p "Your prompt here"
2222
## Options
2323

2424
- `-p, --prompt PROMPT` - The prompt to send to the agent (required)
25+
- `-r, --resume` - Resume the most recent session with its conversation history
2526
- `-m, --model MODEL` - Override the default model (e.g., `:openai/gpt-4`, `:anthropic/claude-3-5-sonnet`)
2627
- `-c, --config CONFIG` - Path to a custom agent configuration file (optional)
2728
- `-d, --dir DIRECTORY` - Working directory (defaults to REPL's working directory)
@@ -60,6 +61,26 @@ Specify a working directory:
6061
clojure -M:prompt-cli -p "List files" -d /path/to/project
6162
```
6263

64+
Resume the most recent session:
65+
```bash
66+
clojure -M:prompt-cli --resume -p "Continue with the next step"
67+
```
68+
69+
Resume with a different model:
70+
```bash
71+
clojure -M:prompt-cli --resume -p "Now refactor the code" -m :openai/gpt-4
72+
```
73+
74+
## Session Persistence
75+
76+
Sessions are automatically saved after each prompt execution:
77+
- Sessions are stored in `.clojure-mcp/prompt-cli-sessions/` within your working directory
78+
- Each session file is timestamped (e.g., `2025-11-06T14-30-45.json`)
79+
- Sessions contain the full conversation history and model information
80+
- Use `--resume` to continue from the most recent session
81+
- When resuming, the conversation history is displayed before processing your new prompt
82+
- You can resume with a different model using `-m` to override the original session's model
83+
6384
## Configuration
6485

6586
The CLI properly initializes the nREPL connection with:

0 commit comments

Comments
 (0)