Commands
Complete reference for all Astreus CLI commands and keyboard shortcuts. Use these commands to manage your agent development sessions, switch models, and organize your workflow.
Slash Commands#
| Command | Description |
|---|---|
/model [name] | Change the AI model (opens selector if no name given) |
/provider [name] | Change the AI provider (opens selector if no name given) |
/sessions | Open session manager |
/new | Start a new chat session |
/attach <path> | Attach a file or folder |
/attachments | Show current attachments |
/clear-attachments | Clear all attachments |
/pwd | Show current working directory |
/tools | Show registered tools |
/graph | Show graph/session state |
/settings | Open settings panel |
/clear | Clear chat history |
/help | Show available commands |
/exit | Exit the CLI |
Command Aliases#
For faster typing, you can use these shortcuts:
| Alias | Full Command |
|---|---|
/session | /sessions |
/add or /a | /attach |
/ca | /clear-attachments |
/status | /graph |
/quit or /q | /exit |
Keyboard Shortcuts#
| Shortcut | Action |
|---|---|
Ctrl+C | Exit CLI |
Escape | Cancel current operation |
↑/↓ | Navigate command history or suggestions |
Tab | Autocomplete command |
? | Toggle command shortcuts display |
Built-in File Tools#
The CLI provides powerful file system tools for managing your agent projects. The AI uses these to create agents, plugins, configurations, and modify your code:
| Tool | Description |
|---|---|
read_file | Read the contents of a file |
write_file | Write content to a file (creates directories if needed) |
edit_file | Edit a file by replacing specific content |
list_directory | List contents of a directory |
create_directory | Create a new directory |
delete_file | Delete a file or directory |
move_file | Move or rename a file or directory |
search_files | Search for files by name pattern |
Session Management#
View Sessions#
/sessionsOpens the session manager where you can:
- View all saved sessions
- Switch between sessions
- Delete old sessions
- See session metadata (date, messages, model)
Start New Session#
/newCreates a fresh session while preserving the previous one.
Session Auto-Save#
All conversations are automatically saved. When you restart the CLI, you can resume where you left off.
File Attachments#
Attach a File#
/attach ./src/index.tsAttaches a file to the conversation context. The AI can read and reference this file.
Attach a Folder#
/attach ./srcAttaches an entire folder. When a folder is attached, it becomes the working directory for file operations.
Drag and Drop#
You can also drag and drop file paths directly into the terminal.
View Attachments#
/attachmentsShows all currently attached files and folders.
Clear Attachments#
/clear-attachmentsOr use the shortcut:
/caModel Switching#
Quick Switch#
/model gpt-4oSwitches to the specified model immediately.
Interactive Selection#
/modelOpens an interactive model selector with all available models for the current provider.
Change Provider#
/provider claudeSwitches to a different provider. You'll need the appropriate API key configured.
Example Session: Building an Agent#
You: /attach ./my-agent
Attached folder: ./my-agent (working directory set)
You: What's the current agent configuration?
Astreus: Let me check the project structure.
[Tool: list_directory] Listing ./my-agent...
[Tool: read_file] Reading ./my-agent/src/agent.ts...
This is an Astreus agent project with:
- Agent configured with GPT-4o model
- Memory enabled for conversation persistence
- No knowledge base configured yet
- No custom plugins
You: Add a knowledge base and ingest our docs folder
Astreus: I'll add knowledge base support to your agent.
[Tool: edit_file] Updating ./my-agent/src/agent.ts...
[Tool: write_file] Creating ./my-agent/src/ingest-docs.ts...
Done! I've updated your agent with:
- Knowledge base enabled in agent config
- Created ingest-docs.ts script to load your documentation
- Run `npx ts-node src/ingest-docs.ts` to ingest docs
You: Create a plugin for fetching weather data
Astreus: I'll create a weather plugin for your agent.
[Tool: create_directory] Creating ./my-agent/src/plugins...
[Tool: write_file] Creating ./my-agent/src/plugins/weather.ts...
[Tool: edit_file] Updating ./my-agent/src/agent.ts to register plugin...
Done! Weather plugin created with:
- get_weather tool for current conditions
- get_forecast tool for 5-day forecast
- Proper TypeScript types and error handling
- Registered in your agent configurationExample Session: Scaffolding a New Agent#
You: Create a code review agent that can analyze PRs
Astreus: I'll create a complete code review agent project.
[Tool: create_directory] Creating ./code-review-agent...
[Tool: write_file] Creating package.json...
[Tool: write_file] Creating tsconfig.json...
[Tool: write_file] Creating .env.example...
[Tool: write_file] Creating src/agent.ts...
[Tool: write_file] Creating src/index.ts...
[Tool: write_file] Creating src/plugins/github.ts...
Done! Code review agent created with:
- Claude model (better for code analysis)
- GitHub plugin for PR fetching
- Memory for tracking reviewed PRs
- System prompt optimized for code review
Run these commands to get started:
cd code-review-agent
npm install
cp .env.example .env # Add your API keys
npm run dev