Skip to content

Bundle GitHub Copilot CLI for zero-config installation#14

Draft
Copilot wants to merge 7 commits intomainfrom
copilot/bundle-copilot-cli-installation
Draft

Bundle GitHub Copilot CLI for zero-config installation#14
Copilot wants to merge 7 commits intomainfrom
copilot/bundle-copilot-cli-installation

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Removes manual CLI installation requirement. The @github/copilot-sdk already bundles platform-specific binaries as optional dependencies—this PR detects and uses them.

Changes

  • CLI locator (src/utils/cli-locator.ts): Detects bundled binary in node_modules/@github/copilot-{platform}-{arch}/, falls back to system PATH. Uses execFileSync to prevent command injection.

  • Copilot service (src/services/copilot.ts): Passes explicit cliPath to SDK client. Lazy-initializes and caches location. Enhanced error messages include troubleshooting context.

  • Home screen (src/screens/home.tsx): Displays CLI version and source ([bundled CLI v0.0.403] or [system CLI v0.0.403]).

  • README: Removed CLI installation from prerequisites. Added troubleshooting section for CLI issues.

Usage

Before:

npm install -g @github/copilot && copilot auth
npm install && npm start

After:

npm install && npm start

The SDK's CopilotClient accepts a cliPath option—we populate it from the bundled location:

const location = locateCopilotCli();  // Returns { path, version, source }
const client = new CopilotClient({ cliPath: location.path });
Original prompt

This section details on the original issue you should resolve

<issue_title>[enhancement] Bundle GitHub Copilot CLI for Zero-Config Installation Experience</issue_title>
<issue_description>## Background

Recent work in the Copilot SDK has focused on bundling the GitHub Copilot CLI binary to simplify distribution and eliminate manual installation steps:

  • Go SDK bundling support: PR colindembovsky/planeteer#414 by Quim Muntal (merged Feb 12, 2026) introduces embedding the CLI binary directly in Go applications. The PR describes a mechanism for embedding, unpacking, versioning, file locking, and hash validation.
  • Python wheel fix: PR colindembovsky/planeteer#419 by Steve Sanderson (Feb 10, 2026) ensures the bundled CLI binary has executable permissions.
  • Cross-platform bundling: The v0.1.23 release notes highlight "Bundling" (PR colindembovsky/planeteer#382) as a key feature across SDKs.

Commit references:

  • f1d8cc1 - Go bundling implementation
  • 4dc5629 - Python executable permissions

Proposal

Adopt the CLI bundling approach for Planeteer's Node.js/TypeScript distribution. This would eliminate the current requirement for users to separately install @github/copilot CLI and authenticate before using Planeteer.

Implementation approach:

  1. Investigate if the TypeScript/JavaScript SDK supports bundling (or if it requires custom packaging)
  2. If supported: Add bundling configuration to package.json build scripts
  3. If not yet supported: Create a postinstall script that downloads the correct CLI binary for the user's platform (similar to Electron's approach)
  4. Update src/services/copilot.ts to check for bundled CLI first, falling back to system-installed CLI
  5. Handle auto-updates: Check CLI version on startup and download newer versions if available
  6. Update README prerequisites to remove the manual CLI installation step

Benefit

  • Zero-config experience: Users can run npm install -g planeteer && planeteer without manual CLI setup
  • Version consistency: Bundling ensures Planeteer uses a CLI version that's been tested with the SDK version
  • Distribution simplicity: Single npm package contains everything needed
  • Reduced support burden: Eliminates "CLI not found" errors and authentication confusion
  • Onboarding speed: New users can start using Planeteer in seconds, not minutes

Acceptance Criteria

  • Bundled CLI binary included in npm package for Linux, macOS, and Windows
  • src/services/copilot.ts detects bundled CLI location and uses it by default
  • Fallback logic: if bundled CLI missing/corrupt, attempt to use system-installed CLI
  • Version check on startup compares bundled CLI version with latest available
  • Auto-update mechanism downloads newer CLI versions to user's home directory cache
  • File locking prevents concurrent update attempts (if multiple Planeteer instances run)
  • Hash validation ensures downloaded binaries aren't corrupted
  • README prerequisites section updated to reflect zero-config installation
  • Build script generates platform-specific packages or uses universal bundling approach
  • Integration test verifies bundled CLI works on fresh system without pre-installed CLI

AI generated by Weekly Enhancement Suggestions

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 6 commits February 13, 2026 01:21
Co-authored-by: colindembovsky <1932561+colindembovsky@users.noreply.github.com>
Co-authored-by: colindembovsky <1932561+colindembovsky@users.noreply.github.com>
…fix comment

Co-authored-by: colindembovsky <1932561+colindembovsky@users.noreply.github.com>
Co-authored-by: colindembovsky <1932561+colindembovsky@users.noreply.github.com>
Co-authored-by: colindembovsky <1932561+colindembovsky@users.noreply.github.com>
Co-authored-by: colindembovsky <1932561+colindembovsky@users.noreply.github.com>
Copilot AI changed the title [WIP] Enhance GitHub Copilot CLI for zero-config installation Bundle GitHub Copilot CLI for zero-config installation Feb 13, 2026
Copilot AI requested a review from colindembovsky February 13, 2026 01:30
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.

[enhancement] Bundle GitHub Copilot CLI for Zero-Config Installation Experience

2 participants