Skip to main content

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 applyTo glob patterns are valid
  • Plugin plugin.json schema compliance
  • Hook hooks.json configuration

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โ€‹

OptionDescription
--helpShow help for a command
--versionShow CLI version
--verboseEnable detailed output
--jsonOutput as JSON (for piping)

Exit Codesโ€‹

CodeMeaning
0Success
1Validation or evaluation failure
2Invalid arguments

Versionโ€‹

Current version synced with main FrootAI release.

See Alsoโ€‹