|
| 1 | +# GitHub Copilot CLI launcher |
| 2 | + |
| 3 | +[](https://github.com/TheStreamCode/github-copilot-cli-launcher/actions/workflows/ci.yml) |
| 4 | +[](LICENSE) |
| 5 | + |
| 6 | +A VS Code extension that opens GitHub Copilot CLI in a new side terminal directly from the editor toolbar. One click, fresh terminal, ready to go. |
| 7 | + |
| 8 | +Works on Windows, macOS, and Linux. |
| 9 | + |
| 10 | +> **Disclaimer** |
| 11 | +> This extension is unofficial and is not affiliated with, endorsed by, or sponsored by GitHub or Microsoft. "GitHub Copilot" is a trademark of GitHub, Inc. |
| 12 | +
|
| 13 | +## Features |
| 14 | + |
| 15 | +- **Toolbar launcher** — one-click button in the editor title area to start Copilot CLI |
| 16 | +- **Side-by-side terminal** — opens beside the active editor, never reusing existing terminals |
| 17 | +- **Smart working directory** — uses the active editor's workspace folder, with fallback to the first workspace |
| 18 | +- **Install detection** — shows guided warnings when `gh` or the `gh-copilot` extension is missing |
| 19 | +- **Configurable** — customize the CLI command and terminal label via VS Code settings |
| 20 | +- **Windows-ready** — supports quoted executable paths with spaces |
| 21 | +- **Privacy-first** — no telemetry, analytics, or personal data collection |
| 22 | + |
| 23 | +## Requirements |
| 24 | + |
| 25 | +- VS Code `^1.86.0` |
| 26 | +- [GitHub CLI (`gh`)](https://cli.github.com/) available in the integrated terminal |
| 27 | +- `gh-copilot` extension installed (`gh extension install github/gh-copilot`) |
| 28 | + |
| 29 | +## Installation |
| 30 | + |
| 31 | +1. **Install the extension** from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=mikesoft.vscode-copilot-cli-launcher). |
| 32 | + |
| 33 | +2. **Install GitHub CLI:** |
| 34 | + |
| 35 | + ```bash |
| 36 | + # macOS |
| 37 | + brew install gh |
| 38 | + |
| 39 | + # Windows (winget) |
| 40 | + winget install --id GitHub.cli |
| 41 | + |
| 42 | + # Linux — see https://cli.github.com/ for your distribution |
| 43 | + ``` |
| 44 | + |
| 45 | +3. **Install the Copilot CLI extension:** |
| 46 | + |
| 47 | + ```bash |
| 48 | + gh extension install github/gh-copilot |
| 49 | + ``` |
| 50 | + |
| 51 | +4. Open any file in VS Code and click the launcher button in the editor title. |
| 52 | + |
| 53 | +## How It Works |
| 54 | + |
| 55 | +Each launch creates a new terminal beside the current editor and sends the configured command immediately. Existing terminals are never reused. |
| 56 | + |
| 57 | +The launcher prefers the workspace folder of the active editor for the terminal's working directory. If the active editor is outside the workspace, it falls back to the first workspace folder. |
| 58 | + |
| 59 | +When the terminal runs, the extension checks command availability and surfaces guided warnings if `gh` or the `gh-copilot` extension is missing — making problems easier to understand than relying on terminal output alone. |
| 60 | + |
| 61 | +## Configuration |
| 62 | + |
| 63 | +| Setting | Default | Description | |
| 64 | +| --- | --- | --- | |
| 65 | +| `copilotCliLauncher.cliCommand` | `copilot` | Command executed when the launcher button is clicked. | |
| 66 | +| `copilotCliLauncher.terminalName` | `GitHub Copilot CLI` | Base label used for the created terminal. | |
| 67 | + |
| 68 | +Open settings via the Command Palette: **GitHub Copilot CLI launcher: Open Settings** |
| 69 | + |
| 70 | +**Examples:** |
| 71 | + |
| 72 | +Default command: |
| 73 | + |
| 74 | +```json |
| 75 | +"copilotCliLauncher.cliCommand": "copilot" |
| 76 | +``` |
| 77 | + |
| 78 | +Windows executable path with spaces: |
| 79 | + |
| 80 | +```json |
| 81 | +"copilotCliLauncher.cliCommand": "\"C:\\Program Files\\GitHub CLI\\gh.exe\" copilot" |
| 82 | +``` |
| 83 | + |
| 84 | +## Troubleshooting |
| 85 | + |
| 86 | +### `gh` is not recognized |
| 87 | + |
| 88 | +Install the GitHub CLI from [https://cli.github.com/](https://cli.github.com/) and confirm that `gh` works in a regular integrated terminal. If your setup relies on shell initialization, restart VS Code after installation so new terminals inherit the updated environment. |
| 89 | + |
| 90 | +The extension also shows a VS Code warning dialog to make the issue clearer. |
| 91 | + |
| 92 | +### The gh-copilot extension is not installed |
| 93 | + |
| 94 | +Install it with: |
| 95 | + |
| 96 | +```bash |
| 97 | +gh extension install github/gh-copilot |
| 98 | +``` |
| 99 | + |
| 100 | +### Nothing happens after clicking the button |
| 101 | + |
| 102 | +Check the value of `copilotCliLauncher.cliCommand` in settings and verify that the same command works in a regular terminal. |
| 103 | + |
| 104 | +### Custom executable path on Windows |
| 105 | + |
| 106 | +Quote executable paths that contain spaces, for example: `"C:\Program Files\GitHub CLI\gh.exe" copilot`. |
| 107 | + |
| 108 | +### Multi-root workspaces |
| 109 | + |
| 110 | +The launcher uses the workspace folder of the active editor. To control where Copilot CLI starts in a multi-root window, open a file from the target workspace before clicking the toolbar button. |
| 111 | + |
| 112 | +## Privacy |
| 113 | + |
| 114 | +GitHub Copilot CLI launcher does not collect telemetry, analytics, or personal data. |
| 115 | + |
| 116 | +## Development |
| 117 | + |
| 118 | +```bash |
| 119 | +npm install |
| 120 | +npm run check |
| 121 | +npm run test:integration |
| 122 | +npm run package |
| 123 | +``` |
| 124 | + |
| 125 | +`npm run package` creates the `.vsix` file in the workspace root. |
| 126 | + |
| 127 | +The repository includes unit tests, metadata checks, VS Code integration smoke tests, and CI coverage for Windows and Linux. |
| 128 | + |
| 129 | +## Support |
| 130 | + |
| 131 | +Open a [GitHub issue](https://github.com/TheStreamCode/github-copilot-cli-launcher/issues) for bugs and feature requests. For support details, see [SUPPORT.md](SUPPORT.md). |
| 132 | + |
| 133 | +## License |
| 134 | + |
| 135 | +Released under the [MIT License](LICENSE). |
0 commit comments