Development
The tool is a Python package with no dependencies beyond the standard library. Contributor notes are in AGENTS.md in the repository.
python3 -m unittest discover -s testsThe tests need no network and no T4 instance. For anything that needs a live instance, t4 doctor is the tool’s own self-check, run by a person against their own CMS.
Building the desktop app
Section titled “Building the desktop app”The app lives in desktop/. To build it locally:
cd desktopnpm cinpm run python # fetch the pinned Python, checksum-verifiednpm start # run it from sourcenpm run dist:mac # or dist:win (on Windows)npm run python downloads a pinned python-build-standalone build. It checks the download against a SHA-256 recorded in scripts/fetch-python.mjs, then installs src/departuregate inside it. Run it again after changing the Python code.
Signing turns on when the workflow’s secrets are set: a Developer ID certificate and notarization credentials for the Mac, and either a .pfx or Azure Trusted Signing for Windows. The list is at the top of .github/workflows/desktop.yml. Without them the builds are unsigned.
Releasing
Section titled “Releasing”To release a version, set it in desktop/package.json, pyproject.toml and src/departuregate/__init__.py, push main, then on a Mac run:
scripts/release-local.sh # build and check, publish nothingscripts/release-local.sh --publish # then tag and releaseIt runs the tests, builds both Mac disk images and checks them, then tags the version and publishes a GitHub release. Then it runs the desktop workflow for the Windows installer alone, which a Mac cannot build. That run adds the installer to the release and rebuilds this site. The docs workflow copies the latest release’s installers onto the site, with the Download page and the version.json that installed apps check. To build everything on Actions instead, run the desktop workflow by hand on the tag with “all”; on a branch, it makes a test build that releases nothing, with its installers attached to the run.
This site
Section titled “This site”The site is in site/: an Astro Starlight project. The landing page is site/src/pages/index.astro, and the docs are Markdown under site/src/content/docs/docs/. The diagrams and screenshots are drawn by docs/diagrams.py into docs/img/, which the README uses too; the build copies them in.
cd sitenpm cinpm run dev # http://localhost:4321/To build it with the download page, put a release in first:
gh release download --dir /tmp/release --pattern '*-windows-setup.exe' --pattern '*-mac-*.dmg'gh release view --json tagName,publishedAt,assets > /tmp/release/release.jsonpython3 docs/release.py /tmp/release # into site/public/download/cd site && npm run build # into site/dist/Moving the downloads
Section titled “Moving the downloads”The built site is static files, so it can be served from any web server. To move it, say to your own server:
- Build it with
SITE_URLandSITE_BASEset to where it will live, such asSITE_URL=https://downloads.example.com SITE_BASE=/, and publishsite/distthere. - Set the repository variable
UPDATE_FEEDto the new…/download/version.jsonaddress. App builds from then on check there. - Keep the old address serving one more release, so apps installed before the move are told about the version that knows the new address.
Counting downloads
Section titled “Counting downloads”The site can count downloads with Umami, which sets no cookies and stores no personal data. It is off unless the build is given a website id: with none, the pages carry no analytics script at all. Set these as repository variables (Settings › Secrets and variables › Actions › Variables), not secrets, since both end up in the public pages:
PUBLIC_UMAMI_WEBSITE_ID: the website id from Umami. Turns counting on.PUBLIC_UMAMI_SRC: the address of Umami’s script, for a self-hosted instance. Defaults tohttps://cloud.umami.is/script.js.
The script only counts visits to the site’s own address (data-domains), so
local previews are not counted. Every installer link on the Download page sends a
download event with platform (windows, mac-arm64 or mac-x64) and
version. In Umami they appear under Events › download, which you can break
down by platform. To try it locally:
PUBLIC_UMAMI_WEBSITE_ID=test-id npm run build in site/.
An independent, unofficial tool. Not produced, endorsed or supported by TERMINALFOUR Solutions Ltd, and not TERMINALFOUR software. “T4” and “TERMINALFOUR” are their trademarks, used here only to identify the software this works with. Copyright © 2026 Small Robot Corp. Source available under the PolyForm Shield License 1.0.0.