Skip to main content

CLI Commands

Complete reference for all AG-Kit CLI commands.

Global Commands

ag-kit init

Initialize a new AG-Kit project.
ag-kit init [project-name] [options]
Options:
  • --template - Choose project template (react, miniprogram, node)
  • --framework - Select agent framework (langgraph, langchain, dify)
  • --typescript - Use TypeScript
  • --git - Initialize git repository
Examples:
# Basic initialization
ag-kit init my-agent

# With template and framework
ag-kit init my-agent --template react --framework langgraph

# TypeScript project
ag-kit init my-agent --typescript

ag-kit dev

Start development server.
ag-kit dev [options]
Options:
  • --port - Specify port number
  • --host - Specify host address
  • --open - Open browser automatically
Examples:
# Start on default port
ag-kit dev

# Custom port
ag-kit dev --port 3001

# Open browser
ag-kit dev --open

ag-kit build

Build project for production.
ag-kit build [options]
Options:
  • --output - Output directory
  • --minify - Minify output
  • --sourcemap - Generate source maps

ag-kit deploy

Deploy project to cloud platform.
ag-kit deploy [platform] [options]
Platforms:
  • vercel - Deploy to Vercel
  • netlify - Deploy to Netlify
  • aws - Deploy to AWS
  • docker - Build Docker image

Project Commands

ag-kit generate

Generate code templates.
ag-kit generate [type] [name] [options]
Types:
  • component - React component
  • page - Mini Program page
  • agent - Agent configuration
  • adapter - Framework adapter

ag-kit test

Run tests.
ag-kit test [options]
Options:
  • --watch - Watch mode
  • --coverage - Generate coverage report
  • --verbose - Verbose output

ag-kit lint

Lint code.
ag-kit lint [options]
Options:
  • --fix - Auto-fix issues
  • --format - Output format (stylish, json, table)