@agentforge/cli
CLI tool for AgentForge - scaffolding, development, testing, and deployment

🎉 Status: Production Ready & Published
156 tests passing | 98.11% coverage | 13 commands | 4 project templates
📦 Installation
npm install -g @agentforge/cli
npx @agentforge/cli create my-agent-project
✨ Features
- 🚀 Project Scaffolding - 4 templates (minimal, full, api, cli)
- 🛠️ Development Tools - Dev server, build, test commands
- 📦 Deployment - Deploy to Docker, Kubernetes, cloud platforms
- 🔧 Code Generation - Generate agents, tools, middleware
- ✅ Validation - Project structure and configuration validation
- 📊 Diagnostics - Health checks and issue detection
- 🔄 Upgrades - Dependency and framework upgrades
- 📝 Configuration - Manage project settings
Commands
Project Scaffolding
create <project-name>
Create a new AgentForge project with interactive setup.
agentforge create my-project
agentforge create my-project --template full --package-manager pnpm
Options:
-t, --template <template> - Project template (minimal, full, api, cli) [default: minimal]
-p, --package-manager <pm> - Package manager (npm, pnpm, yarn) [default: pnpm]
--no-install - Skip dependency installation
--no-git - Skip git initialization
Development Commands
dev
Start development server with hot reload.
agentforge dev
agentforge dev --port 4000
Options:
-p, --port <port> - Port number [default: 3000]
--no-open - Do not open browser
build
Build for production.
agentforge build
agentforge build --no-minify --no-sourcemap
Options:
--no-minify - Skip minification
--no-sourcemap - Skip sourcemap generation
test
Run tests with coverage.
agentforge test
agentforge test --watch
agentforge test --ui
agentforge test --coverage
Options:
-w, --watch - Watch mode
--ui - Open test UI
--coverage - Generate coverage report
lint
Lint and format code.
agentforge lint
agentforge lint --fix
Options:
--fix - Auto-fix issues
--no-format - Skip formatting
Agent Management
agent:create <name>
Create a new agent.
agentforge agent:create myAgent
agentforge agent:create myAgent --pattern plan-execute
Options:
-p, --pattern <pattern> - Agent pattern (react, plan-execute, reflection, multi-agent) [default: react]
--no-test - Skip test generation
agent:create-reusable <name>
Create a new reusable agent using the production template.
This command scaffolds a complete reusable agent with:
- Factory function pattern
- External prompt templates (
.md files)
- Tool injection support
- Feature flags
- Configuration validation with Zod
- Comprehensive test suite
- Full documentation
agentforge agent:create-reusable customer-support
agentforge agent:create-reusable data-analyst --description "Analyze data and generate insights" --author "Your Name"
Options:
-d, --description <description> - Agent description
-a, --author <author> - Author name
What Gets Created:
customer-support/
├── src/
│ ├── index.ts # Agent factory function
│ └── index.test.ts # Comprehensive tests
├── prompts/
│ └── system.md # External prompt template
├── package.json
├── tsconfig.json
├── vitest.config.ts
└── README.md
Note: The agent uses loadPrompt from @agentforge/core for secure prompt template loading with built-in injection protection.
Next Steps After Creation:
cd customer-support
pnpm install
- Edit
prompts/system.md to customize the prompt
- Edit
src/index.ts to add tools and configuration
pnpm test to run tests
pnpm build to build
See Also:
agent:list
List all agents.
agentforge agent:list
agentforge agent:list --verbose
Options:
-v, --verbose - Show detailed information
agent:test <name>
Test a specific agent.
agentforge agent:test myAgent
agentforge agent:test myAgent --watch
Options:
agent:deploy <name>
Deploy an agent.
agentforge agent:deploy myAgent
agentforge agent:deploy myAgent --environment staging --dry-run
Options:
-e, --environment <env> - Deployment environment [default: production]
--dry-run - Dry run without actual deployment
Tool Management
tool:create <name>
Create a new tool.
agentforge tool:create myTool
agentforge tool:create myTool --category web
Options:
-c, --category <category> - Tool category (web, data, file, utility) [default: utility]
--no-test - Skip test generation
tool:list
List all tools.
agentforge tool:list
agentforge tool:list --category web --verbose
Options:
-c, --category <category> - Filter by category
-v, --verbose - Show detailed information
tool:test <name>
Test a specific tool.
agentforge tool:test myTool
agentforge tool:test myTool --watch
Options:
tool:publish <name>
Publish a tool to npm.
agentforge tool:publish myTool
agentforge tool:publish myTool --tag beta --dry-run
Options:
--tag <tag> - npm tag [default: latest]
--dry-run - Dry run without actual publishing
📖 Documentation
🔗 Links
📚 Related Packages
License
MIT © 2026 Tom Van Schoor