Skip to main content

covenant-cli

PyPI Python 3.10+ License: Covenant Public License

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 governed project (default scaffold)
covenant init my-project
cd my-project

# Or create a FastAPI governed API
covenant init my-api --template api
cd my-api
pip install -r requirements.txt
uvicorn main:app --reload

# Or create a Django governed webapp
covenant init my-webapp --template webapp

# Add a governed service
covenant add-service research-agent

# Check project health
covenant status

Commands

Command 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:

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
├── 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.6.0

  • Application templates -- covenant init --template api scaffolds a FastAPI governed agent API; --template webapp scaffolds 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 archiving
  • covenant 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 capture
  • covenant 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

covenant_cli-0.6.0.tar.gz (60.7 kB view details)

Uploaded Source

Built Distribution

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

covenant_cli-0.6.0-py3-none-any.whl (79.9 kB view details)

Uploaded Python 3

File details

Details for the file covenant_cli-0.6.0.tar.gz.

File metadata

  • Download URL: covenant_cli-0.6.0.tar.gz
  • Upload date:
  • Size: 60.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for covenant_cli-0.6.0.tar.gz
Algorithm Hash digest
SHA256 b7083cb3941a1a070f398e1de2b35a454451f30140d2c9786c49bb49aff63200
MD5 e446d9cbb689be133658bbfe3b55724b
BLAKE2b-256 18f582d119e634201d64287c77d15fd226f9034e9fc0d9712f7669e3e7cee0b0

See more details on using hashes here.

File details

Details for the file covenant_cli-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: covenant_cli-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 79.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for covenant_cli-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 151c8cc641f5db2f75b94b8551de7195f1a3e1fda00548c867964a427fed20f9
MD5 de24d0814f307b31f3cf7f60a0c2ea50
BLAKE2b-256 b4dc8957a5ebec8ec54925ebb0c64b4c4ad5bd68a15b98d91f32c04219d41610

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 Sentry Error logging StatusPage Status page