Getting Started
CmdForge lets you build custom AI-powered CLI commands using simple YAML configuration. Create tools that work with any AI provider and compose them like Unix pipes.
What is CmdForge?
CmdForge is a lightweight personal tool builder that lets you:
- Create custom CLI commands that call AI providers
- Chain prompts with Python code for complex workflows
- Use tools like Unix pipes - read from stdin, write to stdout
- Share and discover tools through the registry
Quick Start
Get up and running in under a minute:
# Install CmdForge
pip install cmdforge
# Create your first tool (choose your style)
cmdforge # Desktop application with visual builder
cmdforge create # CLI wizard
# Or install a tool from the registry
cmdforge registry install official/summarize
# Discover tools from scripts or an AI coding assistant
cmdforge list --json --filter "summarize" --limit 10
cmdforge registry search "summarize text" --json --limit 5
# Run a one-off prompt without creating a tool
cat article.txt | cmdforge run-once "Summarize this:
{input}"
# Use it!
cat article.txt | summarize
# Or use the interactive picker to browse and run tools
cf
Two Ways to Build
cmdforge launches the desktop application with a visual builder.
cmdforge create uses a command-line wizard. Both create the same YAML config files.
Using CmdForge with Coding Agents
CmdForge can expose installed tools to supported coding hosts over MCP. Preview the configuration first; CmdForge updates only its marked policy block and does not expose tools that you have not explicitly allowed.
cmdforge mcp configure codex --dry-run
cmdforge mcp configure codex
# Claude Code is supported too
cmdforge mcp configure claude-code --dry-run
For a reusable workflow owned by an application, create it inside that application's
.cmdforge/ directory. Do not modify the CmdForge source repository merely to
add a tool for another project.
cd your-project
cmdforge create classify-docs --project
# Or use the official AI-assisted creator
cmdforge registry install official/forge-tool
echo "Create a bounded document classifier" | forge-tool --name classify-docs --project
How It Works
Each tool is a YAML file that defines:
- Arguments - Custom flags your tool accepts
- Steps - Prompts to send to AI or Python code to run
- Output - How to format the final result
Here's a simple example:
name: summarize
version: "1.0.0"
description: Summarize text using AI
arguments:
- flag: --max-length
variable: max_length
default: "200"
description: Maximum summary length in words
steps:
- type: prompt
provider: claude
prompt: |
Summarize the following text in {max_length} words or less:
{input}
output_var: summary
output: "{summary}"
Next Steps
- Installation Guide - Detailed setup instructions
- Visual Builder - Build tools visually (no YAML required)
- Your First Tool - Step-by-step YAML tutorial
- Providers - Configure AI providers
- Browse Tools - Discover community tools
Get Help
Stuck? Have questions? We've got you covered:
- Community Forum - Ask questions, share projects, and connect with other users
- Help & Support - Get help with installation, configuration, or usage
- Report a Bug - Found an issue? Let us know