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

Last updated on