Generate
This page describes the AI-assisted generation commands in the Nestbox AI CLI. The generate command group uses an AI agent (Anthropic Claude or OpenAI GPT) to produce validated configuration files from plain-English instruction files. The agent writes, validates against the schema, and iterates automatically until the output is valid.
Generate Project
Generate a new Nestbox AI project from templates:
nestbox generate project <folder>
Parameters:
<folder>– Name of the folder to create the project in
Options:
--lang <language>– Project language (ts|js)--template <type>– Template type (agent|chatbot)--instanceName <name>– Name of the compute instance--project <projectId>– Project ID
Examples:
# Generate a TypeScript agent project
nestbox generate project my-agent --lang ts --template agent
# Generate a JavaScript chatbot project
nestbox generate project my-chatbot --lang js --template chatbot
Generate Document Processing Configuration
Generate a document processing pipeline configuration (config.yaml and eval.yaml) from a plain-English instructions file using AI.
The agent reads your instructions, writes both files, validates each against their schemas, and iterates automatically until both pass validation. Supports Anthropic Claude and OpenAI GPT — provide one API key to select the provider.
nestbox generate doc-proc --file <path> --output <dir> [--anthropicApiKey <key> | --openAiApiKey <key>]
Required options:
-f, --file <path>– Path to a Markdown file describing what the pipeline should do-o, --output <dir>– Output directory whereconfig.yamlandeval.yamlwill be written
API key (one required):
--anthropicApiKey <key>– Use Claude (Anthropic). Also readsANTHROPIC_API_KEYenv var--openAiApiKey <key>– Use GPT (OpenAI). Also readsOPENAI_API_KEYenv var
When both are provided, Anthropic takes precedence.
Optional options:
--model <model>– Model ID. Defaults toclaude-sonnet-4-6(Anthropic) orgpt-4o(OpenAI)--maxIterations <n>– Maximum agent iterations before giving up (default:8)
Output files:
config.yaml— document processing pipeline configurationeval.yaml— evaluation test cases for the pipeline
Examples:
# Anthropic Claude
nestbox generate doc-proc \
--file ./instructions.md \
--output ./pipeline \
--anthropicApiKey sk-ant-...
# OpenAI GPT
nestbox generate doc-proc \
--file ./instructions.md \
--output ./pipeline \
--openAiApiKey sk-...
# Via environment variables
export ANTHROPIC_API_KEY=sk-ant-...
nestbox generate doc-proc --file ./instructions.md --output ./pipeline
Example instructions file (instructions.md):
# Contract Processing Pipeline
Process PDF contracts. Extract text with OCR using rapidocr.
Chunk with the docling_hybrid strategy, max 1200 tokens, 200 overlap.
Enable GraphRAG indexing.
Eval test cases:
- "What are the payment terms?" → expected answer should mention Net 30 or similar
- "Who are the parties to this agreement?"
Generate Report Composer Configuration
Generate a GraphRAG report composer configuration (report.yaml) from a plain-English instructions file using AI.
The agent reads your instructions, writes the report configuration, validates it against the schema (v2.2), and iterates automatically until it passes — it will not finish until the file is valid. Supports Anthropic Claude and OpenAI GPT — provide one API key to select the provider.
nestbox generate report-composer --file <path> --output <dir> [--anthropicApiKey <key> | --openAiApiKey <key>]
Required options:
-f, --file <path>– Path to a Markdown file describing the report to generate-o, --output <dir>– Output directory wherereport.yamlwill be written
API key (one required):
--anthropicApiKey <key>– Use Claude (Anthropic). Also readsANTHROPIC_API_KEYenv var--openAiApiKey <key>– Use GPT (OpenAI). Also readsOPENAI_API_KEYenv var
When both are provided, Anthropic takes precedence.
Optional options:
--model <model>– Model ID. Defaults toclaude-sonnet-4-6(Anthropic) orgpt-4o(OpenAI)--maxIterations <n>– Maximum agent iterations before giving up (default:5)
Output files:
report.yaml— report composer configuration (schema version 2.2)
Examples:
# Anthropic Claude
nestbox generate report-composer \
--file ./report-instructions.md \
--output ~/Downloads/my-report \
--anthropicApiKey sk-ant-...
# OpenAI GPT
nestbox generate report-composer \
--file ./report-instructions.md \
--output ~/Downloads/my-report \
--openAiApiKey sk-...
# Via environment variable
export OPENAI_API_KEY=sk-...
nestbox generate report-composer --file ./report-instructions.md --output ~/Downloads/my-report
Example instructions file (report-instructions.md):
# Quarterly Board Report
Analyze the board deck PDF for Q4 2025.
Extract:
- Total ARR and net retention rate
- Net new ARR broken down by new business vs expansion
- Top 3 customer deals closed in the quarter
- Key risks and mitigation plans
The document is stored at repo:doc-abc123. Use ${OPENAI_API_KEY} for GraphRAG search
and ${LLAMAINDEX_API_KEY} for the LlamaIndex agent.
Include two guardrails: one to check all numbers have citations, one to detect fabricated data.