The MoFA CLI is a powerful command-line tool for creating, managing, and deploying AI agents. It provides a complete set of commands for project scaffolding, agent lifecycle management, configuration, and more.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mofa-org/mofa/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Verify Installation
Quick Start
Command Structure
The MoFA CLI follows a hierarchical command structure:Global Flags
| Flag | Description | Default |
|---|---|---|
-v, --verbose | Enable verbose output | false |
--output-format <FORMAT> | Output format (text, json, table) | text |
-c, --config <PATH> | Configuration file path | - |
--tui | Launch Terminal UI mode | false |
-h, --help | Print help information | - |
-V, --version | Print version information | - |
Available Commands
mofa new
Create a new agent project from templates
mofa agent
Manage agent lifecycle (start, stop, list, status)
mofa plugin
Install and manage plugins
mofa session
View and manage agent sessions
mofa config
Manage global configuration
mofa db
Database initialization and migrations
Terminal UI Mode
Launch the interactive Terminal User Interface:- Interactive agent management
- Real-time status monitoring
- Session browsing
- Plugin discovery
Environment Variables
OpenAI Configuration
MoFA Configuration
Configuration Files
The CLI looks for configuration files in the following locations (in order):- Path specified by
--configflag ./agent.yml(current directory)./agent.yaml./agent.toml./agent.json~/.config/mofa/config.yml
Supported Formats
- YAML:
.yml,.yaml(recommended) - TOML:
.toml - JSON:
.json,.json5 - INI:
.ini - RON:
.ron
Exit Codes
| Code | Description |
|---|---|
0 | Success |
1 | General error |
2 | Configuration error |
3 | Agent not found |
4 | Agent already running |
5 | Database connection error |
101 | Network error |
Shell Completion
Generate shell completion scripts:Shell completion generation requires building with the
clap_complete feature.Output Formats
Most commands support multiple output formats:Text Format (Default)
JSON Format
Table Format
Debugging
Enable verbose logging:Common Workflows
Creating and Starting an Agent
Managing Running Agents
Session Management
Getting Help
Get help for any command:Next Steps
Create Projects
Learn about project templates and scaffolding
Manage Agents
Start, stop, and monitor agents
Configuration
Configure MoFA settings
Examples
Explore example projects