mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-29 03:44:06 +08:00
feat: vscode publish
This commit is contained in:
@@ -2,6 +2,12 @@ name: publish-vscode
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
cli_version:
|
||||
description: "CLI release version to use (e.g. v1.0.21, or 'latest')"
|
||||
required: false
|
||||
type: string
|
||||
default: "latest"
|
||||
push:
|
||||
tags:
|
||||
- "vscode-v*.*.*"
|
||||
@@ -13,9 +19,6 @@ permissions:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
# kilocode_change start - disabled for kilo-cli fork (OpenCode VSCode extension publishing)
|
||||
if: false
|
||||
# kilocode_change end
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -24,17 +27,20 @@ jobs:
|
||||
|
||||
- uses: ./.github/actions/setup-bun
|
||||
|
||||
- run: git fetch --force --tags
|
||||
- run: bun install -g @vscode/vsce
|
||||
- name: Setup pnpm
|
||||
run: bun install -g pnpm
|
||||
|
||||
- name: Install @vscode/vsce
|
||||
run: bun install -g @vscode/vsce
|
||||
|
||||
- name: Install extension dependencies
|
||||
run: bun install
|
||||
working-directory: ./sdks/vscode
|
||||
run: pnpm install
|
||||
working-directory: ./packages/kilo-vscode
|
||||
|
||||
- name: Publish
|
||||
run: |
|
||||
./script/publish
|
||||
working-directory: ./sdks/vscode
|
||||
- name: Publish all targets
|
||||
run: bun script/publish.ts
|
||||
working-directory: ./packages/kilo-vscode
|
||||
env:
|
||||
VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
||||
OPENVSX_TOKEN: ${{ secrets.OPENVSX_TOKEN }}
|
||||
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}
|
||||
OPENVSX_TOKEN: ${{ secrets.OVSX_TOKEN }}
|
||||
KILO_CLI_VERSION: ${{ inputs.cli_version || 'latest' }}
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
git
|
||||
gh
|
||||
playwright-driver.browsers
|
||||
vsce
|
||||
unzip
|
||||
gnutar
|
||||
gzip
|
||||
kilo
|
||||
];
|
||||
shellHook = ''
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
bin/
|
||||
out/
|
||||
@@ -4,6 +4,7 @@ out/**
|
||||
node_modules/**
|
||||
src/**
|
||||
webview-ui/**
|
||||
script/**
|
||||
.gitignore
|
||||
.yarnrc
|
||||
.npmrc
|
||||
@@ -15,6 +16,11 @@ vsc-extension-quickstart.md
|
||||
**/*.ts
|
||||
**/.vscode-test.*
|
||||
pnpm-lock.yaml
|
||||
AGENTS.md
|
||||
.prettierignore
|
||||
|
||||
# Include dist/ directory for compiled extension (production)
|
||||
!dist/**
|
||||
|
||||
# Include bin/ directory for CLI binary (production)
|
||||
!bin/**
|
||||
|
||||
+105
-48
@@ -1,71 +1,128 @@
|
||||
# kilo-code README
|
||||
<p align="center">
|
||||
<a href="https://marketplace.visualstudio.com/items?itemName=kilocode.Kilo-Code"><img src="https://img.shields.io/badge/VS_Code_Marketplace-007ACC?style=flat&logo=visualstudiocode&logoColor=white" alt="VS Code Marketplace"></a>
|
||||
<a href="https://x.com/kilocode"><img src="https://img.shields.io/badge/kilocode-000000?style=flat&logo=x&logoColor=white" alt="X (Twitter)"></a>
|
||||
<a href="https://blog.kilo.ai"><img src="https://img.shields.io/badge/Blog-555?style=flat&logo=substack&logoColor=white" alt="Substack Blog"></a>
|
||||
<a href="https://kilo.ai/discord"><img src="https://img.shields.io/badge/Join%20Discord-5865F2?style=flat&logo=discord&logoColor=white" alt="Discord"></a>
|
||||
<a href="https://www.reddit.com/r/kilocode/"><img src="https://img.shields.io/badge/Join%20r%2Fkilocode-D84315?style=flat&logo=reddit&logoColor=white" alt="Reddit"></a>
|
||||
</p>
|
||||
|
||||
This is the README for your extension "kilo-code". After writing up a brief description, we recommend including the following sections.
|
||||
# 🚀 Kilo
|
||||
|
||||
## Features
|
||||
> Kilo is the all-in-one agentic engineering platform. Build, ship, and iterate faster with the most popular open source coding agent.
|
||||
> #1 on OpenRouter. 1.5M+ Kilo Coders. 25T+ tokens processed
|
||||
|
||||
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
|
||||
- ✨ Generate code from natural language
|
||||
- ✅ Checks its own work
|
||||
- 🧪 Run terminal commands
|
||||
- 🌐 Automate the browser
|
||||
- ⚡ Inline autocomplete suggestions
|
||||
- 🤖 Latest AI models
|
||||
- 🎁 API keys optional
|
||||
- 💡 **Get $20 in bonus credits when you top-up for the first time** Credits can be used with 500+ models like Gemini 3 Pro, Claude 4.5 Sonnet & Opus, and GPT-5
|
||||
|
||||
For example if there is an image subfolder under your extension project workspace:
|
||||
<p align="center">
|
||||
<img src="https://media.githubusercontent.com/media/Kilo-Org/kilocode/main/kilo.gif" width="100%" />
|
||||
</p>
|
||||
|
||||
\!\[feature X\]\(images/feature-x.png\)
|
||||
## Quick Links
|
||||
|
||||
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
|
||||
- [VS Code Marketplace](https://kilo.ai/vscode-marketplace?utm_source=Readme) (download)
|
||||
- [Official Kilo.ai Home page](https://kilo.ai) (learn more)
|
||||
|
||||
## Requirements
|
||||
## Key Features
|
||||
|
||||
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
|
||||
- **Code Generation:** Kilo can generate code using natural language.
|
||||
- **Inline Autocomplete:** Get intelligent code completions as you type, powered by AI.
|
||||
- **Task Automation:** Kilo can automate repetitive coding tasks to save time..
|
||||
- **Automated Refactoring:** Kilo can refactor and improve existing code efficiently.
|
||||
- **MCP Server Marketplace**: Kilo can easily find, and use MCP servers to extend the agent capabilities.
|
||||
- **Multi Mode**: Plan with Architect, Code with Coder, and Debug with Debugger, and make your own custom modes.
|
||||
|
||||
## Extension Settings
|
||||
## Get Started
|
||||
|
||||
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
|
||||
1. Install the Kilo Code extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=kilocode.Kilo-Code).
|
||||
2. Create your account to access 500+ cutting-edge AI models including Gemini 3 Pro, Claude 4.5 Sonnet & Opus, and GPT-5 – with transparent pricing that matches provider rates exactly.
|
||||
3. Start coding with AI that adapts to your workflow. Watch our quick-start guide to see Kilo in action:
|
||||
|
||||
For example:
|
||||
[](https://youtu.be/pqGfYXgrhig)
|
||||
|
||||
This extension contributes the following settings:
|
||||
## Developer Setup
|
||||
|
||||
- `myExtension.enable`: Enable/disable this extension.
|
||||
- `myExtension.thing`: Set to `blah` to do something.
|
||||
If you want to contribute or modify the extension locally, see the [DEVELOPMENT.md](/DEVELOPMENT.md) file for build and setup instructions.
|
||||
|
||||
## Known Issues
|
||||
## Contributing
|
||||
|
||||
Calling out known issues can help limit users opening duplicate issues against your extension.
|
||||
We welcome contributions from developers, writers, and enthusiasts!
|
||||
To get started, please read our [Contributing Guide](/CONTRIBUTING.md). It includes details on setting up your environment, coding standards, types of contribution and how to submit pull requests.
|
||||
|
||||
## Release Notes
|
||||
## Code of Conduct
|
||||
|
||||
Users appreciate release notes as you update your extension.
|
||||
Our community is built on respect, inclusivity, and collaboration. Please review our [Code of Conduct](/CODE_OF_CONDUCT.md) to understand the expectations for all contributors and community members.
|
||||
|
||||
### 1.0.0
|
||||
## License
|
||||
|
||||
Initial release of ...
|
||||
This project is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
|
||||
You’re free to use, modify, and distribute this code, including for commercial purposes as long as you include proper attribution and license notices. See [License](/LICENSE).
|
||||
|
||||
### 1.0.1
|
||||
## Contributing
|
||||
|
||||
Fixed issue #.
|
||||
Contributions are welcome, and they are greatly appreciated! Get started by reading our [Contributing Guide](CONTRIBUTING.md). Or join our [Discord](https://discord.gg/kilocode) to chat with the team and community.
|
||||
|
||||
### 1.1.0
|
||||
Thanks to all the contributors who help make Kilo better!
|
||||
|
||||
Added features X, Y, and Z.
|
||||
|
||||
---
|
||||
|
||||
## Following extension guidelines
|
||||
|
||||
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
|
||||
|
||||
- [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)
|
||||
|
||||
## Working with Markdown
|
||||
|
||||
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
|
||||
|
||||
- Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
|
||||
- Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
|
||||
- Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.
|
||||
|
||||
## For more information
|
||||
|
||||
- [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
|
||||
- [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
|
||||
|
||||
**Enjoy!**
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/mcowger">
|
||||
<img src="https://avatars.githubusercontent.com/u/1929548?size=100" width="100" height="100" alt="mcowger" style="border-radius: 50%;" />
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/bhaktatejas922">
|
||||
<img src="https://avatars.githubusercontent.com/u/26863466?size=100" width="100" height="100" alt="bhaktatejas922" style="border-radius: 50%;" />
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/NyxJae">
|
||||
<img src="https://avatars.githubusercontent.com/u/52313587?size=100" width="100" height="100" alt="NyxJae" style="border-radius: 50%;" />
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Aikiboy123">
|
||||
<img src="https://avatars.githubusercontent.com/u/161741275?size=100" width="100" height="100" alt="Aikiboy123" style="border-radius: 50%;" />
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/cobra91">
|
||||
<img src="https://avatars.githubusercontent.com/u/1060585?size=100" width="100" height="100" alt="cobra91" style="border-radius: 50%;" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/ivanarifin">
|
||||
<img src="https://avatars.githubusercontent.com/u/111653938?size=100" width="100" height="100" alt="ivanarifin" style="border-radius: 50%;" />
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/PeterDaveHello">
|
||||
<img src="https://avatars.githubusercontent.com/u/3691490?size=100" width="100" height="100" alt="PeterDaveHello" style="border-radius: 50%;" />
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/possible055">
|
||||
<img src="https://avatars.githubusercontent.com/u/38576169?size=100" width="100" height="100" alt="possible055" style="border-radius: 50%;" />
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/seuros">
|
||||
<img src="https://avatars.githubusercontent.com/u/2394703?size=100" width="100" height="100" alt="seuros" style="border-radius: 50%;" />
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Kilo-Org/kilocode/graphs/contributors">
|
||||
<b>more ...</b>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -2,9 +2,15 @@
|
||||
"name": "kilo-code",
|
||||
"displayName": "Kilo Code",
|
||||
"description": "Kilo Code AI Agent & Autocomplete",
|
||||
"version": "1.0.21",
|
||||
"version": "7.0.21",
|
||||
"publisher": "kilocode",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Kilo-Org/kilo.git",
|
||||
"directory": "packages/kilo-vscode"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.109.0"
|
||||
"vscode": "^1.108.0"
|
||||
},
|
||||
"categories": [
|
||||
"Other"
|
||||
@@ -248,8 +254,7 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"vscode:prepublish": "pnpm run package",
|
||||
"prepare:cli-binary": "node scripts/prepare-cli-binary.mjs",
|
||||
"prepare:cli-binary": "node script/local-bin.mjs",
|
||||
"compile": "pnpm run prepare:cli-binary && pnpm run check-types && pnpm run lint && node esbuild.js",
|
||||
"watch": "npm-run-all -p watch:*",
|
||||
"watch:esbuild": "pnpm run prepare:cli-binary && node esbuild.js --watch",
|
||||
@@ -262,15 +267,14 @@
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check .",
|
||||
"lint": "eslint src",
|
||||
"test": "vscode-test",
|
||||
"update-backend": "node scripts/prepare-cli-binary.mjs --force"
|
||||
"test": "vscode-test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/diff": "^6.0.0",
|
||||
"@types/mocha": "^10.0.10",
|
||||
"@types/node": "22.x",
|
||||
"@types/qrcode": "^1.5.6",
|
||||
"@types/vscode": "^1.109.0",
|
||||
"@types/vscode": "^1.108.0",
|
||||
"@vscode/test-cli": "^0.0.12",
|
||||
"@vscode/test-electron": "^2.5.2",
|
||||
"esbuild": "^0.27.2",
|
||||
|
||||
Generated
+1275
-1759
File diff suppressed because it is too large
Load Diff
Executable
+125
@@ -0,0 +1,125 @@
|
||||
#!/usr/bin/env bun
|
||||
import { $ } from "bun"
|
||||
import { join } from "node:path"
|
||||
import { existsSync, mkdirSync, rmSync, chmodSync } from "node:fs"
|
||||
import { tmpdir } from "node:os"
|
||||
|
||||
const packageJson = await Bun.file(join(import.meta.dir, "..", "package.json")).json()
|
||||
const version = packageJson.version
|
||||
|
||||
console.log(`Publishing version: ${version}`)
|
||||
|
||||
// Get release version from env or default to "latest"
|
||||
const releaseVersion = process.env.KILO_CLI_VERSION || "latest"
|
||||
console.log(`Using CLI release version: ${releaseVersion}`)
|
||||
|
||||
// Target platform configurations
|
||||
const targets = [
|
||||
{ target: "linux-x64", asset: "kilo-linux-x64.tar.gz", binary: "kilo" },
|
||||
{ target: "linux-arm64", asset: "kilo-linux-arm64.tar.gz", binary: "kilo" },
|
||||
{ target: "alpine-x64", asset: "kilo-linux-x64-musl.tar.gz", binary: "kilo" },
|
||||
{ target: "alpine-arm64", asset: "kilo-linux-arm64-musl.tar.gz", binary: "kilo" },
|
||||
{ target: "darwin-x64", asset: "kilo-darwin-x64.zip", binary: "kilo" },
|
||||
{ target: "darwin-arm64", asset: "kilo-darwin-arm64.zip", binary: "kilo" },
|
||||
{ target: "win32-x64", asset: "kilo-windows-x64.zip", binary: "kilo.exe" },
|
||||
]
|
||||
|
||||
const binDir = join(import.meta.dir, "..", "bin")
|
||||
const distDir = join(import.meta.dir, "..", "dist")
|
||||
const outDir = join(import.meta.dir, "..", "out")
|
||||
|
||||
// Clean up directories at start
|
||||
console.log("\n🧹 Cleaning up directories...")
|
||||
for (const dir of [binDir, distDir, outDir]) {
|
||||
if (existsSync(dir)) {
|
||||
rmSync(dir, { recursive: true, force: true })
|
||||
console.log(` ✓ Cleaned ${dir}`)
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure directories exist
|
||||
mkdirSync(outDir, { recursive: true })
|
||||
mkdirSync(distDir, { recursive: true })
|
||||
|
||||
// Compile the extension once (platform-agnostic)
|
||||
console.log("\n📦 Compiling extension...")
|
||||
await $`pnpm run check-types`
|
||||
await $`pnpm run lint`
|
||||
await $`node ${join(import.meta.dir, "..", "esbuild.js")} --production`
|
||||
|
||||
// Process each target
|
||||
for (const config of targets) {
|
||||
console.log(`\n🎯 Processing target: ${config.target}`)
|
||||
|
||||
// Clean bin directory
|
||||
if (existsSync(binDir)) {
|
||||
rmSync(binDir, { recursive: true, force: true })
|
||||
}
|
||||
mkdirSync(binDir, { recursive: true })
|
||||
|
||||
// Download and extract binary
|
||||
console.log(` 📥 Downloading ${config.asset}...`)
|
||||
const tmpDir = join(tmpdir(), `kilo-cli-${config.target}-${Date.now()}`)
|
||||
mkdirSync(tmpDir, { recursive: true })
|
||||
|
||||
try {
|
||||
const downloadUrl =
|
||||
releaseVersion === "latest"
|
||||
? `https://github.com/Kilo-Org/kilo/releases/latest/download/${config.asset}`
|
||||
: `https://github.com/Kilo-Org/kilo/releases/download/${releaseVersion}/${config.asset}`
|
||||
|
||||
const assetPath = join(tmpDir, config.asset)
|
||||
await $`curl -fsSL -o ${assetPath} ${downloadUrl}`
|
||||
|
||||
// Extract based on file type
|
||||
console.log(` 📂 Extracting binary...`)
|
||||
if (config.asset.endsWith(".tar.gz")) {
|
||||
await $`tar -xzf ${assetPath} -C ${tmpDir}`
|
||||
} else if (config.asset.endsWith(".zip")) {
|
||||
await $`unzip -q ${assetPath} -d ${tmpDir}`
|
||||
}
|
||||
|
||||
// Find and copy binary
|
||||
const extractedBinary = join(tmpDir, config.binary)
|
||||
const targetBinary = join(binDir, config.binary)
|
||||
|
||||
if (!existsSync(extractedBinary)) {
|
||||
throw new Error(`Binary not found at ${extractedBinary}`)
|
||||
}
|
||||
|
||||
await $`cp ${extractedBinary} ${targetBinary}`
|
||||
|
||||
// Set executable permissions (Unix-like systems)
|
||||
if (config.binary !== "kilo.exe") {
|
||||
chmodSync(targetBinary, 0o755)
|
||||
}
|
||||
|
||||
console.log(` ✅ Binary ready at ${targetBinary}`)
|
||||
} finally {
|
||||
// Cleanup temp directory
|
||||
rmSync(tmpDir, { recursive: true, force: true })
|
||||
}
|
||||
|
||||
// Package for this target (skip prepublish to keep downloaded binary)
|
||||
console.log(` 📦 Packaging .vsix for ${config.target}...`)
|
||||
const vsixPath = join(outDir, `kilo-code-${config.target}.vsix`)
|
||||
await $`vsce package --pre-release --no-dependencies --skip-license --target ${config.target} -o ${vsixPath} ${version}`.env(
|
||||
{
|
||||
...process.env,
|
||||
npm_config_ignore_scripts: "true",
|
||||
},
|
||||
)
|
||||
console.log(` ✅ Created ${vsixPath}`)
|
||||
|
||||
// Publish for this target
|
||||
console.log(` 🚀 Publishing to VS Code Marketplace for ${config.target}...`)
|
||||
await $`vsce publish --pre-release --target ${config.target} --packagePath ${vsixPath}`
|
||||
console.log(` ✅ Published ${config.target}`)
|
||||
|
||||
// Note: Open VSX publishing is commented out as it doesn't support prereleases
|
||||
// console.log("\n📤 Publishing to Open VSX...")
|
||||
// await $`npx ovsx publish ${vsixPath} --target ${config.target} -p ${process.env.OPENVSX_TOKEN}`
|
||||
// console.log("✅ Published to Open VSX!")
|
||||
}
|
||||
|
||||
console.log("\n✨ All targets published successfully!")
|
||||
+6
-1
@@ -41,7 +41,12 @@ const pkgjsons = await Array.fromAsync(
|
||||
|
||||
for (const file of pkgjsons) {
|
||||
let pkg = await Bun.file(file).text()
|
||||
pkg = pkg.replaceAll(/"version": "[^"]+"/g, `"version": "${Script.version}"`)
|
||||
// kilocode_change start
|
||||
const version = file.includes("packages/kilo-vscode/")
|
||||
? Script.version.replace(/^\d+/, (m) => String(Number(m) + 6))
|
||||
: Script.version
|
||||
// kilocode_change end
|
||||
pkg = pkg.replaceAll(/"version": "[^"]+"/g, `"version": "${version}"`)
|
||||
console.log("updated:", file)
|
||||
await Bun.file(file).write(pkg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user