{"record":{"id":"66bf7db9bfcb4770","repo":"BloopAI/vibe-kanban","slug":"cli-not-installed","errorCode":"cli_not_installed","errorMessage":"t('createWorkspaceFromPr.errors.cliNotInstalled', { provider: result.error.provider })","messagePattern":"t\\('createWorkspaceFromPr\\.errors\\.cliNotInstalled', (.+?)\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/web-core/src/shared/dialogs/command-bar/CreateWorkspaceFromPrDialog.tsx","lineNumber":159,"sourceCode":"        }\n        const result = await workspacesApi.createFromPr({\n          repo_id: selectedRepoId,\n          pr_number: selectedPrNumber as unknown as bigint,\n          pr_title: selectedPr.title,\n          pr_url: selectedPr.url,\n          head_branch: selectedPr.head_branch,\n          base_branch: selectedPr.base_branch,\n          run_setup: runSetup,\n          remote_name: selectedRemote,\n        });\n        if (!result.success) {\n          switch (result.error?.type) {\n            case 'branch_fetch_failed':\n              throw new Error(result.error.message);\n            case 'auth_failed':\n              throw new Error(result.error.message);\n            case 'cli_not_installed':\n              throw new Error(\n                t('createWorkspaceFromPr.errors.cliNotInstalled', {\n                  provider: result.error.provider,\n                })\n              );\n            case 'pr_not_found':\n              throw new Error(t('createWorkspaceFromPr.errors.prNotFound'));\n            case 'unsupported_provider':\n              throw new Error(\n                t('createWorkspaceFromPr.errors.unsupportedProvider')\n              );\n            default:\n              throw new Error(\n                result.message ||\n                  t('createWorkspaceFromPr.errors.failedToCreateWorkspace')\n              );\n          }\n        }\n        return result.data;","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/packages/web-core/src/shared/dialogs/command-bar/CreateWorkspaceFromPrDialog.tsx#L141-L177","documentation":"This error surfaces when workspacesApi.createFromPr returns { success: false, error: { type: 'cli_not_installed', provider } }. The backend cannot find the forge provider's CLI binary (gh for GitHub, glab/lab for GitLab) required to fetch PR details and branches. The dialog maps it to the localized createWorkspaceFromPr.errors.cliNotInstalled message, interpolating result.error.provider.","triggerScenarios":"Create Workspace clicked on a repo whose remote points to a provider whose CLI is not present on the host PATH; workspacesApi.createFromPr resolves success:false with error.type 'cli_not_installed'.","commonSituations":"Fresh machine or container image without gh/glab installed; CLI installed for a different user than the one running the backend; PATH not including e.g. /usr/local/bin in the backend's environment; remote renamed to a provider the CLI for which is absent.","solutions":["Install the provider CLI on the host: `brew install gh` / `apt install gh`, or `glab` for GitLab","Verify it is on the PATH of the user running the backend: `which gh` / `which glab`","If the CLI is installed but not found, fix the backend process's PATH env or restart the backend from a shell that has it","Point the repo remote at a provider whose CLI you do have, if you don't intend to install one"],"exampleFix":"// before\n$ which gh\ngh not found\n// after\n$ brew install gh && which gh\n/usr/local/bin/gh","handlingStrategy":"validation","validationCode":"import { execFile } from 'child_process';\nimport { promisify } from 'util';\nconst run = promisify(execFile);\nexport async function assertForgeCli(provider: 'github' | 'gitlab') {\n  const cli = provider === 'github' ? 'gh' : 'glab';\n  try { await run(cli, ['--version']); } catch {\n    throw new Error(`${cli} is not installed. Install it and ensure it is on PATH.`);\n  }\n}\n// call before workspacesApi.createFromPr based on the repo's remote provider","typeGuard":"function isCliNotInstalled(e: CreateFromPrError | undefined): e is { type: 'cli_not_installed'; provider: string } {\n  return e?.type === 'cli_not_installed' && 'provider' in e;\n}","tryCatchPattern":"try {\n  await assertForgeCli(providerKind);\n  await workspacesApi.createFromPr(input);\n} catch (err) {\n  if (isCliNotInstalled(parseResultError(err))) {\n    showInstallInstructions(err.provider); // e.g. `brew install gh`\n  }\n}","preventionTips":["Include gh/glab in dev container / setup scripts","Check `which gh` during onboarding and surface a settings warning early","Pin CLI installation in CI images that run the backend","Detect the provider from the remote URL and warn if its CLI is absent before opening the PR dialog"],"tags":["cli","dependencies","git-forge"],"backgroundTag":"missing-cli-binary","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}