Skip to content

Commit a5a9019

Browse files
committed
feat: add Kimi Code CLI launcher
0 parents  commit a5a9019

26 files changed

Lines changed: 5719 additions & 0 deletions

‎.gitattributes‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto eol=lf
2+
*.png binary
3+
*.ico binary

‎.github/workflows/ci.yml‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
validate:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os:
17+
- windows-latest
18+
- ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v7
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: 22
28+
cache: npm
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Run validation suite on Windows
34+
if: runner.os == 'Windows'
35+
run: npm run check
36+
37+
- name: Run validation suite on Linux
38+
if: runner.os == 'Linux'
39+
run: xvfb-run -a npm run check

‎.gitignore‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules/
2+
out/
3+
out/**/*.map
4+
.kimi/
5+
*.vsix
6+
*.tgz
7+
.vscode-test/
8+
.vsce/
9+
coverage/
10+
*.log
11+
*.tsbuildinfo
12+
.DS_Store
13+
Thumbs.db
14+
Screenshot_*.jpeg

‎.vscodeignore‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
src/**
2+
test/**
3+
docs/**
4+
scripts/**
5+
node_modules/**
6+
.git/**
7+
.gitignore
8+
.github/**
9+
.kimi/**
10+
.vscode/**
11+
.vsce/**
12+
*.vsix
13+
*.log
14+
out/**/*.map
15+
*.tsbuildinfo
16+
tsconfig.json
17+
package-lock.json

‎CHANGELOG.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## 0.1.0 - 2026-07-16
8+
9+
### Added
10+
11+
- Editor toolbar command for opening Kimi Code CLI in a fresh side terminal
12+
- Workspace-aware terminal directory selection
13+
- Configurable launch command and terminal name
14+
- Workspace Trust protection
15+
- Luminous blue avatar artwork for toolbar and Marketplace surfaces
16+
- Unit, metadata, integration, packaging, and cross-platform CI validation

‎CITATION.cff‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
title: "Kimi Code CLI Launcher"
4+
authors:
5+
- family-names: Gasperini
6+
given-names: Michael
7+
url: "https://github.com/TheStreamCode/vscode-kimi-code-cli-launcher"
8+
version: "0.1.0"
9+
license: MIT

