-
Notifications
You must be signed in to change notification settings - Fork 0
How to Build
This guide explains how to compile and bundle Black IDE on your local machine.
Black IDE is not a plain extension — it is a full fork of VS Code. A build clones the
upstream microsoft/vscode repository at a pinned tag, overlays Black IDE's own sources
(including the black-ide-agent extension), applies the patch set, and packages an
Electron application.
Before building Black IDE, make sure you have the following installed:
-
Node.js: the exact version is pinned in
.nvmrc— currently 22.22.1. Runnvm usein the repo root. - npm: Node Package Manager.
- Git: to clone upstream and apply build patches.
-
jq: command-line JSON processor (used heavily by the prepare scripts to rewrite
product.json). -
Python 3: required by the VS Code build system for node-gyp, and by
scripts/dev/update_patches.sh. - Rust: required to compile the CLI / tunnel components.
-
macOS: Xcode Command Line Tools (
xcode-select --install). -
Linux:
gcc,g++,make,pkg-config,libx11-dev,libxkbfile-dev,libsecret-1-dev,libkrb5-dev,fakeroot,rpm,dpkg. - Windows: run the build scripts in Git Bash. Install Git for Windows and the C++ build tools (via the Visual Studio Installer).
The upstream VS Code tag and commit are pinned in config/upstream/stable.json and
config/upstream/insider.json — both currently at tag 1.121.0. Bumping these is what
starts a rebase of the patch set onto a new upstream release; see
Patch Update Process.
Release and signing automation reads its configuration from .env. Copy the committed
template and fill in only what you need:
cp .env.example .env.env is gitignored — never commit real values. A plain local build needs none of these;
they matter for the release target and for CI publishing.
Black IDE ships a Makefile that wraps the scripts under scripts/.
| Target | Script | What it does |
|---|---|---|
make dev |
scripts/dev/build.sh |
Full developer build: fetch upstream, apply patches, compile, package |
make build |
scripts/build/build.sh |
Core build; requires OS_NAME and VSCODE_ARCH to be exported |
make build-mac |
scripts/build/build_mac.sh |
Local macOS build |
make build-linux |
scripts/build/build_linux.sh |
Local Linux build |
make build-windows |
scripts/build/build_windows.sh |
Local Windows build |
make icons |
scripts/build/build_icons.sh |
Regenerate application and file-type icons |
make prepare-assets |
scripts/prepare/prepare_assets.sh |
Package artifacts and compute sha1/sha256 checksums into assets/
|
make release |
scripts/release/release.sh |
Upload packaged assets to a GitHub Release |
make clean |
— | Remove vscode*, VSCode*, assets/, sourcemaps/
|
make ci-lint |
zizmor . |
Lint GitHub Actions workflows for security issues |
make ci-lint-fix |
zizmor . --fix=all |
Auto-fix zizmor findings |
make ci-update |
pinact run --update |
Update pinned GitHub Action SHAs (minimum age 7 days) |
Run make help for the same list from the terminal.
make devThis clones the upstream vscode repository at the pinned tag, copies src/stable/ over
it, installs and compiles the black-ide-agent extension and its React webview, rewrites
product.json with Black IDE branding, applies every patch in config/patches/, and
builds the application.
scripts/dev/build.sh accepts flags for less common cases:
| Flag | Effect |
|---|---|
-i |
Build the insider quality (black-ide-insiders, published to ornate-source/blackIDE-insiders) |
-l |
Track the latest upstream release instead of the pinned tag |
-o |
Skip the build step (source preparation only) |
-p |
Also package assets (SKIP_ASSETS=no) |
-s |
Skip source preparation (reuse the existing vscode/ tree) |
# Insiders build, packaged
./scripts/dev/build.sh -i -p-
macOS —
make build-mac(produces.dmgand.zipunderassets/) -
Linux —
make build-linux -
Windows —
make build-windows
make cleanThe AI agent lives at src/stable/extensions/black-ide-agent/ and is a normal TypeScript
extension with its own React webview. You do not need a full Electron build to work on it:
cd src/stable/extensions/black-ide-agent
npm ci
npm ci --prefix webview
npm run compile # tsc -b
npm run build-webview # build the React webview bundle
npm run watch # incremental rebuild
npm test # core harness (mock LLM over HTTP, no VS Code needed)
npm run test:integration # extension-host tests (launches a real VS Code)
npm run lint:css # stylelint over webview CSS
npm run lint:dead-code # knipBoth test layers are gated in CI — see Development Workflow.
When upstream VS Code moves, patches drift. To rebase the set:
- Bump the tag and commit in
config/upstream/stable.json(andinsider.json). - Run the updater:
It re-applies each patch in order and generates
./scripts/dev/update_patches.sh # stable ./scripts/dev/update_patches.sh -i # insider
.rejreject files for the chunks that no longer apply cleanly. - Resolve each rejected chunk by hand, then re-record the patch (see below).
./scripts/dev/patch.sh <patch-name>The script resets the vscode/ tree, applies the helper settings patch plus any patches
you name, then pauses. While it is paused:
- Open the
vscodedirectory in Black IDE. - Run
npm run watch. - Run
./scripts/code.shto launch the patched build. - Make your changes.
- Press any key to let
patch.shrecord the result back intoconfig/patches/.
See Patches for how the patch set is organized and named.