Run Claude Code, OpenAI Codex, and Gemini CLI in parallel. Get diverse perspectives from multiple AI models and synthesize them into unified recommendations.
architecture-review.yaml
parallel-process:claude-analysis:input:STDINmodel:claude-codeaction:"Analyze architecture and trade-offs"output:$CLAUDE_RESULTgemini-analysis:input:STDINmodel:gemini-cliaction:"Identify patterns and best practices"output:$GEMINI_RESULTcodex-analysis:input:STDINmodel:openai-codexaction:"Focus on implementation structure"output:$CODEX_RESULTsynthesize:input:|
Claude: $CLAUDE_RESULT
Gemini: $GEMINI_RESULT
Codex: $CODEX_RESULTmodel:claude-codeaction:"Combine into unified recommendation"output:STDOUT
Iterative refinement until the LLM decides work is complete. Perfect for code generation, document writing, and any task that benefits from self-improvement.
iterative-implementation.yaml
implement:agentic_loop:max_iterations:5exit_condition:llm_decidesallowed_paths:[./src, ./tests]tools:[Read, Write, Edit, Bash]input:STDINmodel:claude-codeaction:|
Iteration {{ loop.iteration }}.
Previous: {{ loop.previous_output }}
Implement, test, and refine. Say DONE when complete.output:STDOUT
Smart defaults: If you omit allowed_paths, comanda auto-infers them from the workflow directory and common project subdirectories (src, lib, test, docs, build). Simple workflows "just work" without explicit configuration.
Agentic loops can refine their own prompt between iterations. The latest result feeds a prompt-improvement pass, then the next iteration runs with a tighter, more specific instruction through {{ loop.current_prompt }}.
self-improving-loop.yaml
draft-and-refine:input:STDINmodel:claude-codeagentic_loop:max_iterations:5exit_condition:llm_decidesprompt_improvement:enabled:trueinstructions:|
Tighten the next prompt using the latest result.
Preserve what worked, remove ambiguity, and make
the next pass more specific and actionable.action:|
{{ loop.current_prompt }}
Previous result:
{{ loop.previous_output }}
Improve the output. Say DONE when it is ready.output:draft.md
Use this for long-form writing, code improvement, research synthesis, prompt tuning, or any workflow where each pass should learn from the last instead of simply retrying the same instruction.
comanda improve edits an existing YAML workflow from plain-English feedback, validates the generated workflow, and retries with validation errors when needed. It is the fastest path from a rough pipeline to a cleaner, more agentic one.
Terminal
# Break a workflow into more explicit steps
$ comanda improve workflow.yaml "break this into 5 steps instead of 3"# Convert a linear workflow into an agentic long loop
$ comanda improve workflow.yaml "convert this to an agentic loop with prompt_improvement enabled"# Add policy or context checks before the main task
$ comanda improve workflow.yaml "check POLICY.md before the analysis step"
The improve command uses your configured generation model, can be overridden with --model, and understands the same DSL guide used by comanda generate.
Watch your workflows run in real-time with a rich terminal UI. See iteration progress, token usage estimation, elapsed time, and resource consumptionโall in a clean dashboard.
Debug panel: Press d to show a scrollable debug panel when running with --debug or --verbose. All debug output is captured cleanly without breaking the TUI layout.
Run multiple Claude Code sessions in parallel on the same repo without conflicts. Comanda automatically manages Git worktrees so each agent gets an isolated working copy.
Terminal
# Run two agentic tasks in parallelโno conflicts!
$ comanda process parallel-features.yaml --live
# Each agent works in its own worktree# Changes are merged back when complete
Run independent steps concurrently for faster workflows. Automatically waits for all parallel steps before continuing.
model-comparison.yaml
parallel-process:gpt4:input:NAmodel:gpt-4oaction:"Write a function to parse JSON"output:gpt4-solution.pyclaude:input:NAmodel:claude-3-5-sonnet-latestaction:"Write a function to parse JSON"output:claude-solution.pycompare:input:[gpt4-solution.py, claude-solution.py]model:gpt-4o-miniaction:"Compare these implementations"output:STDOUT
Let the LLM decide when work is complete, route dynamically based on content, and handle failures gracefully.
LLM-Decides Exit
Agentic loops continue until the model says "DONE" โ no fixed iteration counts.
Conditional Steps
Skip steps based on previous outputs or environment variables.
Quality Gates
Validate outputs before proceeding. Retry on failure with backoff.
Variables & State
Pass data between steps with $VARIABLES. Template interpolation.
intelligent-pipeline.yaml
classify:input:STDINmodel:gpt-4o-miniaction:"Classify as: bug, feature, or docs. Output only the category."output:$CATEGORYhandle-bug:condition:"$CATEGORY == 'bug'"input:STDINmodel:claude-codeagentic_loop:exit_condition:llm_decidesmax_iterations:10action:"Fix this bug. Run tests. Say DONE when fixed."output:STDOUThandle-docs:condition:"$CATEGORY == 'docs'"input:STDINmodel:gemini-2.5-flashaction:"Update documentation accordingly"output:docs-update.md
Connect to any LLM provider. Cloud APIs, local models via Ollama, enterprise deployments via AWS Bedrock, or agentic coding toolsโall in the same workflow.
Category
Provider
Models
Config
Cloud APIs
Anthropic
Claude 4.5 (Opus, Sonnet, Haiku), Claude 4, 3.7, 3.5
ANTHROPIC_API_KEY
OpenAI
GPT-5.1, GPT-5, GPT-4o, o3, o4-mini
OPENAI_API_KEY
Google
Gemini 3, 2.5 (Pro, Flash), 1.5
GOOGLE_API_KEY
X.AI
Grok-4, Grok-4-Heavy, Grok-Vision
XAI_API_KEY
DeepSeek
DeepSeek-Chat, Coder, Vision, Reasoner
DEEPSEEK_API_KEY
Moonshot
Moonshot v1 (8k, 32k, 128k)
MOONSHOT_API_KEY
Enterprise
AWS Bedrock
Claude, Nova, Llama via Converse API
AWS credentials
Local / Self-hosted
Ollama
Any model (Llama, Mistral, Qwen, etc.)
Auto-detected
vLLM
Any OpenAI-compatible endpoint
VLLM_ENDPOINT
Agentic Tools
Claude Code
claude-code, claude-code-opus
CLI installed
OpenAI Codex
openai-codex, openai-codex-o3
CLI installed
Gemini CLI
gemini-cli, gemini-cli-pro
CLI installed
Using AWS Bedrock
# Bedrock models use the bedrock/ prefixanalyze:model:bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0action:"Analyze this architecture"input:STDINoutput:STDOUT# AWS credentials from environment, ~/.aws/credentials, or IAM role# Set AWS_REGION (defaults to us-east-1)
Query execution, result streaming, schema introspection
Streams
STDIN, pipes
Unix pipeline integration, streaming output
batch-process.yaml
# Process all Go files in a directoryreview-code:input:./src/**/*.gomodel:claude-3-5-sonnet-latestaction:"Review each file for security issues"output:security-report.md# Analyze a webpage screenshotanalyze-ui:input:url:https://example.commodel:gpt-4oaction:"Analyze this UI for accessibility issues"output:STDOUT
Generate rich code context for AI workflows. Index codebases once, reuse across workflows. Compare multiple projects or aggregate context from several repos.
Terminal
# Index and register a codebase
$ comanda index capture ~/my-project -n myproject
# List all registered indexes
$ comanda index list
NAME PATH LAST INDEXED FORMAT FILES
myproject ~/my-project 2024-02-25 15:00 structured 142
# Incremental update โ only re-index changed files
$ comanda index update myproject
Scanning for changes... 3 files modified
Updated in 0.3s (vs 2.1s full)
# Check what changed since last index
$ comanda index diff myproject
multi-codebase-analysis.yaml
# Load indexes from registryload_context:codebase_index:use:[project1, project2]aggregate:truecompare:input:|
Compare these codebases:
${INDEX:project1}
${INDEX:project2}model:claude-codeaction:"Identify shared patterns and differences"output:comparison.md
TurboQuant compression: Indexes are automatically compressed using vector quantization and chunk deduplication, reducing size by up to 50% while preserving semantic quality. The comanda generate command also auto-detects available indexes in .comanda/ and includes them in the prompt context.
Building Rich Context with Agentic Loops
Combine indexing with agentic exploration to build deep, searchable knowledge bases. The agent explores the codebase iteratively, writing findings to a local search index (like qmd) for later retrieval.
build-knowledge-base.yaml
# Step 1: Create a structured index of the codebaseindex:tool:bashinput:"comanda index capture ./src -n myproject"output:$INDEX_RESULT# Step 2: Agentic exploration - agent decides when it's learned enoughexplore:input:|
Codebase index:
${INDEX:myproject}
You have access to the full codebase via Read tool.
Explore systematically: architecture, patterns, key modules.
For each significant finding, write a markdown doc to ./docs/
Say DONE when you've built comprehensive documentation.model:claude-codeallowed_paths:[., ./src, ./docs]agentic_loop:exit_condition:llm_decidesmax_iterations:50action:"Explore and document this codebase thoroughly"output:exploration-summary.md# Step 3: Index the generated docs for semantic searchbuild-search-index:tool:bashinput:"qmd index ./docs --name project-knowledge"output:STDOUT
Now you can query your knowledge base: qmd search "how does auth work" โ and get semantically relevant results from the agent's exploration. Great for onboarding, code review prep, or building RAG context for future workflows.
Define reusable, parameterized workflows as Markdown files with YAML frontmatter. Skills are Claude-compatible, discoverable, and can be invoked from the CLI or within other workflows.
~/.comanda/skills/summarize.md
---description:"Summarize a document or code file"arguments:file:description:"Path to file to summarize"required:trueformat:description:"Output format (bullets, prose, tldr)"default:"bullets"allowed-tools:[Read]---
Read ${file} and summarize it in ${format} format.
Focus on key points, decisions, and action items.
Terminal
# List available skills
$ comanda skills list
SKILL DESCRIPTION SOURCE
summarize Summarize a document or code file ~/.comanda/skills/
code-review Review code for issues bundled
# Run a skill directly
$ comanda skills run summarize --file README.md --format tldr
# Use in a workflow stepsummarize-docs:skill:summarizeskill_args:file:./docs/API.mdformat:proseoutput:STDOUT
Skill locations: User skills in ~/.comanda/skills/, project skills in .comanda/skills/, plus bundled skills included with comanda. Skills support ${VAR} and ${VAR:-default} substitution.
Real-time data: Queries OSV.dev API directlyโno stale vulnerability databases. Uses tool_config.allowlist to enable curl for API access. Works in CI/CD pipelines.
Turn any workflow into an HTTP API. Perfect for integrating comanda into your existing services and CI/CD pipelines.
Terminal
# Start the server
$ comanda server
# Call any workflow via HTTP
$ curl -X POST "http://localhost:8080/process?filename=review.yaml" \
-d '{"input": "code to review"}'
Ready to Get Started?
Install comanda and build your first workflow in minutes.