Skip to content

Latest commit

 

History

History
92 lines (59 loc) · 3.07 KB

File metadata and controls

92 lines (59 loc) · 3.07 KB

Building Open Code (bootstrap layout)

For MVP status, missing pieces, and product suggestions (Gemma packaging, hunk review, mindsets, memory layers), see MVP_AND_ROADMAP.md.

Prerequisites

  • Node.js 20+
  • Rust 1.85+ (stable), cargo, rustc — for crates/open-code-memory and crates/open-code-logic (see rust-toolchain.toml)
  • VS Code or VSCodium for extension development

No Ollama or other local LLM installs are required for development; the default Gemma profile targets http://127.0.0.1 and is satisfied by a stub in dev or your packaged runtime later.

Install

npm install

For a single Mac/Linux bootstrap that installs missing Node/Rust tooling into .open-code/toolchain/, builds everything, and prepares the default local Gemma model when Ollama is installed:

scripts/install-mvp-macos-linux.sh

The sandboxed bootstrap uses:

  • OPEN_CODE_TOOLCHAIN_DIR to override the local toolchain directory.
  • OPEN_CODE_NODE_VERSION to override the downloaded Node.js version.
  • OPEN_CODE_RUST_TOOLCHAIN to override the Rust toolchain.
  • OPEN_CODE_GEMMA_MODEL to override the Ollama model tag.

The script still requires curl, tar, and network access when local Node/Rust tools are missing.

After a successful installer run, reuse the generated environment in future shells:

. .open-code/toolchain/env.sh

Build everything

npm run build

This compiles the VS Code extension (packages/extension), the desktop frontend (packages/desktop), the Rust logic core (crates/open-code-logic), and the Rust memory daemon (crates/open-code-memory).

E2E readiness

For the full "download, build, and use local models" proof:

npm run test:e2e

This runs the bootstrap/docs checks, extension typecheck and activation smoke test, desktop typecheck and preview workflow tests, workspace build, Rust logic and memory tests, and a local Ollama/Gemma response check. See E2E_READINESS.md for CI and model-runtime variants.

Develop the logic desktop app

npm run dev:desktop

The desktop app is a Tauri + Svelte workspace. It uses logic/open-code.project.json as structured state, regenerates the default logic/open-code.paper.md, supports additional documentation presentations, and creates card worktrees under .open-code/worktrees/.

Run the logic core tests directly with:

npm run test:logic

Run the memory daemon (optional, for manual testing)

npm run memoryd -- --data-dir /tmp/open-code-memory

Develop the extension

npm run watch

In VS Code: Run and DebugRun Extension (see .vscode/launch.json).

Full Code-OSS fork (later)

  1. Add upstream per FORK_AND_RELEASE.md.
  2. Copy or submodule this repo’s packages/extension into your fork’s extensions/open-code (or equivalent).
  3. Register the extension in your product’s product.json / build if you ship a branded app.

See RELEASE.md for packaging and Open VSX.