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#

CommandDescription
/model [name]Change the AI model (opens selector if no name given)
/provider [name]Change the AI provider (opens selector if no name given)
/sessionsOpen session manager
/newStart a new chat session
/attach <path>Attach a file or folder
/attachmentsShow current attachments
/clear-attachmentsClear all attachments
/pwdShow current working directory
/toolsShow registered tools
/graphShow graph/session state
/settingsOpen settings panel
/clearClear chat history
/helpShow available commands
/exitExit the CLI

Command Aliases#

For faster typing, you can use these shortcuts:

AliasFull Command
/session/sessions
/add or /a/attach
/ca/clear-attachments
/status/graph
/quit or /q/exit

Keyboard Shortcuts#

ShortcutAction
Ctrl+CExit CLI
EscapeCancel current operation
↑/↓Navigate command history or suggestions
TabAutocomplete 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:

ToolDescription
read_fileRead the contents of a file
write_fileWrite content to a file (creates directories if needed)
edit_fileEdit a file by replacing specific content
list_directoryList contents of a directory
create_directoryCreate a new directory
delete_fileDelete a file or directory
move_fileMove or rename a file or directory
search_filesSearch for files by name pattern

Session Management#

View Sessions#

text
/sessions

Opens 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#

text
/new

Creates 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#

text
/attach ./src/index.ts

Attaches a file to the conversation context. The AI can read and reference this file.

Attach a Folder#

text
/attach ./src

Attaches 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#

text
/attachments

Shows all currently attached files and folders.

Clear Attachments#

text
/clear-attachments

Or use the shortcut:

text
/ca

Model Switching#

Quick Switch#

text
/model gpt-4o

Switches to the specified model immediately.

Interactive Selection#

text
/model

Opens an interactive model selector with all available models for the current provider.

Change Provider#

text
/provider claude

Switches to a different provider. You'll need the appropriate API key configured.

Example Session: Building an Agent#

text
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 configuration

Example Session: Scaffolding a New Agent#

text
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