English | 中文
Command-line tool for AIGNE Framework, providing convenient development and management capabilities.
@aigne/cli
is the official command-line tool for AIGNE Framework, designed to simplify the development, testing, and deployment processes for AIGNE applications. It provides a series of useful commands to help developers quickly create projects, run agents, test code, and deploy applications.
- Project Creation: Quickly create new AIGNE projects with predefined file structures and configurations
- Agent Running: Easily run and test AIGNE agents
- Testing Support: Built-in test command for unit testing and integration testing
- MCP Services: Support for launching agents as MCP servers for integration with external systems
- Interactive Interface: Beautiful command-line interface providing an intuitive user experience
- Multi-model Support: Support for OpenAI, Claude, XAI, and other model providers
npm install -g @aigne/cli
yarn global add @aigne/cli
pnpm add -g @aigne/cli
AIGNE CLI provides the following main commands:
# Display help information
aigne --help
# Create a new project
aigne create [path]
# Run an agent
aigne run [path]
# Run tests
aigne test [path]
# Start MCP server
aigne serve [path] --mcp
Create a new AIGNE project with agent configuration files.
# Create a project in the current directory (will prompt for project name)
aigne create
# Create a project at the specified path
aigne create my-project
The interactive creation process will ask for:
- Project name
- Project template (currently supports the default template)
Launch a chat loop with the specified agent.
# Run the agent in the current directory
aigne run
# Run the agent at the specified path
aigne run path/to/agents
# Run the agent from a remote URL
aigne run https://example.com/aigne-project
Available options:
-
--agent <agent>
- Specify the agent name to use (defaults to the first agent found) -
--download-dir <dir>
- Specify the directory to download the package to (used in URL mode) -
--model-provider <provider>
- Specify the model provider (openai, claude, xai) -
--model-name <model>
- Specify the model name -
--verbose
- Enable verbose logging
Run tests in the specified agents directory.
# Test the agents in the current directory
aigne test
# Test the agents at the specified path
aigne test path/to/agents
Serve the agents in the specified directory as a MCP server.
# Start MCP server on default port 3000
aigne serve --mcp
# Start MCP server on specified port
aigne serve --mcp --port 3001
# Start MCP server for agents at specified path
aigne serve path/to/agents --mcp
Elastic-2.0