A TypeScript framework for Android TV party games using phones as controllers.
Package manager: Bun (v1.2.19)
bun install # install dependencies
bun run build # build all packages
bun run test # run tests
bun run lint # lint
bun run typecheck # type-checkFour packages under packages/:
| Package | Description |
|---|---|
@couch-kit/core |
Shared types, protocol, reducer |
@couch-kit/client |
React hooks for phone controllers |
@couch-kit/host |
React Native TV host |
@couch-kit/cli |
CLI tools (bundle, simulate, scaffold) |
- Create a branch from
main - Make your changes
- Add a changeset:
bun run changeset- Select which packages are affected
- Choose the semver bump type (patch / minor / major)
- Write a summary of the change
- Commit and push
- Open a PR to
main - CI runs: lint (includes typecheck), test, build, and changeset validation
- Get review and merge
This project uses Changesets for version management.
- Every PR that changes published packages must include a changeset
- CI will fail if a changeset is missing
- Run
bun run changesetto create one - Changesets are consumed during the release process
Releases are automated via GitHub Actions:
- When PRs with changesets merge to
main, the Changesets bot opens a "Version Packages" PR - This PR bumps versions in
package.jsonand updatesCHANGELOG.mdfiles - When the maintainer merges the Version Packages PR, the release workflow:
- Publishes all changed packages to npm
- Creates git tags (e.g.,
@couch-kit/core@0.6.0) - Creates GitHub Releases
Tip: The release workflow can also be triggered manually from the GitHub Actions tab via
workflow_dispatch.
- Regular releases — The Version Packages PR is merged weekly (typically Monday)
- Hotfixes — For critical bug fixes, the Version Packages PR is merged immediately
- Breaking changes — Version Packages PR is held for review and coordination with dependents
- Go to npmjs.com → Avatar → Access Tokens → Generate New Token → Granular Access Token
- Configure the token:
- Name:
couch-kit-ci-release - Expiration: 1 year (set a reminder to rotate)
- Packages: Only select packages — add
@couch-kit/core,@couch-kit/client,@couch-kit/host,@couch-kit/cli - Permissions: Read and write
- Name:
- Add the token as a GitHub repository secret named
NPM_TOKEN(Settings → Secrets and variables → Actions) - Enable "Allow GitHub Actions to create and approve pull requests" in repo Settings → Actions → General → Workflow permissions
The main branch has protection rules:
- PRs are required (no direct pushes)
- CI status checks must pass:
lint,test,build,changesets - Stale approvals are dismissed on new pushes
To configure branch protection via CLI:
gh api repos/{owner}/{repo}/branches/main/protection \
--method PUT \
--field required_status_checks='{"strict":true,"contexts":["lint","test","build","changesets"]}' \
--field enforce_admins=false \
--field required_pull_request_reviews='{"dismiss_stale_reviews":true,"required_approving_review_count":0}' \
--field restrictions=nullMIT