Helper scripts for working with git-cms safely.
setup.sh is tested via test/setup.bats. Other scripts are manually verified.
Interactive menu for trying out git-cms safely. Checks prerequisites and guides you through:
- Running the guided demo
- Starting the seeded sandbox server
- Opening a shell in the running sandbox
- Running tests
- Starting contributor dev mode
- Viewing logs
- Cleaning up
Usage:
./scripts/quickstart.shAutomated demo that showcases the key features against an isolated disposable repo:
- Creating and editing articles
- Publishing with atomic ref updates
- Viewing Git's perspective on the data
- Exploring version history
Usage:
./scripts/demo.shThis is great for:
- Understanding how git-cms works before diving in
- Recording screencasts or demos
- Verifying the system is working correctly
These scripts power the long-lived reader sandbox.
prepare-playground.shinitializes a repo, configures Git identity, and seedshello-worldhistory when the playground repo is empty.start-playground.shprepares the repo and then starts the HTTP server against it.
These scripts power repeatable browser footage for the blog post.
capture-cms-footage.mjsruns a dedicated Playwright capture flow against a fresh media sandbox.start-media-sandbox.shstarts an isolated seeded sandbox on a dedicated port and tears it down afterward.
Run:
npm run capture:cmsOutputs land in docs/media/generated/git-cms/.
Renders the git-cas terminal GIFs used in the broader Git Stunts series media pipeline.
Run:
npm run capture:git-cas:vhs
npm run capture:git-cas:tuiThe script builds a synthetic /tmp/git-stunts-media workspace so the rendered media does not expose local checkout paths.
See: docs/media/README.md
Creates a local "Stargate" gateway repository with Git hooks that enforce:
- Fast-forward-only updates (no force pushes)
- Optional GPG signature verification
- Mirroring to public repositories
Usage:
./scripts/bootstrap-stargate.sh ~/git/_blog-stargate.git
git remote add stargate ~/git/_blog-stargate.git
git config remote.stargate.push "+refs/_blog/*:refs/_blog/*"See: git-stargate
Reader-facing scripts are designed to keep Git activity away from the checkout:
demo.shuses an isolated disposable reposandboxuses a named Docker volume mounted at/data/repo
Contributor dev mode is different:
- it bind-mounts the checkout into
/app - the running server uses
/appas its Git repo - it is for working on
git-cms, not casual exploration
Never run git-cms commands in repositories you care about until you understand what's happening.
Runs the full test suite in Docker. Called automatically by npm test.
Usage:
./test/run-docker.sh
# OR
npm test