Skip to main content

CmdForge

Turn useful AI workflows into commands you own.

CmdForge is a personal tool-building environment for the command line. A tool can combine prompts, Python, other CmdForge tools, and Model Context Protocol (MCP) calls, then behave like an ordinary Unix command:

cat meeting.txt | meeting-decisions
git diff --staged | review-change
cmdforge run classify-private --no-fallback --require-local

Tools are readable YAML, stored either in ~/.cmdforge/ for personal use or ./.cmdforge/ when they belong to a project. You choose the provider at build time or runtime: a local Ollama model, an installed coding CLI, or an OpenAI-compatible API.

Install

CmdForge requires Python 3.10 or newer. pipx is recommended for a personal command-line application:

pipx install "cmdforge[mcp,pty]"

Or install it in a virtual environment:

python -m pip install "cmdforge[mcp,pty]"

The base cmdforge package includes the CLI and desktop tool builder. The mcp extra adds MCP client/server support, while pty adds interactive CLI providers.

Verify the installation and discover providers already present on the machine:

cmdforge --version
cmdforge providers discover
cmdforge providers discover --add

Begin with One Useful Command

cmdforge create explain --prompt "Explain this clearly for a beginner: {input}"
echo "def area(r): return 3.14159 * r * r" | cmdforge run explain

Use the deterministic mock provider while developing:

echo "sample input" | cmdforge run explain --provider mock
cmdforge inspect explain

For AI-assisted creation, install CmdForge's official forge-tool:

cmdforge registry install official/forge-tool

echo "Create a tool that extracts decisions and owners from meeting notes" \
  | forge-tool --name meeting-decisions --project

Four Kinds of Step

  • Prompt steps call a selected AI provider.
  • Code steps perform deterministic Python transformations.
  • Tool steps compose existing CmdForge tools and delegated contexts.
  • MCP steps call tools exposed by external MCP servers.

Contracts, deterministic preflight, regression baselines, schema compatibility, and evidence-based quality scores help distinguish “worked once” from a tool you can maintain.

Use CmdForge from Coding Agents

CmdForge can act as an MCP server for Codex and Claude Code. It is closed by default: configuring a host does not expose any tools until you add an explicit allowlist to ~/.cmdforge/mcp.yaml.

cmdforge mcp configure codex --dry-run
cmdforge mcp configure codex

cmdforge mcp configure claude-code --scope project --dry-run

Agents can also discover the local and remote catalogs without reading prompt or code bodies:

cmdforge list --json --filter "commit message" --limit 10
cmdforge registry search "release notes" --json --limit 5
git diff | cmdforge run-once "Summarize this change: {input}"

Privacy and Provenance

Fallback is a data-movement decision. Sensitive callers can require a local provider, particular capabilities, and verified runtime identity:

cmdforge run incident-summary \
  --provider local-reasoner \
  --no-fallback \
  --require-local \
  --require-capability structured-json \
  --data-classification private \
  --require-model-identity \
  --result-envelope json

The result envelope reports the requested provider, actual provider, attempted fallback chain, model, digest, and locality. Those fields are produced by CmdForge rather than invented by the model.

Learn More

CmdForge is beta software, distributed under the MIT License. Review generated tools and third-party registry tools as you would any other executable code.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmdforge-0.2.0.tar.gz (599.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmdforge-0.2.0-py3-none-any.whl (592.8 kB view details)

Uploaded Python 3

File details

Details for the file cmdforge-0.2.0.tar.gz.

File metadata

  • Download URL: cmdforge-0.2.0.tar.gz
  • Upload date:
  • Size: 599.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for cmdforge-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d2c9beaca37d5474d94cf2aa0088ba3d494d09e49b97eb452e4c2d52eff343e0
MD5 908d1fa87d5835955395933a6be72102
BLAKE2b-256 324d73efe121c59473bc6a39d34b9a7494024e0978adbe2813206dee26c91e8c

See more details on using hashes here.

File details

Details for the file cmdforge-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cmdforge-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 592.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for cmdforge-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abb60b86f95e23b5237bc9c9703fc19180b599df5db0fb4eb496534fbae2e1e0
MD5 0ad04c58769bc79376ee34084a9a90ce
BLAKE2b-256 4fcaa346823f14bdfc533dc25cb16a66901fb2ba27c4d438dbceb820810a5982

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page