demo: add demo.tape and make demo target#80
Merged
Conversation
`demo.tape` is a [VHS](https://github.com/charmbracelet/vhs) script that records a 60-second walkthrough of the `plan → apply → re-plan empty → dump → modify → re-plan → re-apply` round-trip, mirroring pistachio's `demo.tape` shape (single shell, `bat`-coloured SQL, heredoc'd schema file, sed'd column-add diff). The schema is a two-column `posts` table with a secondary index, evolved to add a `body` column — small enough to fit one screen, big enough to exercise the headline ergonomics. Recording requires VHS + `bat` on PATH and a fresh database reachable through `MYSCHEMA_DSN` (the tape doesn't export it; the recording environment is responsible, same as pistachio's convention). The `sed -i ''` form is macOS-specific; Linux recorders should drop the empty `''` argument. TODO.md: drop the "Demo asciinema or gif" item now that the tape is in place. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- `make demo` runs `clean-schema` (resets MYSQL_DB so the recording starts from an empty database) then invokes `vhs demo.tape`. The DSN is built inline from the same MYSQL_* vars test / clean-schema already use, so a custom host / port carries through. Recorder still needs vhs + bat + the `myschema` binary on PATH — documented in the recipe comment. Mirrors pistachio's `make demo` shape (one line, depends on the schema-reset target). - `.gitignore` gains `demo.gif` (the VHS output) and `*.bak` (demo.tape's `cp schema.sql schema.sql.bak` byproduct), matching pistachio. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Added an image to the README for better visualization.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #80 +/- ##
=======================================
Coverage 86.62% 86.62%
=======================================
Files 30 30
Lines 3237 3237
=======================================
Hits 2804 2804
Misses 267 267
Partials 166 166 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a recordable, repeatable CLI demo flow (VHS tape + Makefile target) to showcase myschema’s core plan → apply → re-plan → dump → modify → re-plan → re-apply workflow, and updates repo hygiene/docs accordingly.
Changes:
- Add
demo.tapeto generatedemo.gifvia VHS demonstrating a smallpostsschema round-trip. - Add
make demotarget to reset the demo DB and run the VHS recording with a constructedMYSCHEMA_DSN. - Update
.gitignorefor demo byproducts and remove the now-completed demo TODO item.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| TODO.md | Removes the demo placeholder item now that a demo tape exists. |
| Makefile | Adds demo target that resets the DB and runs vhs demo.tape with a DSN built from MYSQL_*. |
| demo.tape | New VHS tape that records a myschema walkthrough into demo.gif. |
| .gitignore | Ignores demo output (demo.gif) and backup files (*.bak). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MYSQL_PWD was carried over from earlier scaffolding but isn't exercised in development — make targets call mysql / myschema without password against the local docker compose MySQL, and the CI / test paths inherit credentials from MYSCHEMA_TEST_DSN. Drop the var (and its export) to keep the env surface minimal; if a password-protected MySQL setup ever needs it, the operator can prepend `MYSQL_PWD=… make …` and rely on the mysql client picking it up directly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
demo.tape(pistachio-style VHS recording script) walks through the headlineplan → apply → re-plan empty → dump → modify → re-plan → re-applyround-trip on a smallpostsschema. Adapts pistachio's tape to MySQL syntax (INT AUTO_INCREMENT,PRIMARY KEY (id), inlineKEYfor the secondary index) and replacespistwithmyschema.make demotarget runsclean-schema(resetsMYSQL_DBto an empty state) and invokesvhs demo.tape. The DSN is built inline from the existingMYSQL_*vars so a custom host / port carries through. Recorder still needsvhs+bat+ themyschemabinary on PATH; documented in the recipe comment..gitignoregainsdemo.gif(VHS output) and*.bak(thecp schema.sql schema.sql.bakbyproduct of the diff demo step), matching pistachio.TODO.md: drop the "Demo asciinema or gif (pistachio-style)" item now that the tape is in place.Test plan
make demorecipe builds the DSN fromMYSQL_*vars, so a custom MySQL setup carries through without further edits.make demoagainst a local MySQL once VHS is installed (the recording is the deliverable; left to the recorder).🤖 Generated with Claude Code