@agentforge/cli
v0.15.8
Published
CLI for AgentForge to scaffold TypeScript AI agent projects, generate boilerplate, and manage local development workflows.
Maintainers
Readme
@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
# Global installation (recommended)
npm install -g @agentforge/cli
# Or use with npx (no installation needed)
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
# With options
agentforge create my-project --template full --package-manager pnpmOptions:
-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
# With options
agentforge dev --port 4000Options:
-p, --port <port>- Port number [default: 3000]--no-open- Do not open browser
build
Build for production.
agentforge build
# With options
agentforge build --no-minify --no-sourcemapOptions:
--no-minify- Skip minification--no-sourcemap- Skip sourcemap generation
test
Run tests with coverage.
agentforge test
# With options
agentforge test --watch
agentforge test --ui
agentforge test --coverageOptions:
-w, --watch- Watch mode--ui- Open test UI--coverage- Generate coverage report
lint
Lint and format code.
agentforge lint
# With options
agentforge lint --fixOptions:
--fix- Auto-fix issues--no-format- Skip formatting
Agent Management
agent:create <name>
Create a new agent.
agentforge agent:create myAgent
# With options
agentforge agent:create myAgent --pattern plan-executeOptions:
-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 (
.mdfiles) - Tool injection support
- Feature flags
- Configuration validation with Zod
- Comprehensive test suite
- Full documentation
agentforge agent:create-reusable customer-support
# With options
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.mdNote: The agent uses loadPrompt from @agentforge/core for secure prompt template loading with built-in injection protection.
Next Steps After Creation:
cd customer-supportpnpm install- Edit
prompts/system.mdto customize the prompt - Edit
src/index.tsto add tools and configuration pnpm testto run testspnpm buildto build
See Also:
agent:list
List all agents.
agentforge agent:list
# With verbose output
agentforge agent:list --verboseOptions:
-v, --verbose- Show detailed information
agent:test <name>
Test a specific agent.
agentforge agent:test myAgent
# With watch mode
agentforge agent:test myAgent --watchOptions:
-w, --watch- Watch mode
agent:deploy <name>
Deploy an agent.
agentforge agent:deploy myAgent
# With options
agentforge agent:deploy myAgent --environment staging --dry-runOptions:
-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
# With options
agentforge tool:create myTool --category webOptions:
-c, --category <category>- Tool category (web, data, file, utility) [default: utility]--no-test- Skip test generation
tool:list
List all tools.
agentforge tool:list
# Filter by category
agentforge tool:list --category web --verboseOptions:
-c, --category <category>- Filter by category-v, --verbose- Show detailed information
tool:test <name>
Test a specific tool.
agentforge tool:test myTool
# With watch mode
agentforge tool:test myTool --watchOptions:
-w, --watch- Watch mode
tool:publish <name>
Publish a tool to npm.
agentforge tool:publish myTool
# With options
agentforge tool:publish myTool --tag beta --dry-runOptions:
--tag <tag>- npm tag [default: latest]--dry-run- Dry run without actual publishing
📖 Documentation
🔗 Links
- GitHub Repository
- npm Package
- Changelog - See what's new before upgrading
- Report Issues
📚 Related Packages
- @agentforge/core - Core abstractions
- @agentforge/patterns - Agent patterns
- @agentforge/tools - Standard tools
- @agentforge/testing - Testing utilities
License
MIT © 2026 Tom Van Schoor
