Safe scaffolding, shared workflow, dependency-patch, and CI-baseline tooling for Python repositories, packaged as a single
acidbaseCLI plus a set of canonical template files.
1. The acidbase CLI — a small Click-based command group that wraps several
project and owner-wide GitHub workflows so they behave identically on Windows
(PowerShell 7+) and on Linux/WSL (bash):
acidbase alerts— list Dependabot alerts for one repo or every repo of an owner, with severity / state / package filters and ready-to-pasteacidbase patchsuggestions per affected package.acidbase bump— advance a uv project's own static version by one or more uv bump kinds, or set an explicit PEP 440 version. It updatespyproject.tomlanduv.lockwithout synchronizing the environment; seedocs/guidelines/versioning.md.acidbase clean— remove one fixed inventory of Python development caches (bytecode, pytest, Hypothesis, ruff and mypy caches, coverage output) from a project, never anything Git tracks;--dry-runlists them with sizes. Importable from consumer repos viafrom acidbase.clean import clean_command; seedocs/guidelines/scaffolding.md.acidbase dismiss-alert— dismiss selected alerts with a recorded reason;acidbase reopen-alertcan reverse the decision.acidbase enable-alerts/acidbase enable-fixes— idempotently toggle the per-repo Dependabot settings (vulnerability alerts and automated security fix PRs respectively). Each helper checks the current state first so it is safe to chain from repo-creation scaffolders.acidbase fleet— keep a manifest of the repositories that consume acidbase (host, path, CLI):fleet addregisters one and is safe to call from repo-creation scripts,fleet censuscompares the manifest with the disk in both directions,fleet listrenders it as a table, JSON, TSV, or Markdown,fleet pinpins every member to an acidbase release tag, andfleet removedrops an entry. Paths are translated between Windows and WSL; seedocs/guidelines/fleet.md.acidbase hooks— report whether each repository's ruff pre-commit hook agrees with itsuv.lock, the single source of truth for the ruff version (LOCAL,ALIGNED,DRIFT,NO-RUFF-HOOK, ...), list any remaining remoterev:pins, and exit non-zero on drift. Accepts repo paths or--allto sweep the roots inconfig/security_patch.toml.acidbase keyring— move a repo's.envsecrets into the OS keyring withplan,copyandstrip, and back withrestore, printing names and never values. A startup hook shipped with the package,acidbase_keyring.pth, then fills the environment of each Python process in that repo's venv, so nothing needs a launcher or a code change. A value already in the environment wins. WSL shares the Windows store throughpython.exe. A repo that keeps its secrets in.envis unaffected, and tools other than Python never see keyring values, so what Docker Compose needs stays in.env.acidbase patch— scan every non-archived repo of a GitHub owner for a vulnerable dependency, bump it viauv add --no-sync <dep>>=<new>(the repo's virtual environment is never touched), publish the fix (direct push or PR), and verify Dependabot alerts close. Opt in with--sync-envto eagerlyuv sync --frozenrepos whose venv is native to the executing side. Profiles per repo are configured inconfig/security_patch.toml.acidbase push— pre-commit-awaregit add . && git commit && git pushhelper with automatic retry when hooks modify staged files. Importable from consumer repos viafrom acidbase.push import push_command. Supports a dual-publish flow (private remote + public mirror) with allowlist / gitleaks pre-flight gates and an interactive destination Q&A; seedocs/guidelines/dual_push.md.acidbase reopen-alert— reopen selected alerts that were previously dismissed.acidbase scaffold— show a read-only adoption plan for an initialized Python repository, then add missing baseline files with--apply. Existing divergent CLI, CI, hook, lint, and secret-scan configuration is preserved; a verbatim copy of an older acidbase template is reported asstaleand replaced only under--refresh-baseline;--wire-cliexplicitly couples a new CLI to its dependency, entry point, initializer, and package metadata; seedocs/guidelines/scaffolding.md.
Metarepo-to-children propagation (lockfile pin upgrades, config sweeps,
per-repo verification, canonical uv run <cli> push close-out) is documented
as a repeatable private runbook in docs/guidelines/metarepo_rollout.md.
2. Canonical CI / lint / secret-scan templates under templates/ — a single
source of truth for the GitHub Actions lint workflow, the pre-commit hook set
(uv-lock + ruff + gitleaks, all repo: local so the hook file pins no tool
version and ruff resolves from uv.lock), the ruff configuration block, and
the gitleaks configuration:
templates/.github/workflows/lint.ymltemplates/.gitleaks.tomltemplates/.pre-commit-config.yamltemplates/pyproject.lint.toml(the[tool.ruff]block to append)
Downstream repositories adopt these files through acidbase scaffold so the
baseline stays consistent without overwriting local policy. See
templates/README.md for the rationale behind each choice (why ruff over
black+isort+flake8, why the gitleaks CLI
instead of gitleaks/gitleaks-action@v2).
Requires Python 3.12+ and uv.
git clone https://github.com/jurdabos/acidbase.git
cd acidbase
uv sync
uv run acidbase --helpOr install directly from GitHub into another project:
uv add "acidbase @ git+https://github.com/jurdabos/acidbase.git@v0.4.0"Pin the newest release tag, which git ls-remote --tags https://github.com/jurdabos/acidbase.git 'v*' lists.
uv ignores a version specifier such as acidbase>=0.3.0 on a git source, so the tag is what fixes the version.
Full walkthroughs for the security patch flow (CLI reference, config schema,
strategies, verification, worked examples) live in
docs/guidelines/security_patching.md.
Quick example:
# Triage owner-wide alerts and get suggested fix commands.
uv run acidbase alerts --owner <github-owner> --state open --severity high
# Apply a fix across every affected repo and verify the alerts close.
uv run acidbase patch \
--owner <github-owner> \
--dep GitPython \
--new-version 3.1.50 \
--cve CVE-2026-42215uv sync # install runtime + dev deps
uv run pytest # run the test suite
uv run ruff check . # lint
uv run ruff format --check . # formatting checkPre-commit hooks (uv-lock + ruff + gitleaks via the system MIT-licensed binary):
uv tool install pre-commit --with pre-commit-uv
pre-commit install
pre-commit run --all-filesacidbase/
├── src/acidbase/ # Python package
│ ├── clean.py # Reusable development-cache cleaner
│ ├── cli.py # Click group and public command registration
│ ├── fleet.py # Fleet manifest: register, census, list consumers
│ ├── push.py # Reusable Git commit-and-push command
│ ├── scaffold.py # Plan-first baseline adoption
│ ├── versioning.py # Reusable uv project-version command
│ ├── workflow.py # Root/tool/subprocess mechanics for child CLIs
│ └── security/ # patch + alert helpers, profile resolver, publishers
├── templates/ # Canonical CI / lint / secret-scan baseline
├── docs/guidelines/ # Public docs (security patching workflow)
├── tests/ # pytest suite (security/* covers the patch flow)
├── config/security_patch.toml # Example profile config (placeholders only)
├── scripts/list_symbols.py # Repo-wide function/class inventory utility
├── pyproject.toml # uv-native project metadata + ruff config
└── PUBLIC_ALLOWLIST.txt # CI guard: paths allowed to live in this repo
See CONTRIBUTING.md and CODE_OF_CONDUCT.md.
The CI lint baseline (.github/workflows/lint.yml) and the public allowlist
guard (.github/workflows/public-allowlist.yml) must stay green before merge.
MIT — Copyright (c) 2024 Blai (Balázs Torda).