CLI
The FrootAI CLI (npx frootai) provides command-line access to play initialization, primitive scaffolding, evaluation, cost estimation, and validation.
Installation
No installation needed β run directly with npx:
npx frootai [command]Or install globally:
npm install -g frootai
frootai [command]Commands
init
Initialize a new solution play from a template:
npx frootai init --play 01 --name my-rag-appThis scaffolds the full Play 101 golden template structure:
my-rag-app/
βββ agent.md
βββ .github/
β βββ copilot-instructions.md
β βββ agents/
β βββ instructions/
β βββ skills/
β βββ hooks/
βββ .vscode/mcp.json
βββ config/
βββ infra/
βββ evaluation/
βββ spec/scaffold
Create individual primitives:
# Scaffold an agent
npx frootai scaffold agent --name fai-my-expert
# Scaffold a skill
npx frootai scaffold skill --name fai-deploy-my-app
# Scaffold an instruction
npx frootai scaffold instruction --name my-standards
# Scaffold a hook
npx frootai scaffold hook --name fai-my-checkevaluate
Run quality gate evaluation against a playβs guardrails:
npx frootai evaluate --play 01-enterprise-ragOutput:
π FAI Quality Evaluation Report
Play: 01-enterprise-rag (v2.0.0)
β
groundedness: 97.0% (threshold: 0.95)
β
coherence: 93.0% (threshold: 0.90)
β
relevance: 88.0% (threshold: 0.85)
β
All quality gates passedcost
Estimate monthly Azure costs for a play:
# Development environment
npx frootai cost --play 01 --scale dev
# Production environment
npx frootai cost --play 01 --scale prodvalidate
Validate all primitives in the repository:
npx frootai validateThis checks:
- Agent frontmatter (description 10+ chars, valid WAF pillars)
- Skill names match folder names
- Instruction
applyToglob patterns are valid - Plugin
plugin.jsonschema compliance - Hook
hooks.jsonconfiguration
primitives
Browse the primitive catalog:
# List all agents
npx frootai primitives --type agents
# List all skills
npx frootai primitives --type skills
# Search primitives
npx frootai primitives --search "RAG"compare
Compare solution plays or AI models:
# Compare plays
npx frootai compare --plays 01,03,07
# Compare models
npx frootai compare --models "gpt-4o,gpt-4o-mini" --use-case "RAG chatbot"Global Options
| Option | Description |
|---|---|
--help | Show help for a command |
--version | Show CLI version |
--verbose | Enable detailed output |
--json | Output as JSON (for piping) |
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Validation or evaluation failure |
2 | Invalid arguments |
Version
Current version synced with main FrootAI release.
See Also
- Quick Start β getting started guide
- MCP Server β MCP protocol access
- npm SDK β programmatic Node.js access
Last updated on