Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ permissions:
contents: read

jobs:
publish-cfgit:
name: Publish cfgit
publish-cfg-vcs:
name: Publish cfg-vcs
runs-on: ubuntu-latest
environment: pypi-cfgit
environment: pypi-cfg-vcs
permissions:
id-token: write
contents: read
Expand All @@ -26,16 +26,16 @@ jobs:
python -m pip install -U build twine
python -m build
python -m twine check dist/*
- name: Publish cfgit to PyPI
- name: Publish cfg-vcs to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/

publish-cfgit-impact:
name: Publish cfgit-impact
publish-cfg-impact:
name: Publish cfg-impact
runs-on: ubuntu-latest
needs: publish-cfgit
environment: pypi-cfgit-impact
needs: publish-cfg-vcs
environment: pypi-cfg-impact
permissions:
id-token: write
contents: read
Expand All @@ -50,7 +50,7 @@ jobs:
python -m pip install -U build twine
python -m build
python -m twine check dist/*
- name: Publish cfgit-impact to PyPI
- name: Publish cfg-impact to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: plugins/cfg_impact/dist/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ cfgit is pre-1.0 software. The current implementation includes:
- localhost web UI
- MCP server
- portable Codex or Claude Code skill
- optional `cfgit-impact` plugin for deterministic impact summaries and opt-in LLM narration
- optional `cfg-impact` plugin for deterministic impact summaries and opt-in LLM narration

The engine is intentionally DB-neutral. Mongo and Postgres are the first two
adapters to prove the storage seam.
Expand Down Expand Up @@ -443,7 +443,7 @@ standardize the config so that database always uses one env name.
paths, finds static references to changed values across configured records, and
reports a risk level.

Optional LLM narration lives in the separate `cfgit-impact` plugin. It reads the
Optional LLM narration lives in the separate `cfg-impact` plugin. It reads the
real before/after of the change plus a map of the surrounding records, then
explains in plain language what the change does, what it ripples into, and how to
roll it back:
Expand Down
32 changes: 16 additions & 16 deletions docs/PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Publishing

cfgit publishes two Python packages:
cfgit publishes two Python distributions:

- `cfgit`: Git-style history, diff, drift detection, branch/PR review, and
- `cfg-vcs`: Git-style history, diff, drift detection, branch/PR review, and
rollback for live database records without migrating or owning the datastore.
- `cfgit-impact`: optional plugin for deterministic system-impact summaries and
- `cfg-impact`: optional plugin for deterministic system-impact summaries and
opt-in LLM narration of database record diffs.

Current first release version: `0.1.0`.
Expand All @@ -13,19 +13,19 @@ Current first release version: `0.1.0`.

Create both projects on PyPI and configure Trusted Publishing for this repository.

For `cfgit`:
For `cfg-vcs`:

- Owner: `AusafMo`
- Repository: `cfgit`
- Workflow: `publish.yml`
- Environment: `pypi-cfgit`
- Environment: `pypi-cfg-vcs`

For `cfgit-impact`:
For `cfg-impact`:

- Owner: `AusafMo`
- Repository: `cfgit`
- Workflow: `publish.yml`
- Environment: `pypi-cfgit-impact`
- Environment: `pypi-cfg-impact`

The workflow uses PyPI OpenID Connect, so no PyPI API token is stored in GitHub
Secrets.
Expand All @@ -49,8 +49,8 @@ python -m twine check dist/*
```bash
python -m venv /tmp/cfgit-publish-smoke
/tmp/cfgit-publish-smoke/bin/python -m pip install \
'dist/cfgit-0.1.0-py3-none-any.whl[mcp]' \
plugins/cfg_impact/dist/cfgit_impact-0.1.0-py3-none-any.whl
'dist/cfg_vcs-0.1.0-py3-none-any.whl[mcp]' \
plugins/cfg_impact/dist/cfg_impact-0.1.0-py3-none-any.whl
/tmp/cfgit-publish-smoke/bin/cfg --help
/tmp/cfgit-publish-smoke/bin/python -c 'import cfg; import cfg.mcp.server; import cfg_impact; print("imports ok")'
```
Expand All @@ -68,15 +68,15 @@ git push origin v0.1.0
gh release create v0.1.0 --title "v0.1.0" --notes "First public cfgit release."
```

The release triggers `.github/workflows/publish.yml`, which publishes `cfgit`
first and `cfgit-impact` second.
The release triggers `.github/workflows/publish.yml`, which publishes `cfg-vcs`
first and `cfg-impact` second.

## Install

```bash
pip install cfgit
pip install 'cfgit[mongo]'
pip install 'cfgit[postgres]'
pip install 'cfgit[mongo,postgres,mcp]'
pip install cfgit-impact
pip install cfg-vcs
pip install 'cfg-vcs[mongo]'
pip install 'cfg-vcs[postgres]'
pip install 'cfg-vcs[mongo,postgres,mcp]'
pip install cfg-impact
```
6 changes: 3 additions & 3 deletions plugins/cfg_impact/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[project]
name = "cfgit-impact"
name = "cfg-impact"
version = "0.1.0"
description = "Optional cfgit plugin for deterministic system-impact summaries and opt-in LLM narration of database record diffs"
description = "Optional cfg-impact plugin for deterministic system-impact summaries and opt-in LLM narration of database record diffs"
readme = "README.md"
requires-python = ">=3.11"
license = "Apache-2.0"
authors = [{ name = "Mohammad Ausaf" }]
dependencies = [
"cfgit>=0.1.0,<0.2.0",
"cfg-vcs>=0.1.0,<0.2.0",
"httpx>=0.27",
]

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "cfgit"
name = "cfg-vcs"
version = "0.1.0"
description = "Git-style history, diff, drift detection, and rollback for live database records without migrating or owning your datastore"
readme = "README.md"
Expand Down Expand Up @@ -32,7 +32,7 @@ mongo = ["pymongo>=4.6"]
postgres = ["psycopg[binary]>=3.2"]
cli = ["click>=8.1", "rich>=13.0"]
mcp = ["mcp>=1.0"]
impact = [] # the cfgit-impact plugin declares its own model-client deps; never in core
impact = [] # the cfg-impact plugin declares its own model-client deps; never in core
dev = ["pytest>=8.0", "pytest-asyncio", "ruff", "mypy", "httpx>=0.27"]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion src/cfg/adapters/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from pymongo.client_session import ClientSession
from pymongo.errors import OperationFailure
except ModuleNotFoundError as exc: # pragma: no cover
raise ModuleNotFoundError("install cfgit[mongo] to use MongoAdapter") from exc
raise ModuleNotFoundError("install cfg-vcs[mongo] to use MongoAdapter") from exc


class MongoAdapter:
Expand Down
2 changes: 1 addition & 1 deletion src/cfg/adapters/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from psycopg.rows import dict_row
from psycopg.types.json import Jsonb
except ModuleNotFoundError as exc: # pragma: no cover
raise ModuleNotFoundError("install cfgit[postgres] to use PostgresAdapter") from exc
raise ModuleNotFoundError("install cfg-vcs[postgres] to use PostgresAdapter") from exc


_IDENT_RE = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$")
Expand Down
2 changes: 1 addition & 1 deletion src/cfg/interfaces/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def impact(
from cfg_impact.overview import overview
except ModuleNotFoundError as exc:
raise ValueError(
"cfgit-impact plugin is not installed. Install plugins/cfg_impact or cfgit[impact]."
"cfg-impact plugin is not installed. Install plugins/cfg_impact or cfg-impact."
) from exc
return (
overview(engine, record, a=a, b=b, use_llm=use_llm, provider=provider, model=model, against=against),
Expand Down
4 changes: 2 additions & 2 deletions src/cfg/mcp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
from cfg.interfaces import actions
from cfg.interfaces.actions import ActionContext

try: # pragma: no cover - exercised when cfgit[mcp] is installed
try: # pragma: no cover - exercised when cfg-vcs[mcp] is installed
from mcp.server.fastmcp import FastMCP
except ModuleNotFoundError: # pragma: no cover
FastMCP = None # type: ignore[assignment]


def _mcp() -> Any:
if FastMCP is None:
raise ModuleNotFoundError("install cfgit[mcp] to run the cfgit MCP server")
raise ModuleNotFoundError("install cfg-vcs[mcp] to run the cfgit MCP server")
return FastMCP("cfgit")


Expand Down
Loading