Skip to content

Latest commit

 

History

History
88 lines (59 loc) · 2.47 KB

File metadata and controls

88 lines (59 loc) · 2.47 KB

Contributing to dmux

This project is built while running dmux itself. The goal is a fast, repeatable loop for maintainers and contributors.

Prerequisites

  • Node.js 18+
  • pnpm
  • tmux 3.0+

Local Development (Dogfood Loop)

  1. Install dependencies:
pnpm install
  1. Start dmux in local dev mode:
pnpm dev

pnpm dev is the standard maintainer entrypoint for this repo. It bootstraps local dmux development requirements, compiles TypeScript, then launches dmux from dist/index.js with DMUX_DEV=true. Inside tmux it auto-promotes to a watch loop so TypeScript changes rebuild and restart automatically.

If reload behavior looks wrong, run:

pnpm run dev:doctor

This verifies watch mode, source path, control pane health, and local hooks/docs bootstrap state.

Recommended Daily Workflow

  1. Keep one long-lived maintainer worktree for running local dmux (pnpm dev).
  2. Create feature panes/worktrees from dmux (n) for actual changes.
  3. Iterate in feature worktree panes and merge from dmux (m).
  4. Close panes with "Just close pane" when done (x) to keep worktrees available.
  5. Reopen closed worktrees with r when you need to resume work.

In DEV mode, source switching is toggled from the pane menu ([DEV] Use as Source) or hotkey (S):

  • Select any worktree pane and run source toggle -> that worktree becomes active source.
  • Toggle again on the already-active source pane -> source falls back to project root.
  • If the active source worktree is closed/removed, dmux automatically falls back to project root.
  • The active source pane is marked with [source] in the pane list.

This keeps the dev session stable while still using pane-per-branch isolation.

Bootstrap Behavior

pnpm dev runs dev:bootstrap first:

  • worktree_created: bootstraps dependencies in new worktrees
  • pre_merge: runs typecheck and tests before merge
  • hook docs generation: creates src/utils/generated-agents-doc.ts

You can run bootstrap manually:

pnpm run dev:bootstrap

Use pnpm run hooks:install-local -- --force to overwrite existing hook files.

Pull Request Workflow

  1. One pane/worktree per PR branch.
  2. Merge through dmux when possible (this dogfoods merge + cleanup paths).
  3. Ensure local checks pass:
pnpm run typecheck
pnpm run test
  1. Open PR from the feature branch created for that pane.

Maintainer Checklist (Before Release)

pnpm run clean
pnpm run build
pnpm run typecheck
pnpm run test