gh vibe issue
Looks up the issue via gh issue view, derives a branch name of the form
<type>/<num>-<slug> from the issue’s labels and title, and creates a
vibe worktree off the repository’s default
branch via vibe start <branch> --base <base>.
gh vibe issue <# | URL>Both forms are accepted:
gh vibe issue 42gh vibe issue https://github.com/owner/repo/issues/42--dry-run
Section titled “--dry-run”Prints the derived branch name and base, runs the local-branch collision
check, but skips git fetch and vibe start. The GitHub API is still
queried because the slug depends on the issue’s labels and title.
gh vibe issue 42 --dry-run--base <ref>
Section titled “--base <ref>”Override the base branch. Defaults to the repository’s default branch
(resolved from refs/remotes/origin/HEAD).
gh vibe issue 42 --base develop--type <t>
Section titled “--type <t>”Override the label-inferred type prefix. One of feat, fix, docs,
chore, refactor, test, perf.
gh vibe issue 42 --type featBranch-name derivation
Section titled “Branch-name derivation”The branch name is <type>/<num>-<slug>. Each component is derived
independently:
-
<type>— picked from the first issue label whose normalised name maps to a known type. Approximate mapping (label → prefix):Label (case-insensitive) Prefix feat,feature,enhancementfeatfix,bug,bugfix,defectfixdocs,documentationdocschore,dependencies,deps,cichorerefactor,refactoring,cleanuprefactortest,tests,testingtestperf,performanceperfFalls back to
chorewhen no label maps to a known type.--typebypasses this lookup entirely. -
<num>— the issue number, embedded literally. -
<slug>— derived from the title by NFKD-normalising, stripping combining marks, lower-casing, and replacing any non-ASCII-alphanumeric run with-. Truncated to 50 characters. Titles consisting only of emoji or CJK characters yield an empty slug; in that case the slug falls back toissue-<n>.
Requirements
Section titled “Requirements”gh,git, andvibeavailable inPATH.- Run from inside a git repository whose default remote (
origin) points at the issue’s repo. - When
--baseis omitted,refs/remotes/origin/HEADmust be set. Recreate it withgit remote set-head origin --autoif it is missing.
What it does
Section titled “What it does”- Resolves the issue via
gh issue view(number or URL accepted). - Resolves the base branch (
--basevalue or repository default). - Derives the local branch name from labels + title (see above).
- Refuses to proceed if a local branch by that name already exists.
git fetches the base branch fromorigin.- Hands off to
vibe start <branch> --base <base>to create the worktree.
Pair this with gh vibe shell-setup so that your
shell cds into the worktree on success.