CLI Commands
The FrootAI CLI provides terminal-based access to scaffolding, validation, search, and cost estimation. All commands run via npx β no global install required.
For programmatic or agent-driven access to the same capabilities, use the MCP Tools instead.
Command Reference
| Command | Description |
|---|---|
npx frootai scaffold <play> | Initialize a solution play in current directory |
npx frootai validate --waf | Validate WAF alignment of current play |
npm run validate:primitives | Validate all primitives (agents, skills, hooks) |
npx frootai primitives --type <type> | Browse primitives by type |
npx frootai evaluate | Run evaluation pipeline |
npx frootai cost <play> | Estimate Azure costs |
npx frootai search <query> | Search knowledge base |
npx frootai compare <plays> | Compare solution plays |
scaffold
Initialize a solution play directory with the golden template structure.
npx frootai scaffold <play-id>Options:
| Flag | Description | Default |
|---|---|---|
--dir <path> | Target directory | . (current) |
--no-infra | Skip infrastructure (Bicep) files | false |
--no-eval | Skip evaluation pipeline | false |
Example:
npx frootai scaffold 01-enterprise-ragβ Created .github/copilot-instructions.md
β Created .github/agents/builder.agent.md
β Created .github/agents/reviewer.agent.md
β Created .github/agents/tuner.agent.md
β Created .github/instructions/
β Created .github/skills/
β Created config/openai.json
β Created config/guardrails.json
β Created infra/main.bicep
β Created evaluation/
β Created fai-manifest.json
β Created agent.mdThe scaffold follows the Play 101 golden template. See fai-manifest.json for the full structure specification and JSON Schemas for field validation rules.
validate --waf
Validate that the current play aligns with the Azure Well-Architected Framework pillars declared in its fai-manifest.json.
npx frootai validate --wafOptions:
| Flag | Description |
|---|---|
--waf | Check WAF pillar alignment |
--strict | Fail on warnings (not just errors) |
--fix | Auto-fix trivial issues (e.g., missing applyTo) |
Example output:
Validating WAF alignment for play 01-enterprise-rag...
β reliability β 3 primitives aligned
β security β 5 primitives aligned
β cost-optimization β missing token budget in config/openai.json
β operational-excellence β CI workflow present
β performance-efficiency β caching configured
β responsible-ai β content safety hook present
Result: 5 passed, 1 warning, 0 errorsvalidate:primitives
Validate all primitives in the repository against their JSON schemas.
npm run validate:primitivesWhat it checks:
- File naming follows
lowercase-hyphenconvention - YAML frontmatter has all required fields per type
- Skill folder names match the
namefield in frontmatter - Hook events use only allowed event types
- Plugin
versionis valid semver
Always run validate:primitives before committing. CI will reject PRs that fail validation with non-zero error count.
primitives
Browse primitives by type interactively.
npx frootai primitives --type <type>Supported types: agents, instructions, skills, hooks, plugins, workflows, cookbook
Example:
npx frootai primitives --type agentsevaluate
Run the evaluation pipeline for the current play against configured thresholds.
npx frootai evaluateOptions:
| Flag | Description | Default |
|---|---|---|
--threshold <n> | Override default threshold | 4.0 |
--metrics | Comma-separated metrics list | all |
Thresholds are loaded from config/guardrails.json. See JSON Schemas for the guardrails schema.
cost
Estimate monthly Azure costs for a solution play.
npx frootai cost <play-number> [--scale <dev|prod>]Example:
npx frootai cost 01 --scale prodPlay 01 β Enterprise RAG (prod scale)
ββββββββββββββββββββββββββββββββββββββ
Azure OpenAI (GPT-4o) $800/mo
Azure AI Search (S1) $250/mo
Azure App Service (P1v3) $140/mo
Azure Cosmos DB (Serverless) $50/mo
ββββββββββββββββββββββββββββββββββββββ
Total $1,240/mosearch
Search the FrootAI knowledge base from your terminal.
npx frootai search "<query>"Example:
npx frootai search "RAG chunking strategies"compare
Compare two or three solution plays side-by-side.
npx frootai compare <play1>,<play2>[,<play3>]Example:
npx frootai compare 01,07Related Pages
- MCP Tools Reference β programmatic access to the same capabilities
- JSON Schemas β validation rules for all FrootAI files
- fai-manifest.json β the play wiring specification