Skip to main content

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.

tip

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
info

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
warning

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