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.md
The 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 --waf
Options:
| 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 errors
validate:primitivesโ
Validate all primitives in the repository against their JSON schemas.
npm run validate:primitives
What 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 agents
evaluateโ
Run the evaluation pipeline for the current play against configured thresholds.
npx frootai evaluate
Options:
| 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 prod
Play 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/mo
searchโ
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,07
Related 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