ElizaOS CLI
The ElizaOS Command Line Interface (CLI) provides a comprehensive set of tools to create, manage, and interact with ElizaOS projects and agents.
Installation
Install the ElizaOS CLI globally using npm:
npm install -g @elizaos/cli
Or use it directly with npx:
npx @elizaos/cli [command]
Available Commands
Command | Description |
---|---|
create | Create new projects, plugins, or agents |
start | Start an ElizaOS project or agent |
dev | Run a project in development mode with hot reloading |
agent | Manage agent configurations and state |
plugin | Manage plugins in your project |
project | Manage project configuration and settings |
env | Configure environment variables and API keys |
publish | Publish packages to npm registry |
update | Update ElizaOS components |
test | Run tests for your project |
Quick Start
Creating a new project
# Create a new project using the interactive wizard
npx @elizaos/cli create
# Or specify a name directly
npx @elizaos/cli create my-agent-project
Starting a project
# Navigate to your project directory
cd my-agent-project
# Start the project
npx @elizaos/cli start
Development mode
# Run in development mode with hot reloading
npx @elizaos/cli dev
Global Options
These options apply to most commands:
Option | Description |
---|---|
--help , -h | Display help information |
--version , -v | Display version information |
--debug | Enable debug logging |
--quiet | Suppress non-essential output |
--json | Output results in JSON format |
Working with Projects
ElizaOS organizes work into projects, which can contain one or more agents along with their configurations, knowledge files, and dependencies. The CLI provides commands to manage the entire lifecycle of a project:
- Create a new project with
create
- Configure settings with
env
- Develop using
dev
for hot reloading - Test functionality with
test
- Start in production with
start
- Share by publishing with
publish
Working with Plugins
Plugins extend the functionality of your agents. Manage them with the plugin
command:
# Add a plugin to your project
npx @elizaos/cli plugin add @elizaos/plugin-discord
# Remove a plugin
npx @elizaos/cli plugin remove @elizaos/plugin-discord
# List installed plugins
npx @elizaos/cli plugin list
Environment Configuration
Configure your API keys and environment variables with the env
command:
# Set OpenAI API key
npx @elizaos/cli env set OPENAI_API_KEY your-api-key
# List all environment variables
npx @elizaos/cli env list