CLI for Forge — wrap any multi-agent flow in one command. Watch it evolve.
Project description
forge-cli
The command-line entrypoint for Forge.
Run, wrap, inspect, diagnose, and evolve multi-agent systems from a single CLI built on top of Forge's orchestration, memory, observability, and adapter packages.
Why forge-cli
The rest of Forge is a set of composable Python packages.
forge-cli is the operational surface that makes those packages usable from the terminal:
- detect a flow
- run it with one command
- inspect memory
- bring up the observe API
- diagnose a local install
- trigger or inspect evolution behavior
It is the "front door" of the project, but it is still thin by design. The CLI delegates to the underlying packages rather than reimplementing orchestration logic in shell-shaped code.
What exists today
The CLI currently exposes these command groups:
forge wrapforge runforge memoryforge observeforge doctorforge evolve
Those commands are wired through Typer and call into:
forge-coreforge-adaptersforge-observeforge-memory
Installation
Inside the Forge workspace:
uv sync
Standalone:
pip install forge-cli
If you want the full experience, install the whole stack through the meta-package instead:
pip install forge-os
The CLI entrypoint installed by this package is:
forge
Command overview
forge wrap
forge wrap is the highest-level execution command in the current CLI.
What it does today:
- prints the Forge banner
- auto-detects the framework for a source file
- loads the flow through
MetaOrchestrator - builds a
TaskEnvelope - runs the flow
- renders Rich output for run status, topology, and cost
- optionally ingests output into memory
- optionally starts the observe API in the background
- optionally triggers one evolution step after the run
Representative usage:
forge wrap my_flow.py
forge wrap my_flow.py --input '{"query":"What is RAG?"}'
forge wrap my_flow.py --budget 1.50 --observe
forge wrap my_flow.py --evolution
forge run
forge run is the more direct execution path. It loads a flow, constructs a task envelope, and runs it with optional streaming.
What it does today:
- loads the source through the orchestrator
- supports JSON input from a string or file
- supports cost ceilings
- supports memory and evolution toggles in run config
- can stream emitted events to stdout instead of rendering the final dashboard
Representative usage:
forge run my_flow.py --input '{"query":"Summarize this"}'
forge run my_flow.py --input-file payload.json
forge run my_flow.py --stream
forge memory
The memory command group currently includes:
forge memory queryforge memory ingestforge memory status
What those do today:
- query a local
HybridMemoryinstance - ingest a text file into memory
- print health and stats for the default memory backends
Representative usage:
forge memory query "retrieval optimization ideas"
forge memory query "RAG" --entity LLM --entity OpenAI
forge memory ingest notes.txt --run-id abc123 --tag topic=rag
forge memory status
forge observe
forge observe starts the observe REST + SSE API server.
What it does today:
- launches the FastAPI app through
uvicorn - prints the docs URL
- prints the SSE stream endpoint
- can optionally open the docs in a browser
Important rigor note:
- the current command starts the API server
- it does not ship a first-party web dashboard UI in this package today
- the command help itself states that a web UI is planned for a later release
Representative usage:
forge observe
forge observe --host 0.0.0.0 --port 8787 --no-open
forge doctor
forge doctor is an environment diagnostic.
What it checks today:
- Python version
- importability of the core Forge packages
- presence of default memory backends
- presence of optional framework extras
- optional network reachability for Anthropic and OpenAI endpoints
Representative usage:
forge doctor
forge doctor --network
forge evolve
The evolution command group currently includes:
forge evolve runforge evolve statusforge evolve resume
What it does today:
- manually runs the evolution loop against a source flow
- reads a JSONL journal to show prior mutation outcomes
- resets the evolution circuit breaker after it opened
Important rigor note:
forge evolve runloads the flow and calls the evolution loop- the loop only meaningfully proceeds when there is enough run history
forge evolve statusis a read-side journal view, not a live controller UI
Representative usage:
forge evolve run my_flow.py --mode suggest
forge evolve run my_flow.py --mode auto --max-mutations 3
forge evolve status
forge evolve resume my_flow.py
Quickstart
1. Wrap a local flow
forge wrap examples/langgraph_research/flow.py --input '{"query":"Latest agent harness papers"}'
2. Run with a budget
forge wrap my_flow.py --budget 0.50
3. Inspect memory
forge memory status
forge memory query "planner output from last run"
4. Start the observe API
forge observe --no-open
5. Diagnose the installation
forge doctor
CLI design principles
Thin command layer
The CLI is intentionally thin. It mostly parses arguments, builds config and input objects, and delegates to the runtime packages.
That matters because it keeps the terminal surface aligned with the Python API instead of inventing a parallel execution model.
Rich output, not vague output
The package uses Rich-based rendering from forge-observe.exporters.console so command output is structured and readable:
- run banners
- run summaries
- cost panels
- topology trees
- evolution proposal rendering
Graceful degradation
Where the underlying packages degrade gracefully, the CLI generally mirrors that behavior:
- missing optional extras produce hints instead of hard crashes where possible
- memory ingest or evolution can be skipped with a visible message
- diagnostics show optional modules as warnings rather than fatal errors
Public surface
Entry module:
forge_cli.main
Command modules:
forge_cli.commands.wrapforge_cli.commands.runforge_cli.commands.memoryforge_cli.commands.observeforge_cli.commands.doctorforge_cli.commands.evolve
Installed script:
forge
Package boundaries
forge-cli is the operational shell around the rest of the project.
It does not own the core runtime logic itself:
forge-coreowns the orchestrator, types, events, guards, and evolution loopforge-adaptersowns framework-specific execution integrationforge-memoryowns storage and retrievalforge-observeowns cost tracking, tracing, console rendering, and the observe API
That split is important because it keeps the CLI ergonomic without making it the single source of truth.
Examples of current behavior
Claims in this README are intentionally scoped to what the code implements today:
forge observestarts an API server and exposes docs and SSE endpointsforge doctorperforms local import and backend checks, with optional network checksforge memoryuses the default localHybridMemoryforge wrapcan optionally start the observe API, ingest to memory, and attempt evolutionforge evolve statusreads from a journal file and renders a summary table
This README does not claim:
- a complete first-party browser dashboard ships in
forge-cli - every evolution run will apply mutations automatically
- every wrapped run persists memory through orchestrator-attached memory integration
Where behavior is conditional, the README keeps that conditional language on purpose.
Testing
From the repository root:
pytest packages/forge-cli/tests -q
The current package tests cover:
forge doctoroutput and stabilityforge evolve statusrendering and empty-journal behavior- breaker-open journal rendering for
forge evolve status
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file forge_os_cli-0.2.0.tar.gz.
File metadata
- Download URL: forge_os_cli-0.2.0.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
844867c8e501bc3421a248d8dfa02c78e184606e8960ee8a5cb5efce782dc4d4
|
|
| MD5 |
7a78c46a77211228391ff14bb3a86533
|
|
| BLAKE2b-256 |
de7c90626f1c01db950a29ee7fe971f0c00e6bebc3919918d8335a35ef97a4fa
|
File details
Details for the file forge_os_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: forge_os_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbfab526ef41c9f39cb2a684474bc7d577169af59de2c412fa204dc8cae5bf34
|
|
| MD5 |
4a474583387febce11e337d25d8fb224
|
|
| BLAKE2b-256 |
4d69571781817c5ca9c597a962a86f66e8f6183307482db4a43f05828e85d2c4
|