MCPcopy Create free account
hub / github.com/codeaashu/claude-code / createTmuxSessionForWorktree

Function createTmuxSessionForWorktree

src/utils/worktree.ts:673–691  ·  view source on GitHub ↗
(
  sessionName: string,
  worktreePath: string,
)

Source from the content-addressed store, hash-verified

671}
672
673export async function createTmuxSessionForWorktree(
674 sessionName: string,
675 worktreePath: string,
676): Promise<{ created: boolean; error?: string }> {
677 const { code, stderr } = await execFileNoThrow('tmux', [
678 'new-session',
679 '-d',
680 '-s',
681 sessionName,
682 '-c',
683 worktreePath,
684 ])
685
686 if (code !== 0) {
687 return { created: false, error: stderr }
688 }
689
690 return { created: true }
691}
692
693export async function killTmuxSession(sessionName: string): Promise<boolean> {
694 const { code } = await execFileNoThrow('tmux', [

Callers 1

setupFunction · 0.85

Calls 1

execFileNoThrowFunction · 0.85

Tested by

no test coverage detected