CLI Overview
Master the RunAgent command-line interface
The RunAgent CLI is your primary tool for creating, testing, and deploying AI agents. It provides a simple yet powerful interface for managing the entire agent lifecycle.
Installation
Verify installation:
Global Options
All RunAgent commands support these global options:
Option | Description |
---|---|
--help | Show help message and exit |
--version | Display RunAgent version |
--verbose | Enable verbose output |
--quiet | Suppress non-error output |
Available Commands
init
Initialize a new agent project
serve
Run agent locally for testing
deploy
Deploy agent to production
run
Execute a deployed agent
upload
Upload agent to server
start
Start uploaded agent
setup
Configure authentication
template
Manage project templates
Command Structure
RunAgent follows a consistent command structure:
Examples:
Common Workflows
Development Workflow
Create Project
Install Dependencies
Configure Environment
Test Locally
Deploy
Quick Commands Reference
Configuration Management
Authentication Setup
The setup command creates a configuration file at:
- Linux/Mac:
~/.runagent/config.json
- Windows:
%USERPROFILE%\.runagent\config.json
Environment Variables
RunAgent CLI respects these environment variables:
Variable | Description |
---|---|
RUNAGENT_API_KEY | API key for authentication |
RUNAGENT_API_URL | Custom API endpoint |
RUNAGENT_CONFIG_PATH | Custom config file location |
RUNAGENT_LOG_LEVEL | Logging level (DEBUG, INFO, WARNING, ERROR) |
Output Formats
Most commands support different output formats:
Error Handling
RunAgent provides clear error messages:
Common Exit Codes
Code | Meaning |
---|---|
0 | Success |
1 | General error |
2 | Command line usage error |
3 | Configuration error |
4 | Network/API error |
5 | Authentication error |
Advanced Usage
Piping and Scripting
Aliases and Shortcuts
Add to your shell configuration:
Debugging
Enable verbose output for troubleshooting:
Best Practices
Getting Help
Join our Discord community for support and discussions