Skip to Content
API ReferenceCLI Commands

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

CommandDescription
npx frootai scaffold <play>Initialize a solution play in current directory
npx frootai validate --wafValidate WAF alignment of current play
npm run validate:primitivesValidate all primitives (agents, skills, hooks)
npx frootai primitives --type <type>Browse primitives by type
npx frootai evaluateRun 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:

FlagDescriptionDefault
--dir <path>Target directory. (current)
--no-infraSkip infrastructure (Bicep) filesfalse
--no-evalSkip evaluation pipelinefalse

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:

FlagDescription
--wafCheck WAF pillar alignment
--strictFail on warnings (not just errors)
--fixAuto-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-hyphen convention
  • YAML frontmatter has all required fields per type
  • Skill folder names match the name field in frontmatter
  • Hook events use only allowed event types
  • Plugin version is 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:

FlagDescriptionDefault
--threshold <n>Override default threshold4.0
--metricsComma-separated metrics listall

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 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

Last updated on