@muk2/postgame
v0.1.2
Published
CLI + local web UI for creators to cross-post videos to YouTube, TikTok, and Instagram, with optional physics overlays and split-screen composition.
Readme
postgame
CLI + local web UI for content creators to cross-post videos to YouTube, TikTok, and Instagram — with optional physics overlays, split-screen composition, and scraping-driven content generation.
Status: alpha — under active construction.
Install
npm install -g @muk2/postgame
# or one-off without installing:
npx @muk2/postgame --helpAfter install the binary is just postgame:
postgame --help(The unscoped postgame name on npm is taken by a similar package; we publish under the @muk2 scope.)
Usage
postgame serve # boot the local web UI on http://localhost:3000
postgame account add youtube # OAuth flow for a new account
postgame status # show scheduler + queue health
postgame upload <file> --accounts 1,2,3 --at "2026-05-17T10:00"
postgame --helpWhat it does
Three flows in one tool:
- Bring your own video — upload a finished clip → optionally add a physics-animated bottom panel → cross-post + schedule across platforms.
- Generate from scratch — pick a content config (preset or custom) → app scrapes source clips, renders a physics scene, composes split-screen → cross-post + schedule.
- Just cross-post — upload finished video, schedule across YouTube / TikTok / Instagram simultaneously with per-account isolation.
Requirements
- Node.js 22 LTS
ffmpeg(auto-installed via@ffmpeg-installer/ffmpegif missing from PATH)yt-dlp(auto-installed viayt-dlp-execif missing from PATH)
Development
git clone http://100.113.110.34:3001/Muk/postgame.git
cd postgame
npm install
npm run typecheck && npm run lint && npm testWorkspace layout:
packages/
shared/ types, db schema, oauth helpers
server/ Hono REST API + scheduler + queue + pipelines
client/ React + Vite SPA
cli/ commander entry, bundles client distBranching
main ← dev ← feat/* | fix/* | chore/*- All work goes on a
feat/,fix/, orchore/branch offdev. - Open a PR to
dev, get CI green, merge. - When
devis ready to ship, open a PRdev → mainand merge (fast-forward if possible). release.ymlonly fires onv*tag pushes — pushes tomaindon't publish.
Cutting a release
The publishable package is @muk2/postgame at packages/cli/. The
workspace root (postgame-monorepo) is private. The release pipeline reads
the version out of packages/cli/package.json — not the root.
Before tagging
On main, after a dev → main merge:
Smoke-test the build locally:
npm install npm run typecheck && npm run lint && npm test npm run build # full chain: tsc -b, copy-migrations, client vite, cli esbuild bundleIf any step fails, fix on a branch off
devand re-merge before tagging.Bump the version (use the helper — it keeps
packages/cli/package.jsonand the root in sync and creates the matching tag):npm run release -- patch # 0.1.1 → 0.1.2 npm run release -- minor # 0.1.1 → 0.2.0 npm run release -- major # 0.1.1 → 1.0.0 npm run release -- 0.2.0-beta.1 # or an explicit versionThis writes both
package.jsonfiles, makes thechore(release): X.Y.Zcommit, and runsgit tag vX.Y.Z.Push commit and tag together:
git push origin main --follow-tags
What the tag push triggers
release.yml runs:
actions/checkout+actions/setup-node@v4(caches~/.npmvia Forgejo Actions cache)npm ci- Verifies
${tag}(minusv) equalspackages/cli/package.jsonversion — fails the run otherwise npm run typecheck && npm run lint && npm testnpm run build— producespackages/cli/dist/index.js(the bundled CLI),packages/cli/dist/migrations/, andpackages/cli/dist/client-dist/npm publish --access public --provenance=falsefrompackages/cli/
If publish fails the workflow posts an issue titled CI publish diagnostic — <sha>
with the actual npm error.
What must be in place to publish
| Item | How to set | Why |
|---|---|---|
| NPM_TOKEN repo secret | Forgejo repo → Settings → Actions → Secrets, value is an npm "Automation" or granular write-enabled token | Auth for npm publish |
| packages/cli/package.json "private" is NOT true | (already not present) | npm refuses to publish private packages |
| Tag matches packages/cli/package.json version | npm run release handles this | Workflow gates on it |
| Lockfile in sync with package.json files | npm install after editing any package.json; commit package-lock.json | npm ci fails on drift |
Common pitfalls (each has burned us in the past)
- Lockfile drift. After bumping a dep or renaming a workspace package,
run
npm installand commitpackage-lock.json. CI'snpm cifails fast withEUSAGEif the lockfile andpackage.jsondisagree. - Tag without version bump. Pushing
v0.1.2without first runningnpm run release -- 0.1.2will fail the verify step. The fix is to either delete the bad tag (git push origin --delete vX.Y.Z) and re-tag after bumping, or to bump + push the missing commit. host.docker.internalin workflows. Don't use it — the Forgejo act_runner can't resolve it reliably. Use the mac-mini's Tailscale IP (http://100.113.110.34:3001) directly.- Workspace
.npmrcis ignored. Don't put npm auth inpackages/cli/.npmrc— npm 7+ explicitly ignores it. The workflow writes$HOME/.npmrcinstead.
Hot-fix path (skipping dev)
If main is broken and you need to ship a fix immediately:
- Branch off
maindirectly:git checkout -b hotfix/X main - Make the fix, push, open a PR to
main(notdev). - After merge, run the same
npm run release -- patchflow. - Then fast-forward
devtomainso feature branches inherit the fix:git push origin main:dev.
License
MIT — see LICENSE.
