@aigne/cli
TypeScript icon, indicating that this package has built-in type declarations

1.9.0 • Public • Published

@aigne/cli

GitHub star chart Open Issues codecov NPM Version Elastic-2.0 licensed

English | 中文

Command-line tool for AIGNE Framework, providing convenient development and management capabilities.

Introduction

@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.

Features

  • 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

Installation

Using npm

npm install -g @aigne/cli

Using yarn

yarn global add @aigne/cli

Using pnpm

pnpm add -g @aigne/cli

Basic Commands

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 Command

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)

Run Command

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

Test Command

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 Command

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

License

Elastic-2.0

Readme

Keywords

none

Package Sidebar

Install

npm i @aigne/cli

Weekly Downloads

63

Version

1.9.0

License

Elastic-2.0

Unpacked Size

63.8 kB

Total Files

43

Last publish

Collaborators

  • li-yechao
  • wangshijun