Skip to main content

cfgit

Git-style version control for records that live in your database, without moving them.

cfgit gives history, diff, rollback, tags, promotion between environments and drift detection to the records that drive your system at runtime: agent configs, prompts, model routing, feature flags, pricing and policy tables. Your app keeps reading the same MongoDB or Postgres store, and scripts and admin tools can keep writing it. cfgit sits beside it, records every change it makes, and refuses to overwrite a change it did not record.

Live drift review with history and a line-aligned diff System-impact panel with LLM narration of a change A cfgit pull request over live records

What you get

  • Drift detection. cfg status shows records someone changed outside cfgit; cfg diff shows what changed; keep it (adopt) or throw it away (restore --discard-drift).
  • Safe writes. Every commit is transactional and compare-and-swap guarded, and confirmed by the database before it is reported. Partial edits with cfg set, previews with --dry-run.
  • Impact before you write. Which other records and which lines of code (file:line) use a record, a risk level, and optional LLM narration (Claude, OpenAI or Gemini).
  • Rollback and releases. Tags, restore to a tag or a point in time, and cfg promote between dev and prod through the target's own rules.
  • Built for agents. An MCP server with dry runs, strict arguments and self-explaining results, plus a skill for Claude Code and Codex.
  • Also: branches and PRs over live records, a local web UI, Slack/webhook notifications, write-time validation, secret stripping, and verified identity per environment.

Good for curated control-plane data edited by people and agents. Not for user content, events, logs or high-write tables.

Install

pip install 'cfgit[mongo,postgres,mcp]'      # or just [mongo] / [postgres]

Quick start

# .cfg.toml
[project]
name = "control-plane"

[[collection]]
name = "agent_configs"
id_field = "config_id"

[env.dev]
database = "mongo"
uri = "env:DEV_MONGODB_URI"
db = "my-dev-db"
cfg init && cfg doctor                          # set up history; check for secrets and big fields
cfg import --all -m "initial import"            # start tracking
cfg status                                      # drift?
cfg set agent_configs:planner model=fast --dry-run
cfg set agent_configs:planner model=fast -m "faster planner"
cfg log agent_configs:planner
cfg restore agent_configs:planner @1 -m "roll back"
cfg ui                                          # local web UI

Use it from an agent

# Claude Code: MCP server + the cfgit skill
/plugin install cfgit --marketplace AusafMo/cfgit

# Codex CLI
codex mcp add cfgit -- uvx --from 'cfgit[mcp]' cfg-mcp

Add cfgit MCP server to Cursor

Any other MCP client: uvx --from 'cfgit[mcp]' cfg-mcp over stdio, with CFG_CONFIG set to your .cfg.toml. Claude Desktop: install cfgit.mcpb from the latest release. Details in docs/AGENTS.md.

Documentation

Guide Why cfgit, setup, everyday flows, UI, agents, impact, safety model
Usage Every command with examples
Configuration .cfg.toml reference: collections, envs, validation, notifications, code refs
Agents MCP server, client setup, what agents should know
Identity Identity modes, tokens and permissions
Adapters MongoDB and Postgres details
History contract Reading cfgit history from your own tools
Upgrading Changes between versions
Index Everything else

License

Apache-2.0. See LICENSE, NOTICE and CREDITS.md.

Metadata

Release files for cfgit 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cfgit 0.6.0
File Size Uploaded Provenance Actions
cfgit-0.6.0.tar.gz 307.1 kB With provenance Details for cfgit-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cfgit 0.6.0
File Interpreter ABI Platform Actions
cfgit-0.6.0-py3-none-any.whl Python 3 none any Details for cfgit-0.6.0-py3-none-any.whl

Total release size: 478.3 kB

Release files / cfgit-0.6.0.tar.gz

Download URL cfgit-0.6.0.tar.gz
Size 307.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bd2b808dfa7a82e73bd8fbdc49cf4869d1c44645eb6a83041008a404d239b522
BLAKE2b-256 checksum
How to use checksums
501f6d63f9a9afa2b0f01cc148d6b2cec21013d598ac3551dde851c39a4682d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / cfgit-0.6.0-py3-none-any.whl

Download URL cfgit-0.6.0-py3-none-any.whl
Size 171.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11332898d2d1a7bb759310cc8bdc16a75db92949a699a10ee37e6f3649e78a3f
BLAKE2b-256 checksum
How to use checksums
a0574454909404b15e1bbd682d91eea5ef25d117c4d9a86e228ba8b0da5586b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for cfgit 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cfgit-0.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page