CLI Reference¶
Complete command-line interface reference for Perspt.
Global Options¶
perspt [OPTIONS] <COMMAND>
Option |
Description |
|---|---|
|
Enable verbose logging |
|
Configuration file path |
|
Print help information |
|
Print version |
Commands Overview¶
Command |
Description |
|---|---|
|
Start interactive TUI chat session |
|
Run SRBN agent for autonomous coding |
|
Initialize project configuration |
|
Manage configuration settings |
|
Query and manage Merkle ledger |
|
Show current agent status |
|
Abort current agent session |
|
Resume paused or crashed session |
|
View LLM request/response logs |
|
Simple CLI chat mode (no TUI) |
perspt chat¶
Usage: perspt chat [OPTIONS]
Start an interactive TUI chat session.
|
Model to use (e.g., |
Example:
perspt chat
perspt chat --model claude-opus-4.5
perspt agent¶
Usage: perspt agent [OPTIONS] <TASK>
Run the SRBN agent for autonomous coding.
Arguments:
|
Task description or path to task file |
Model Options:
|
Override all model tiers |
|
Model for planning (deep reasoning) |
|
Model for code generation |
|
Model for stability checking |
|
Model for fast lookahead |
Execution Options:
|
Working directory (default: current) |
|
Auto-approve all actions |
|
Auto-approve read-only operations |
|
Max complexity before approval (default: 5) |
|
|
SRBN Options:
|
Lyapunov weights (default: |
|
Convergence threshold (default: |
Limit Options:
|
Maximum cost in dollars (0 = unlimited) |
|
Maximum iterations (0 = unlimited) |
Execution Options:
|
Defer tests until sheaf validation (faster iteration) |
|
Log all LLM requests/responses to database |
Examples:
perspt agent "Create a calculator"
perspt agent -y -w ./project "Add tests"
perspt agent --architect-model gpt-5.2 --actuator-model claude-opus-4.5 "Build API"
perspt init¶
Usage: perspt init [OPTIONS]
Initialize project configuration.
|
Create |
|
Create |
Example:
perspt init --memory --rules
perspt config¶
Usage: perspt config [OPTIONS]
Manage configuration settings.
|
Display current configuration |
|
Set a configuration value |
|
Open in |
Examples:
perspt config --show
perspt config --set default.model=gpt-5.2
perspt config --edit
perspt ledger¶
Usage: perspt ledger [OPTIONS]
Query and manage the Merkle change ledger.
|
Show recent commits |
|
Rollback to specific commit |
|
Show ledger statistics |
Examples:
perspt ledger --recent
perspt ledger --rollback abc123
perspt ledger --stats
perspt status¶
Usage: perspt status
Show current agent session status. Displays:
Session ID
Current task
Energy levels (V_syn, V_str, V_log)
Token usage
perspt abort¶
Usage: perspt abort [OPTIONS]
Abort the current agent session.
|
Force abort without confirmation |
perspt resume¶
Usage: perspt resume [SESSION_ID]
Resume a paused or crashed session.
|
Session ID to resume (optional, uses latest if omitted) |
perspt simple-chat¶
Usage: perspt simple-chat [OPTIONS]
Simple command-line chat mode for scripting and automation. No TUI - just a prompt with streaming responses.
|
Model to use for chat |
|
Log session to file |
Examples:
perspt simple-chat
perspt simple-chat --log-file session.txt
echo "Explain Rust" | perspt simple-chat
perspt logs¶
Usage: perspt logs [OPTIONS] [SESSION_ID]
View and analyze LLM request/response logs from agent sessions.
Arguments:
|
Session ID to view (optional) |
Options:
|
Show logs from most recent session |
|
Show usage statistics instead of individual requests |
|
Launch interactive TUI logs viewer |
Examples:
# View most recent session logs
perspt logs --last
# Interactive TUI viewer
perspt logs --tui
# Usage statistics
perspt logs --stats
# Specific session
perspt logs abc123-session-id
Exit Codes¶
Code |
Meaning |
|---|---|
0 |
Success |
1 |
General error |
2 |
Configuration error |
3 |
Provider/API error |
4 |
Agent aborted by user |
See Also¶
Configuration - Configuration guide
Agent Options - Agent options detail
perspt-cli API - API documentation