covenant-cli
Scaffold governed agent services. Exit reports, typed I/O, memory inheritance -- from the first line of code.
Why Covenant CLI?
Every AI agent framework gives you tools to build agents. None give you tools to govern them.
Covenant CLI scaffolds projects where governance is structural, not aspirational:
- Exit reports -- every service run writes what worked, what failed, and what the next run should know
- Typed I/O -- Pydantic models for every agent input and output, no
Dict[str, Any] - Memory inheritance -- agents read prior learnings before acting, not after failing
- Registry tracking -- every service and agent registered before it runs
- Convention rules -- IDE-native governance rules for Cursor and Claude Code
The difference between an agent that works once and an agent you can trust is governance.
Quick Start
pip install covenant-cli
# Create a full governed app from a description (the fastest path)
covenant create "A research app that searches papers and writes reviews"
# Or scaffold manually:
covenant init my-project
cd my-project
covenant add-service research-agent
covenant status
covenant create -- From Description to Governed App
The headline feature. Describe what you want, and Covenant builds a governed project with real agent code:
covenant create "A customer support bot that classifies tickets and drafts responses"
What happens:
- Your description is sent to an LLM, which produces a structured plan
- The plan is displayed for your review -- services, agents, typed I/O, pipeline
- On confirmation, a complete Django webapp is scaffolded with:
- Real agent definitions with specific instructions (not boilerplate)
- Pydantic input/output models with typed fields from the plan
- Manager orchestration with exit reports and inheritance
- Tool stubs ready to implement
- Full governance scaffold (registry, memory, IDE rules)
Every generated agent follows the same patterns as covenant add-service -- typed I/O, exit reports, memory inheritance. The difference is that the agents have real instructions and real types, not placeholders.
# Use a different template
covenant create "stock alert system" --template api
# Requires OPENAI_API_KEY
export OPENAI_API_KEY=sk-...
Commands
| Command | Description |
|---|---|
covenant create <description> |
Create a full governed app from a natural language description |
covenant init <name> [--template api|webapp] |
Create a new governed project (default, FastAPI API, or Django webapp) |
covenant add-service <name> |
Add a governed service with manager, agents, typed schemas, and exit reports |
covenant status |
Show project health: services, recent exit reports, warnings |
covenant remember [query] |
Search exit reports, memos, and consolidated summaries by keyword |
covenant memo send/list/read |
Cross-service communication via structured memos |
covenant consolidate |
Distill exit reports into summaries, optionally archive |
covenant doctor |
Validate project environment: Python, SDK, API keys, registry, governance |
User Journeys
Four documented paths through the tool:
- First-Time Setup -- scaffold a governed project from scratch
- Iterative Development -- the learning loop across runs
- Debugging a Failing Agent -- trace failures through exit reports
- Team Onboarding -- orient a new team member in minutes
The Governance Delta
Without covenant-cli, your agents:
- Run without purpose documentation
- Pass untyped data between steps
- Fail silently and repeat mistakes
- Have no memory of prior runs
With covenant-cli, your agents:
- Declare their mandate before acting
- Use Pydantic models for all I/O
- Write exit reports on every run
- Read inheritance before starting
- Track token usage and cost per run
- Coordinate through structured memos
Same agent SDK. Same model. Different discipline.
Project Structure
my-project/
├── GOVERNANCE.md # 18 governance rules
├── setup.sh # Auto-setup: venv, deps, migrations
├── run_pipeline.py # Standalone pipeline runner
├── registry/agents.json # Service and agent registry
├── memory/
│ ├── inheritance/ # Exit reports from prior runs
│ └── memos/ # Cross-service communication
├── .cursor/rules/ # Cursor IDE governance rules
├── .claude/rules/ # Claude Code governance rules
└── services/
└── my-service/
├── manager.py # Orchestrator with exit reports
├── agents/ # One agent per file
├── schemas/types.py # Pydantic models
└── tools.py # Shared tools
Application Templates
covenant init supports three project templates via the --template flag:
| Template | Command | What You Get |
|---|---|---|
| default | covenant init my-project |
CLI project with src/main.py, governance scaffold, services directory |
| api | covenant init my-api --template api |
FastAPI app with REST endpoints for governed agent services (/services, /runs, /health) |
| webapp | covenant init my-webapp --template webapp |
Django webapp with dashboard and governance UI |
All templates include the same governance foundation: GOVERNANCE.md, registry/agents.json, memory/ directories, and IDE convention rules. The template determines the application layer on top.
API Template
The API template generates a working FastAPI application:
my-api/
├── main.py # FastAPI entry point
├── requirements.txt # Python dependencies
├── runner.py # Background task runner
├── routers/
│ ├── services.py # Service CRUD + trigger endpoints
│ ├── runs.py # Run detail + exit report endpoints
│ └── health.py # Governance health check
├── models/
│ ├── schemas.py # Pydantic request/response models
│ └── database.py # File-based storage (reads same files as CLI)
├── GOVERNANCE.md
├── registry/agents.json
└── memory/
No database required -- the API reads the same governance files the CLI does.
What's New in v0.8.0
setup.shauto-generation --covenant createnow generates asetup.shscript inside your project that automates post-generation setup: virtual environment creation, dependency installation, API key check, and Django migrations. Works on Linux, Mac, and Git Bash on Windows.run_pipeline.pyauto-generation --covenant createnow generates a standalone pipeline runner that executes your full agent pipeline without Django. Runpython run_pipeline.py "your input"to test agents immediately, or--dry-runto inspect the pipeline structure.
v0.7.0
covenant create-- describe what you want in natural language, get a full governed app with real agent code, typed I/O, and pipeline orchestration. The headline feature.- Requires
OPENAI_API_KEY(uses gpt-4o-mini for plan generation)
v0.6.0
- Application templates --
covenant init --template apiscaffolds a FastAPI governed agent API;--template webappscaffolds a Django webapp - Three templates -- default (CLI), api (FastAPI), webapp (Django) -- all sharing the same governance foundation
v0.5.0
covenant doctor-- validate project environment health: Python version, SDK, API keys, registry integrity, governance, memory directories, IDE rules, and service scaffolding
v0.4.0
- Usage tracking -- token consumption and cost per service run, visible in
covenant status covenant memo-- cross-service communication via structured memos (send/list/read)covenant consolidate-- distill exit reports into summaries with optional archivingcovenant remember-- now searches memos and consolidated summaries (compiled-truth boost)- Status dashboard -- unread memo count, last consolidation date, token totals per service
- 3 new governance rules -- track usage, communicate via memos, consolidate regularly
Roadmap
covenant-cli is heading toward runtime governance and intelligence. See ROADMAP.md for the full plan.
Coming next:
covenant run <service>-- execute services with automatic exit reports and usage capturecovenant watch-- live monitoring with failure context from prior runs- Baseline tracking -- detect regression before it becomes a production incident
covenant suggest-- evidence-based improvement recommendations from your project's own history- Plugin system -- make any agent framework governable
Six detailed user journeys and the full phase-by-phase plan are in the roadmap.
Credits
Inspired by mutta by Alejandro Garcia Polo.
License
Covenant Public License v1.0 -- free for individuals and teams under $1M revenue. Contact the author for commercial licensing.
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 covenant_cli-0.8.3.tar.gz.
File metadata
- Download URL: covenant_cli-0.8.3.tar.gz
- Upload date:
- Size: 75.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec616f7b4ac673b959eff4e536df1d399f66fe4cbafa9291c4d8f86c3714b0b0
|
|
| MD5 |
cb459f47ed318b3b772d0db1e079a129
|
|
| BLAKE2b-256 |
0010e43fb0bd23a30590aa011228ccb264171eb251f669130ceab35015c46a1f
|
File details
Details for the file covenant_cli-0.8.3-py3-none-any.whl.
File metadata
- Download URL: covenant_cli-0.8.3-py3-none-any.whl
- Upload date:
- Size: 97.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e99196806436df656b761104998daeac96acba2763a56f6168bb705d672a28ac
|
|
| MD5 |
76698d2a0c8c008d5f6f5af82b217e09
|
|
| BLAKE2b-256 |
478302ad2e88cc4807b4852330a7ab082a16655ccdb2f3124fb423c61f3634a7
|