‎CODE_OF_CONDUCT.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Code of Conduct
2+
3+
## Our Standard
4+
5+
Contributors are expected to be respectful, direct, and constructive.
6+
7+
Positive behavior includes:
8+
9+
- giving actionable technical feedback
10+
- assuming good intent
11+
- discussing code and behavior rather than attacking people
12+
- sharing context when disagreeing
13+
14+
Unacceptable behavior includes:
15+
16+
- harassment or abuse
17+
- personal attacks
18+
- doxxing or disclosure of private information
19+
- disruptive or bad-faith participation
20+
21+
## Enforcement
22+
23+
Project maintainers may remove comments, issues, pull requests, or contributors that violate this policy.
24+
25+
## Reporting
26+
27+
Use the maintainer contact listed at [mikesoft.it](https://mikesoft.it) for private conduct concerns.

‎CONTRIBUTING.md‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing
2+
3+
Thanks for your interest in improving Kimi Code CLI Launcher.
4+
5+
## Development
6+
7+
Requirements:
8+
9+
- Node.js 22 or later
10+
- npm
11+
- VS Code `^1.103.0` or later
12+
13+
Install dependencies and run the complete validation suite:
14+
15+
```bash
16+
npm install
17+
npm run check
18+
```
19+
20+
Keep changes focused and covered by tests. Update the README and changelog when user-facing behavior changes.
21+
22+
Do not add copied Kimi assets, automatic installers, telemetry, or hidden command execution.
23+
24+
## Pull Requests
25+
26+
- Explain the problem and the observable behavior change.
27+
- Add or update targeted tests.
28+
- Preserve Workspace Trust protections.
29+
- Run `npm run check` before submitting.
30+
- Do not include generated VSIX files.

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Michael Gasperini (Mikesoft)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md‎

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
# Kimi Code CLI Launcher for VS Code
2+
3+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
4+
[![GitHub Release](https://img.shields.io/github/v/release/TheStreamCode/vscode-kimi-code-cli-launcher)](https://github.com/TheStreamCode/vscode-kimi-code-cli-launcher/releases/latest)
5+
[![CI](https://github.com/TheStreamCode/vscode-kimi-code-cli-launcher/actions/workflows/ci.yml/badge.svg)](https://github.com/TheStreamCode/vscode-kimi-code-cli-launcher/actions/workflows/ci.yml)
6+
7+
Kimi Code CLI Launcher for VS Code is a lightweight, unofficial VS Code extension that starts the Kimi Code CLI AI coding agent directly from the editor toolbar. One click opens `kimi` in a new side terminal rooted in your current workspace, with no hidden process, automatic installer, sidebar, or telemetry.
8+
9+
Use it when you want the terminal-native Kimi experience inside VS Code. The extension also works with compatible editors such as Cursor and Windsurf on Windows, macOS, and Linux.
10+
11+
> **Disclaimer**
12+
> This extension is unofficial and is not affiliated with, endorsed by, or sponsored by Moonshot AI or Kimi. The Kimi name is used only to identify the compatible CLI. The blue avatar artwork is an independent redraw for this launcher, not an official Kimi asset. See [TRADEMARKS.md](TRADEMARKS.md).
13+
14+
## At a Glance
15+
16+
| | Kimi Code CLI Launcher |
17+
| --- | --- |
18+
| **Purpose** | Launch Kimi Code CLI from the VS Code editor toolbar |
19+
| **Current release** | `0.1.0` |
20+
| **Default command** | `kimi` |
21+
| **Terminal behavior** | Opens a fresh side terminal for every launch |
22+
| **Working directory** | Uses the workspace of the active editor when available |
23+
| **Platforms** | Windows, macOS, and Linux |
24+
| **Compatible editors** | VS Code, Cursor, and Windsurf |
25+
| **Privacy** | No telemetry, analytics, or personal-data collection |
26+
27+
## Features
28+
29+
- Adds a luminous blue avatar launcher to the editor title toolbar
30+
- Opens a fresh terminal beside the active editor on every launch
31+
- Uses the workspace of the active editor when available
32+
- Falls back to the first folder in a multi-root workspace
33+
- Runs a configurable Kimi Code CLI command
34+
- Supports quoted executable paths on Windows
35+
- Requires Workspace Trust before running commands
36+
- Does not collect telemetry, analytics, or personal data
37+
38+
## Quick Start
39+
40+
1. Install Kimi Code CLI using the [official getting-started guide](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/getting-started.html).
41+
2. Confirm that `kimi --version` works in a regular integrated terminal.
42+
3. Install the launcher from the VSIX attached to the [latest GitHub release](https://github.com/TheStreamCode/vscode-kimi-code-cli-launcher/releases/latest).
43+
4. Open a project file and click the blue avatar in the editor toolbar.
44+
45+
Each click starts a separate Kimi Code CLI session beside the active editor.
46+
47+
## Requirements
48+
49+
- VS Code `^1.103.0` or a compatible editor
50+
- Kimi Code CLI available in the integrated terminal environment
51+
- Git for Windows before first launch on Windows
52+
53+
Follow the [official Kimi Code CLI getting-started guide](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/getting-started.html) for current installation instructions.
54+
55+
The recommended Windows installer is:
56+
57+
```powershell
58+
irm https://code.kimi.com/kimi-code/install.ps1 | iex
59+
```
60+
61+
Kimi uses the Git Bash bundled with Git for Windows. If Git Bash is installed in a custom location, set `KIMI_SHELL_PATH` to the absolute path of `bash.exe`.
62+
63+
The official npm alternative requires Node.js 22.19.0 or later:
64+
65+
```bash
66+
npm install -g @moonshot-ai/kimi-code
67+
```
68+
69+
Verify the CLI before using the launcher:
70+
71+
```bash
72+
kimi --version
73+
```
74+
75+
This extension does not install Kimi Code CLI or modify your shell configuration.
76+
77+
## Installation
78+
79+
Download `vscode-kimi-code-cli-launcher-0.1.0.vsix` from the [latest GitHub release](https://github.com/TheStreamCode/vscode-kimi-code-cli-launcher/releases/latest), then install it from the command line:
80+
81+
```bash
82+
code --install-extension vscode-kimi-code-cli-launcher-0.1.0.vsix
83+
```
84+
85+
To build the VSIX locally instead:
86+
87+
```bash
88+
npm install
89+
npm run check
90+
npm run package
91+
code --install-extension vscode-kimi-code-cli-launcher-0.1.0.vsix
92+
```
93+
94+
Open a file and click the blue avatar in the editor toolbar.
95+
96+
## How It Works
97+
98+
Each click creates a new integrated terminal beside the editor and sends the configured command to it. Existing terminals are never reused or inspected.
99+
100+
The launcher starts in the workspace of the active editor. If that file is outside the workspace, it uses the first open workspace folder. With no open workspace, VS Code selects the terminal directory.
101+
102+
The launcher is disabled in untrusted workspaces because it runs a user-configurable terminal command. Review both the workspace and the setting before granting trust.
103+
104+
## Kimi Code CLI Launcher vs. the Official Kimi Code Extension
105+
106+
This project is a terminal-first launcher. It opens the native Kimi Code CLI interface in an integrated terminal and intentionally does not reproduce editor chat, agent panels, or other IDE integration.
107+
108+
The [official Kimi Code extension](https://marketplace.visualstudio.com/items?itemName=moonshot-ai.kimi-code), maintained by Moonshot AI, provides a different editor integration and does not launch Kimi Code CLI in a terminal. This independent launcher exists specifically to provide one-click access to the native `kimi` terminal experience.
109+
110+
| | This launcher | Official Kimi Code extension |
111+
| --- | --- | --- |
112+
| **Publisher** | Mikesoft, unofficial | Moonshot AI, official |
113+
| **Primary experience** | Native Kimi Code CLI in a side terminal | Official Kimi editor integration |
114+
| **Launches `kimi` in a terminal** | Yes, with one click | No |
115+
| **Launch command** | Configurable; defaults to `kimi` | Not a terminal CLI launcher |
116+
| **Terminal sessions** | Fresh terminal on every click | Not provided by the official extension |
117+
118+
## Configuration
119+
120+
| Setting | Default | Description |
121+
| --- | --- | --- |
122+
| `kimiCodeCliLauncher.cliCommand` | `kimi` | Command sent to the new terminal. |
123+
| `kimiCodeCliLauncher.terminalName` | `Kimi Code CLI` | Base label for new terminals. |
124+
125+
Open the settings from the Command Palette:
126+
127+
- `Kimi Code CLI Launcher: Open Settings`
128+
129+
Default command:
130+
131+
```json
132+
"kimiCodeCliLauncher.cliCommand": "kimi"
133+
```
134+
135+
Windows path with spaces:
136+
137+
```json
138+
"kimiCodeCliLauncher.cliCommand": "\"C:\\Program Files\\Kimi Code\\kimi.exe\""
139+
```
140+
141+
## Troubleshooting
142+
143+
### The terminal opens but `kimi` is not recognized
144+
145+
Confirm that `kimi --version` works in a regular integrated terminal. If Kimi was installed while VS Code was open, restart the editor so new terminals inherit the updated `PATH`.
146+
147+
Use only the [official installation guide](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/getting-started.html) for current setup instructions.
148+
149+
### Kimi cannot find Git Bash on Windows
150+
151+
Install Git for Windows. For a non-default installation, set `KIMI_SHELL_PATH` to the absolute path of `bash.exe`, then restart VS Code.
152+
153+
### Multi-root workspaces
154+
155+
Open a file from the target workspace before clicking the launcher. The active editor determines the preferred working directory.
156+
157+
## Frequently Asked Questions
158+
159+
### How do I run Kimi Code CLI in VS Code?
160+
161+
Install Kimi Code CLI from the official guide, verify that `kimi --version` works in VS Code's integrated terminal, install this launcher, then click the blue avatar in the editor toolbar. The extension opens `kimi` in a new side terminal using the active workspace as its working directory.
162+
163+
### Is this the official Kimi VS Code extension?
164+
165+
No. Kimi Code CLI Launcher is an independent, unofficial terminal launcher maintained by Mikesoft. Moonshot AI publishes the [official Kimi Code extension](https://marketplace.visualstudio.com/items?itemName=moonshot-ai.kimi-code) for its supported editor integration.
166+
167+
### Does the launcher install Kimi Code CLI?
168+
169+
No. The extension never downloads or installs Kimi, modifies your shell, or runs hidden setup scripts. Install Kimi Code CLI separately by following the [official getting-started guide](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/getting-started.html).
170+
171+
### Does it work with Cursor and Windsurf?
172+
173+
The launcher uses standard VS Code extension and integrated-terminal APIs and is designed for VS Code-compatible editors such as Cursor and Windsurf. Compatibility can vary with each editor release; VS Code is covered by the automated Extension Host test.
174+
175+
### Does the launcher reuse an existing Kimi terminal?
176+
177+
No. Every click creates a fresh terminal and starts a separate Kimi Code CLI session. Existing terminals are never inspected, modified, or reused.
178+
179+
## Privacy and Security
180+
181+
Kimi Code CLI Launcher does not collect telemetry, analytics, or personal data. It does not install software, create temporary scripts, inspect terminal output, or invoke hidden child processes.
182+
183+
The configured command is sent visibly to the VS Code integrated terminal only after Workspace Trust is granted.
184+
185+
## Development
186+
187+
```bash
188+
npm install
189+
npm run check
190+
npm run package
191+
```
192+
193+
The validation suite includes unit tests, metadata checks, an Extension Host smoke test, and package-content inspection.
194+
195+
## Support
196+
197+
Open a GitHub issue for reproducible bugs and feature requests. See [SUPPORT.md](SUPPORT.md) for the information to include.
198+
199+
Maintained by [Michael Gasperini (Mikesoft)](https://mikesoft.it).
200+
201+
## License
202+
203+
Released under the [MIT License](LICENSE).

0 commit comments

Comments
 (0)