backend tool / 2026
cfgit
Version history, diffs, drift checks, adoption, and restore for records that stay in MongoDB or Postgres.
Runtime behavior is often edited through database rows, documents, scripts, dashboards, and agents.
The application keeps its current datastore. cfgit stays beside it.
Record versions, detect drift, adopt external changes, and block stale writes.
try it against a dev datastore
Start with a local or staging database. cfgit stores history beside the live records and checks drift before writes.
01
configure
Create .cfg.toml with the collection, id field, ignored fields, and environment URI.
02
initialize
Run doctor, initialize cfgit history, and import the current live records as the first head.
03
inspect
Use status and diff to see whether the live database has drifted from recorded history.
04
operate
Use status, diff, adopt, commit, restore, or the local UI over the same action layer.
track live records without owning the store
cfgit records versions beside existing MongoDB or Postgres data. The application still reads and writes the original datastore.
Status compares the live record with the recorded head. If they diverge, cfgit marks drift instead of allowing a stale commit.
cfg adopt turns an out-of-band change into history. Commit and restore check the current live
value before writing.
01
live record
The application keeps reading the same collection or table. cfgit does not move the runtime path.
02
recorded head
History stores full JSON versions with stable content hashes and sequence numbers.
03
drift check
Status compares live hash to head hash and marks out-of-band edits as dirty.
04
adopt or stop
Bypassed changes become history, or commits refuse to overwrite them.
engine, adapters, CLI, UI, MCP
The core owns hashing, diffs, drift checks, restore planning, and write guards. Interfaces call the same action layer.
record history
Versioned JSON records with readable diffs, tags, show, restore, import, and system restore.
drift guard
Commit and restore compare expected head and live values before mutating the datastore.
Mongo and Postgres
The core imports no database drivers. Adapters implement the storage contract per datastore.
operator view
The localhost UI shows state, history, branch controls, diffs, adoption, and restore.
agent tools
MCP tools use the same action layer and return structured envelopes for inspection and mutation.
optional impact
Impact analysis stays outside core, with provider code and LLM narration isolated in a plugin.
localhost UI
The UI exposes collection state, history, diffs, adoption, restore, and optional impact analysis.
shared action layer
Correctness stays in the engine. CLI, UI, MCP, and portable agent instructions call the same operations.
interfaces
CLI commands, JSON output, localhost UI, MCP tools, and portable agent instructions route through one operation envelope.
core engine
Opaque JSON records, canonical hashing, diffing, status, commit, adopt, tag, restore, branch refs, identity checks, and secret checks.
storage
MongoDB and Postgres adapters implement the storage contract and expose only the guarantees each store can back.
plugin boundary
cfgit-impact owns deterministic impact summaries and optional LLM narration. The core stays provider-free.
history without moving the datastore
cfgit adds history, drift detection, adoption, and restore around records already used by the application.
View repo