CLI Reference#
What youβll learn: Complete reference for all Osprey Framework CLI commands
π What Youβll Learn
Key Concepts:
Using
ospreyCLI for all framework operationsCreating projects with
osprey initGenerating capabilities from MCP servers with
osprey generate(prototype)Managing deployments with
osprey deployRunning interactive sessions with
osprey chatExporting configuration with
osprey export-config
Prerequisites: Framework installed (pip install osprey-framework)
Time Investment: 10 minutes for quick reference
Overview#
The Osprey Framework provides a unified CLI for all framework operations. All commands are accessed through the osprey command with subcommands for specific operations.
New in v0.7+: Unified CLI
The framework CLI provides a modern, unified interface for all operations. Previous Python script-based workflows have been replaced with convenient CLI commands.
Quick Reference:
osprey # Launch interactive menu (NEW in v0.7.7)
osprey --version # Show framework version
osprey --help # Show available commands
osprey init PROJECT # Create new project
osprey generate COMMAND # Generate components (MCP capabilities, servers)
osprey deploy COMMAND # Manage services
osprey chat # Start interactive chat
osprey export-config # Export configuration
Interactive Mode#
The framework provides an interactive terminal UI (TUI) that automatically launches when you run osprey without any arguments:
osprey
The TUI is completely optional - all existing direct commands continue to work exactly as before. Use whichever approach fits your workflow:
Interactive mode: Great for exploration, learning, and infrequent tasks
Direct commands: Perfect for direct control without visual overhead, for experienced users
Interactive Project Creation#
The interactive project creation flow guides you through all the necessary steps:
Project Name: Enter a name for your project
Template Selection: Choose from available templates with descriptions:
minimal- Basic skeleton for custom developmenthello_world_weather- Simple weather agent examplecontrol_assistant- Production control system integration template
Provider Selection: Select your AI provider (Cborg, OpenAI, Anthropic, Google, Ollama, etc.)
Model Selection: Choose from provider-specific models
API Key Setup:
Automatically detects API keys from your shell environment
Prompts for secure input if keys are not detected
Generates
.envfile with detected or entered keys
The interactive flow is equivalent to using framework init with appropriate flags, but with helpful guidance and validation at each step.
Disabling Interactive Mode#
If you prefer to only use direct commands, you can bypass the interactive menu by:
Running specific commands directly:
framework chat,framework deploy up, etc.Using
framework --helpto see available commandsThe menu never interrupts existing scripts or automation
Global Options#
These options work with all osprey commands.
--project / -p#
The --project flag allows you to specify the project directory for commands that operate on existing projects (chat, deploy, health, export-config), enabling multi-project workflows and CI/CD automation from any directory.
osprey COMMAND --project /path/to/project
Project Resolution Priority:
When determining which project to use, the framework checks in this order:
``βproject`` CLI flag (highest priority)
``FRAMEWORK_PROJECT`` environment variable
Current working directory (default)
Examples:
# Work with specific project from anywhere
osprey chat --project ~/projects/weather-agent
osprey deploy status --project ~/projects/turbine-monitor
# Use environment variable for a session
export OSPREY_PROJECT=~/projects/my-agent
osprey chat # Uses ~/projects/my-agent
osprey deploy status # Uses ~/projects/my-agent
# CLI flag overrides environment variable
export OSPREY_PROJECT=~/projects/agent1
osprey chat --project ~/projects/agent2 # Uses agent2, not agent1
Use Cases:
Multi-project development: Switch between projects without changing directories
CI/CD pipelines: Deploy or test specific projects from central scripts
Automation: Run health checks across multiple projects
Parallel workflows: Work with multiple projects simultaneously
Commands supporting ``βproject``:
osprey chat --project PATHosprey deploy COMMAND --project PATHosprey health --project PATHosprey export-config --project PATH
Note: The osprey init command does not use --project because it creates a new project. Use --output-dir instead to specify where the new project should be created.
--version#
Show framework version and exit.
osprey --version
Output:
Osprey Framework version 0.7.0
--help#
Show help message for any command.
osprey --help
osprey init --help
osprey deploy --help
osprey chat --help
osprey export-config --help
CLI Customization#
You can customize the CLI appearance through the cli section in your projectβs config.yml.
Example - Custom colors:
cli:
theme: "custom"
custom_theme:
primary: "#4A90E2" # Brand blue
success: "#7ED321" # Success green
accent: "#F5A623" # Accent orange
command: "#9013FE" # Command purple
path: "#50E3C2" # Path teal
info: "#BD10E0" # Info magenta
Example - Custom banner:
cli:
theme: "default"
banner: |
ββββββββββββββββββββββββββββββββββββββββββ
β MY PROJECT NAME β
ββββββββββββββββββββββββββββββββββββββββββ
All menu items, prompts, and messages will use your custom colors and banner. The default theme is used if no cli section is present.
Commands#
osprey init#
Create a new project from a template.
Syntax#
osprey init [OPTIONS] PROJECT_NAME
Arguments#
PROJECT_NAMEName of the project directory to create. Will be created in the current directory.
Options#
--template <name>Template to use for project initialization. Available templates:
minimal- Basic skeleton for custom developmenthello_world_weather- Simple weather agent (recommended for learning)control_assistant- Production control system integration template
Default:
minimal--registry-style <style>Registry implementation style:
compact- Use helper functions (5-10 lines, recommended)explicit- Full registry implementation (verbose, for learning)
Default:
compact
Examples#
Create minimal project:
osprey init my-agent
Create from hello_world_weather template:
osprey init weather-demo --template hello_world_weather
Create with explicit registry style:
osprey init my-agent --template minimal --registry-style explicit
Create advanced agent:
osprey init my-assistant --template control_assistant
Generated Structure#
The osprey init command creates a complete, self-contained project:
my-agent/
βββ src/
β βββ my_agent/ # Application code
β βββ __init__.py
β βββ registry.py # Component registration
β βββ context_classes.py
β βββ capabilities/ # Agent capabilities
βββ services/ # Container services
β βββ jupyter/ # Development environment
β βββ open-webui/ # Web interface
β βββ pipelines/ # Processing pipeline
βββ config.yml # Complete configuration
βββ .env.example # Environment template
βββ README.md # Project documentation
osprey generate#
Prototype Feature
This is a prototype feature under active development. The API and generated code structure may change in future releases.
Generate Osprey components from various sources, including MCP (Model Context Protocol) servers.
Subcommands#
osprey generate capabilityGenerate Osprey capability from MCP server
osprey generate mcp-serverGenerate demo MCP server for testing
osprey generate capability#
Generate a complete Osprey capability from an MCP server with automatic ReAct agent integration, classifier/orchestrator guides, and context classes.
Syntax:
osprey generate capability --from-mcp <URL_OR_SIMULATED> --name <NAME> [OPTIONS]
Required Arguments:
--from-mcp <url>MCP server URL (e.g.,
http://localhost:3001) orsimulatedfor demo mode with weather tools--name, -n <name>Name for the generated capability (e.g.,
slack_mcp,weather_mcp)
Optional Arguments:
--server-name <name>Human-readable server name (default: derived from capability name)
--output, -o <path>Output file path (default:
./capabilities/<name>.py)--provider <provider>LLM provider override for guide generation (e.g.,
anthropic,openai,cborg)--model <model_id>Model ID override for guide generation (e.g.,
claude-sonnet-4-20250514,gpt-4o)--quiet, -qReduce output verbosity
Examples:
Generate from simulated mode (no server needed):
osprey generate capability --from-mcp simulated --name weather_mcp
Generate from real MCP server:
osprey generate capability --from-mcp http://localhost:3001 --name slack_mcp
Custom output location:
osprey generate capability --from-mcp http://localhost:3001 \
--name slack_mcp --output ./my_app/capabilities/slack.py
Override LLM provider/model:
osprey generate capability --from-mcp simulated --name weather_mcp \
--provider anthropic --model claude-sonnet-4-20250514
See MCP Capability Generation for detailed guide.
osprey generate mcp-server#
Generate a demo MCP server for testing Ospreyβs MCP capability generation. The server uses FastMCP for simple, Pythonic MCP server implementation with weather tools.
Syntax:
osprey generate mcp-server [OPTIONS]
Optional Arguments:
--name, -n <name>Server name (default:
demo_mcp)--output, -o <path>Output file path (default:
./<name>_server.py)--port, -p <port>Server port (default:
3001)
Included Tools:
The generated server includes three weather-related tools:
get_current_weather- Get current weather conditions for a locationget_forecast- Get weather forecast for upcoming daysget_weather_alerts- Get active weather alerts and warnings
Examples:
Generate weather demo server (default):
osprey generate mcp-server
Generate on custom port:
osprey generate mcp-server --port 3002
Custom output location:
osprey generate mcp-server --name my_server --output ./servers/mcp.py
Running the Generated Server:
# Install FastMCP
pip install fastmcp
# Run the server
python demo_mcp_server.py
Testing with Osprey:
# Generate capability from the running server
osprey generate capability --from-mcp http://localhost:3001 --name demo_mcp
See MCP Capability Generation for complete workflow.
osprey deploy#
Manage containerized services (Jupyter, OpenWebUI, Pipelines).
Syntax#
osprey deploy COMMAND [OPTIONS]
Global Options#
--project PATH/-p PATHProject directory to use. If not specified, uses
OSPREY_PROJECTenvironment variable or current directory.This option works with all deploy subcommands (
up,down,status, etc.).- Example:
osprey deploy status --project ~/projects/my-agent osprey deploy up --project ~/projects/my-agent --detached
Commands#
upStart services defined in
config.yml.- Options:
--detached- Run services in background--dev- Development mode: use local framework instead of PyPI- Examples:
osprey deploy up # Start in foreground osprey deploy up --detached # Start in background osprey deploy up --dev # Start with local framework osprey deploy up --detached --dev # Background with local framework
downStop all running services.
- Example:
osprey deploy down
restartRestart all services.
- Example:
osprey deploy restart
statusShow status of deployed services.
- Example:
osprey deploy status
cleanStop services and remove containers and volumes.
- Example:
osprey deploy clean
rebuildRebuild containers from scratch (useful after Dockerfile changes).
- Options:
--detached- Run services in background after rebuild--dev- Development mode: use local framework instead of PyPI- Examples:
osprey deploy rebuild # Rebuild and start osprey deploy rebuild --detached # Rebuild in background osprey deploy rebuild --detached --dev # Rebuild with local framework
Configuration#
Services are configured in config.yml under deployed_services:
project_name: "my-agent" # Project identifier for container tracking
deployed_services:
- osprey.jupyter # Jupyter development environment
- osprey.open-webui # Web chat interface
- osprey.pipelines # Processing pipeline
Project Directory:
All osprey deploy commands must be run from a project directory (containing config.yml), or use the --project flag:
# Option 1: Run from project directory
cd my-project
osprey deploy up
# Option 2: Use --project flag
osprey deploy up --project ~/projects/my-project
# Option 3: Use interactive menu (auto-handles directories)
osprey
Workflow#
Development workflow:
# Start services in foreground to monitor logs
osprey deploy up
# When done, stop with Ctrl+C or:
osprey deploy down
Production workflow:
# Start services in background
osprey deploy up --detached
# Check status
osprey deploy status
# View logs with podman
podman logs <container_name>
# Stop when needed
osprey deploy down
Service Access#
Once deployed, services are available at:
OpenWebUI: http://localhost:8080
Jupyter (read-only): http://localhost:8088
Jupyter (write): http://localhost:8089
Pipelines: http://localhost:9099
osprey chat#
Start an interactive CLI conversation interface with your agent.
Syntax#
osprey chat [OPTIONS]
Options#
--project PATH/-p PATHProject directory to use. If not specified, uses
FRAMEWORK_PROJECTenvironment variable or current directory.See Global Options for multi-project workflow details.
--config PATH/-c PATHPath to configuration file.
Default:
config.ymlin project directory
Examples#
# Start chat in current directory
osprey chat
# Start chat in specific project
osprey chat --project ~/projects/my-agent
# Use custom config
osprey chat --config my-config.yml
# Combine project and config
osprey chat --project ~/agent --config custom.yml
# Use environment variable for project
export OSPREY_PROJECT=~/projects/my-agent
osprey chat
Usage#
The chat interface provides an interactive session with your agent:
Agent Configuration loaded successfully.
Registry initialized with 25 capabilities
β‘ Use slash commands (/) for quick actions - try /help
You: What's the weather in San Francisco?
Agent: [Processing request...]
The current weather in San Francisco is 18Β°C with partly cloudy conditions.
Slash Commands#
The CLI supports slash commands for agent control and interface operations:
Agent Control Commands:
/planning:on # Enable planning mode
/planning:off # Disable planning mode
/approval:enabled # Enable approval workflows
/approval:disabled # Disable approval workflows
/approval:selective # Enable selective approval
Performance Commands:
/task:off # Bypass task extraction
/caps:off # Bypass capability selection
CLI Commands:
/help # Show available commands
/help <command> # Show help for specific command
/exit # Exit the chat session
/clear # Clear the screen
See also
- Command System
Complete API reference for the centralized command system
Prerequisites#
Before using framework chat:
Services must be deployed:
framework deploy up --detachedConfiguration must be valid:
config.ymlwith proper model settingsAPI keys must be set:
.envfile with required credentials
osprey export-config#
Export the frameworkβs default configuration for reference.
Syntax#
osprey export-config [OPTIONS]
Options#
--project PATH/-p PATHProject directory to use. If not specified, uses
OSPREY_PROJECTenvironment variable or current directory.This affects which projectβs configuration is exported.
--output PATH/-o PATHSave configuration to file instead of printing to console.
Examples#
View configuration:
osprey export-config
View specific projectβs configuration:
osprey export-config --project ~/projects/my-agent
Save to file:
osprey export-config --output osprey-defaults.yml
Export from specific project and save:
osprey export-config --project ~/agent --output agent-config.yml
Use as reference when customizing:
# Export defaults
osprey export-config --output reference.yml
# Compare with your config
diff reference.yml config.yml
Use Cases#
Discover available options - See all configuration fields and their defaults
Reference template - Use as starting point for custom configurations
Troubleshooting - Compare your config with framework defaults
Documentation - Understand configuration structure
Configuration Structure#
The exported configuration includes:
Models: LLM provider configurations (orchestrator, classifier, code generator)
Services: Jupyter, OpenWebUI, Pipelines settings
Execution Control: Timeouts, retry policies, safety limits
File Paths: Directory structures and artifact locations
Logging: Log levels and output settings
Environment Variables#
The framework uses environment variables for API keys, paths, and deployment-specific configuration.
For a complete list of all supported environment variables with descriptions and examples, see the Environment Variables section in the Installation Guide.
Quick Reference:
# Required
PROJECT_ROOT=/path/to/your/project
OPENAI_API_KEY=sk-... # Or ANTHROPIC_API_KEY, GOOGLE_API_KEY, CBORG_API_KEY
# Optional - Multi-project support (New in v0.7.7)
OSPREY_PROJECT=/path/to/project
# Optional - Other settings
LOCAL_PYTHON_VENV=/path/to/venv
TZ=America/Los_Angeles
CONFIG_FILE=custom-config.yml
# Proxy settings (if needed)
HTTP_PROXY=http://proxy:8080
NO_PROXY=localhost,127.0.0.1
OSPREY_PROJECTDefault project directory for all commands. Allows working with a specific project from any location without using the
--projectflag on every command.Priority: Lower than
--projectflag, higher than current directory.Example:
export OSPREY_PROJECT=~/projects/my-agent osprey chat # Uses ~/projects/my-agent osprey deploy status # Uses ~/projects/my-agent
Common Workflows#
Complete Project Setup#
# 1. Install framework
pip install osprey-framework
# 2. Create project
osprey init weather-agent --template hello_world_weather
cd weather-agent
# 3. Configure environment
cp .env.example .env
# Edit .env with your API keys
# 4. Update config (optional)
# Edit config.yml as needed
# 5. Deploy services
osprey deploy up --detached
# 6. Start chat
osprey chat
Development Workflow#
# Start services for development
osprey deploy up
# In another terminal, make changes to your code
# Test with chat interface
osprey chat
# Rebuild containers if needed
osprey deploy rebuild
# Clean up
osprey deploy clean
Framework Development Workflow#
If youβre developing the framework itself:
# Start services with local framework
osprey deploy up --dev
# Make changes to framework code
# Rebuild to test changes
osprey deploy rebuild --dev
# Verify local framework is used
podman exec jupyter-read pip show osprey
Multi-Project Workflows#
New in v0.7.7: Multi-Project Support
Work with multiple projects simultaneously using the --project flag or FRAMEWORK_PROJECT environment variable.
Scenario 1: Parallel Development
Work on multiple projects from a central location:
# Check status of all projects
osprey deploy status --project ~/projects/weather-agent
osprey deploy status --project ~/projects/turbine-monitor
osprey deploy status --project ~/projects/als-assistant
# Start chat with specific project
osprey chat --project ~/projects/weather-agent
Scenario 2: Dedicated Terminal per Project
Use environment variables for persistent project selection:
# Terminal 1: Weather Agent
export OSPREY_PROJECT=~/projects/weather-agent
osprey deploy up --detached
osprey chat
# Terminal 2: Turbine Monitor
export OSPREY_PROJECT=~/projects/turbine-monitor
osprey deploy up --detached
osprey health
# Terminal 3: Jump between projects
osprey chat --project ~/projects/weather-agent
osprey chat --project ~/projects/turbine-monitor
Scenario 3: CI/CD Pipeline
Automate deployment and testing across multiple projects:
#!/bin/bash
# Deploy and test multiple projects
PROJECTS=(
~/projects/weather-agent
~/projects/turbine-monitor
~/projects/als-assistant
)
for project in "${PROJECTS[@]}"; do
echo "Deploying $project..."
osprey deploy up --detached --project "$project"
osprey health --project "$project"
done
Scenario 4: Development + Production
Work with development and production configurations:
# Development environment
export OSPREY_PROJECT=~/dev/my-agent
osprey deploy up
# In another terminal, check production
osprey deploy status --project /opt/production/my-agent
Configuration Reference#
# View framework defaults
osprey export-config
# Export to file for reference
osprey export-config --output defaults.yml
# Create new project and compare configs
osprey init test-project
diff defaults.yml test-project/config.yml
Troubleshooting#
Command Not Found#
If osprey command is not found:
# Verify installation
pip show osprey-framework
# Reinstall if needed
pip install --upgrade osprey-framework
# Check pip bin directory is in PATH
python -m pip show osprey-framework
Services Wonβt Start#
# Check podman is running
podman --version
podman ps
# Check for port conflicts
lsof -i :8080
lsof -i :9099
# Try starting services in foreground to see errors
osprey deploy up
Configuration Errors#
# Validate against framework defaults
osprey export-config --output defaults.yml
# Check your config syntax
cat config.yml
# Ensure environment variables are set
cat .env
Chat Not Responding#
# Verify services are running
osprey deploy status
podman ps
# Check API keys are set
cat .env
# Verify model configuration
grep -A 10 "models:" config.yml
See also
- Convention over Configuration: Configuration-Driven Registry Patterns
Framework architecture and conventions
- Installation & Setup
Installation and setup guide
- Container Deployment
Container deployment details