Maintainers¶
How genimg is built, tested and shipped. You only need this section to contribute.
| Task | Command |
|---|---|
| Set up | uv sync |
| Test | uv run pytest |
| Lint | uv run ruff check . |
| Build the wheel and sdist | uv build |
| Build the docs | uv run --only-group docs zensical build --strict |
Docs examples use long flag names (--model, not -m); only the
CLI reference lists short aliases.
Code layout¶
| Path | Holds |
|---|---|
src/genimg/cli.py |
The Typer app |
src/genimg/providers/ |
One plugin per backend: OpenAI, Google, Codex |
src/genimg/auth/ |
One profile class per provider and auth mode |
src/genimg/registry.py |
Model aliases |
src/genimg/draw.py, grid.py |
Draw Studio and the grid |
skills/ |
Agent skills, shipped in the wheel as genimg/_skills |
CI¶
| Workflow | Runs |
|---|---|
ci.yml |
Lint and tests on Python 3.11 to 3.14; checks pull request titles |
docs.yml |
A strict docs build; deploys to GitHub Pages from main |
release.yml |
release-please and PyPI publishing |
Releases¶
Pull request titles follow Conventional Commits (feat:,
fix:, docs:). Merges are squashed, so each title becomes a changelog line.
release-please collects them into a Release PR
that bumps the version and writes CHANGELOG.md. Merging it tags the release and publishes to PyPI
through trusted publishing, with no API tokens.
Add a provider¶
- Subclass
Providerinsrc/genimg/providers/<name>.py. - Add one
AuthProfileper auth mode insrc/genimg/auth/<name>.py. - Register it in
providers/__init__.pyand add aliases inregistry.py. - Run
uv run pytest.tests/test_provider_contract.pychecks every registered provider.
New models usually need less: see Adding or updating a model. The design decisions explain why the code is shaped this way. Open work is in GitHub issues.