Skip to content

feat: Add --worktree and --tmux flags to pai.ts CLI#788

Closed
julianobarbosa wants to merge 1 commit into
danielmiessler:mainfrom
julianobarbosa:feat/pai-worktree-tmux-flags
Closed

feat: Add --worktree and --tmux flags to pai.ts CLI#788
julianobarbosa wants to merge 1 commit into
danielmiessler:mainfrom
julianobarbosa:feat/pai-worktree-tmux-flags

Conversation

@julianobarbosa

Copy link
Copy Markdown

Summary

  • Adds --wt / --worktree [name] flag to pai.ts that passes --worktree through to claude for isolated git worktree sessions
  • Adds --tmux / --tmux=<value> flag that passes --tmux through to claude for tmux session management
  • Existing -w wallpaper flag is unchanged (no regression)

Changes

Single file: Releases/v3.0/.claude/skills/PAI/Tools/pai.ts

  1. Extended cmdLaunch options type with worktree and tmux parameters
  2. Added passthrough logic to build claude args from the new options
  3. Added argument parsing in main() for --wt, --worktree, --tmux, and --tmux=value
  4. Updated help text with new flags in USAGE and EXAMPLES sections

Examples

k --wt                     # Start in auto-named worktree
k --wt feature-auth        # Start in worktree named "feature-auth"
k --wt feature-auth --tmux # Start worktree in tmux session
k --tmux=classic           # Start with classic tmux mode

Testing Evidence

Help output (bun pai.ts help) confirms new flags appear:

USAGE:
  k --wt, --worktree [name]  Launch in isolated git worktree
  k --tmux                 Create tmux session (with --wt)

EXAMPLES:
  k --wt                   Start in auto-named worktree
  k --wt feature-auth      Start in worktree named "feature-auth"
  k --wt feature-auth --tmux  Start worktree in tmux session

Regression check: -w circuit-board still routes to wallpaper (confirmed via code inspection — the -w/--wallpaper case remains untouched).

TypeScript compilation: bun pai.ts help runs without errors, confirming no type issues.

@julianobarbosa julianobarbosa force-pushed the feat/pai-worktree-tmux-flags branch 2 times, most recently from 1e3fccf to 6b71810 Compare February 24, 2026 01:25
Add --wt/--worktree [name] and --tmux flags that pass through to
the underlying CLI, enabling isolated parallel work sessions via
git worktrees and tmux. The -w short flag remains reserved for wallpaper.
@julianobarbosa julianobarbosa force-pushed the feat/pai-worktree-tmux-flags branch from 6b71810 to 9537ff2 Compare February 24, 2026 01:33
@danielmiessler

Copy link
Copy Markdown
Owner

Hey @julianobarbosa, thank you for the PR and the work that went into it.

We're changing how LifeOS ships: from a full ~/.claude directory you run as-is, to a skill installed by an agentic installer that has your own AI integrate the pieces into your setup. That reworks the parts of the codebase this change touches, so it won't apply cleanly to where we're headed.

We're closing it for that reason, not because the idea was wrong. If the need still stands against the new model, we'd love a fresh PR once it lands. Thanks again for contributing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants