Interactive CLI tool for creating and managing Git worktrees with configuration file copying and post-create automation.
Branchlet is an interactive CLI tool that simplifies Git worktree management through a menu-driven interface. It provides commands to create, list, and delete worktrees while automating common setup tasks like copying configuration files and running post-creation commands.
The tool supports both project-specific and global configuration files that define which files to copy to new worktrees, path templates for worktree directories, and commands to execute after worktree creation. Configuration supports glob patterns for file matching and template variables like $BRANCH_NAME and $BASE_PATH. Users can specify post-creation commands such as "npm install" or "pnpm build" that run automatically in the new worktree directory.
Branchlet offers both interactive and direct command modes. The interactive menu provides options for all worktree operations, while direct commands like "branchlet create" and "branchlet delete" jump straight to specific actions. The tool integrates with editors and terminals through configurable commands, allowing automatic opening of new worktrees in VS Code, Cursor, or other development environments.
# via npm
npm install -g branchlet
