Skip to content

Contribute to Swatcharr 🎨

The picker, its local gallery, and the files consumed by other containers live under docker/swatcharr/. Follow the root contributor instructions for code style, comment examples, state ownership and review requirements.

Prepare your checkout

Use Git, Docker Compose and Buildx. Install xmllint (the libxml2-utils package on Ubuntu), pre-commit and a Node.js version supported by package.json. From the repository root, install the locked browser tools.

npm ci --ignore-scripts
make help

In VS Code, install the workspace recommendations. Red Hat XML supplies diagnostics and Prettier uses the project’s XML plugin. Use make format-xml to format maintained XML and SVG in place.

Validate a change

What changed What to run
Picker, hooks, settings or workflow helpers make test checks both charts and runs unit tests, strict Python typing, lint, workflow fixtures and spelling.
Browser files or editor settings make test-precommit checks formatting, markup, styles, scripts and repository policy.
Runtime image or client bundle make test-image starts a disposable picker with a read-only root and checks its HTTP response and exported files.
Build stages or base images make build-platforms checks all three supported architectures using a multi-platform builder.

The pinned Buccaneerr tool image supplies the Python and shell checkers. Pull requests touching the picker server, catalog or fuzz harness also run ClusterFuzzLite against the saved palette format. Include commands, results and any skipped checks in your pull request.

Build the documentation

Use Python 3.15.2, matching the Pages workflow. From the repository root run:

make docs PYTHON=python3.15
python3.15 -m http.server --bind 127.0.0.1 --directory site 8000

Open http://127.0.0.1:8000 and follow the changed instructions. Check the desktop and mobile navigation, both themes and copyable commands. Stop the preview with Ctrl+C. Edit the README snippet for the shared quickstart, the server docstrings for the API reference, and the maintained Markdown for the other pages. Follow the writing standards.

Release an image

A successful main build publishes edge and a commit tag. An annotated semantic-version tag on main publishes the exact image version. Stable releases also publish minor and latest tags, plus a major tag starting with version 1. Prereleases publish the exact version and commit tag. Match the GitHub release title to its vX.Y.Z Git tag. The image workflow publishes the multi-platform index with a software bill of materials and provenance. Verify the matching digest on GHCR and Docker Hub.

Docker Hub and community publishing

Configure DOCKERHUB_USERNAME and DOCKERHUB_TOKEN as repository Actions secrets for the Docker Hub publisher. The image workflow compares digests before updating the repository overview. The Pages workflow deploys the strict documentation build on version tags or an authorized manual run.

To enable build notices, set the repository variable DISCORD_NOTIFICATIONS to true and configure the intended destinations in Actions secrets. DISCORD_WEBHOOK_URL receives private image and documentation notices. DISCORD_HADES_HOOK_URL receives public image notices. Missing webhooks skip their destinations.