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-app
This 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-check
evaluateโ
Run quality gate evaluation against a play's guardrails:
npx frootai evaluate --play 01-enterprise-rag
Output:
๐ 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 passed
costโ
Estimate monthly Azure costs for a play:
# Development environment
npx frootai cost --play 01 --scale dev
# Production environment
npx frootai cost --play 01 --scale prod
validateโ
Validate all primitives in the repository:
npx frootai validate
This 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