Skip to content

Commit 05bcbef

Browse files
Update documentation for shell escapes, aliases, redo, and auto-save
1 parent 1234776 commit 05bcbef

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The project uses a `src/smolagents/` layout. All source code is under `src/smola
5555
- `prompts/` - YAML prompt templates for different agent types
5656

5757
### Beyond Python (BP) Extensions
58-
- `bp_cli.py` - Interactive CLI (`bpsa`): REPL and one-shot modes with CodeAgent, slash commands, token tracking
58+
- `bp_cli.py` - Interactive CLI (`bpsa`): REPL and one-shot modes with CodeAgent, slash commands, token tracking, shell escapes (`!`, `!!`, `!!?`), `/alias`, `/redo`, auto-save
5959
- `bp_tools.py` - Extended tool library: file I/O, source code analysis, OS commands, multi-language support (24+ languages including Pascal, PHP, C++, Java, Go, Rust)
6060
- `bp_thinkers.py` - `Thinker` agent with multi-step reasoning (thoughts/plans/code sections)
6161
- `bp_executors.py` - `LocalExecExecutor` for direct Python execution via `exec()`

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,23 @@ $ bpsa --load-instructions # Load CLAUDE.md, AGENTS.md, etc. at startup
6666
$ bpsa --browser # Enable Playwright browser integration
6767
```
6868

69-
The REPL supports command history, tab completion for slash commands, and multi-line input via Alt+Enter. Use `/session-save <file>` and `/session-load <file>` to persist and restore sessions across restarts. You can also run OS commands directly from the REPL with `!<command>` (agent does not see the output) or `!!<command>` (output is appended to the next prompt sent to the agent). Type `/help` to see all available commands. You can also launch `ad-infinitum` from within the REPL via `!ad-infinitum ...`.
69+
The REPL supports command history, tab completion for slash commands, and multi-line input via Alt+Enter. Use `/session-save <file>` and `/session-load <file>` to persist and restore sessions across restarts. You can also launch `ad-infinitum` from within the REPL via `!ad-infinitum ...`. Type `/help` to see all available commands.
70+
71+
#### Shell commands from the REPL
72+
73+
| Prefix | Description |
74+
|--------|-------------|
75+
| `!<command>` | Run an OS command directly (agent does not see the output) |
76+
| `!!<command>` | Run an OS command with streaming output; output is appended to the next prompt sent to the agent |
77+
| `!!?<command>` | Run an OS command and immediately send the output to the agent for analysis |
78+
79+
#### Aliases
80+
81+
Define command aliases with `/alias <name> <value>` (e.g., `/alias gs !!git status`). Aliases are saved to `~/.bpsa_aliases` and persist across sessions. Use `/alias` to list all and `/alias -d <name>` to delete.
82+
83+
#### Auto-save
84+
85+
Sessions are automatically saved every 5 turns to `~/.bpsa_autosave.json`. Configure the interval with the `BPSA_AUTOSAVE_INTERVAL` environment variable (set to 0 to disable).
7086

7187

7288
## CLI (`ad-infinitum`)

0 commit comments

Comments
 (0)