diff --git a/README.md b/README.md index 369c162c6..823c14741 100644 --- a/README.md +++ b/README.md @@ -474,6 +474,23 @@ Key ideas: ## Development +### Getting started from source + +Fresh clones need both workspace dependencies and the local Rust/N-API addon before the source CLI can start. + +```sh +bun setup +bun dev +``` + +`bun setup` installs Bun workspaces and builds `@oh-my-pi/pi-natives`. Re-run `bun run build:native` after changing Rust crates or `packages/natives`. + +For a non-interactive smoke check: + +```sh +bun dev -- --version +``` + ### Debug Command `/debug` opens tools for debugging, reporting, and profiling. diff --git a/package.json b/package.json index c6f0427d1..236e9f281 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ }, "overrides": {}, "scripts": { - "install:dev": "bun install && bun --cwd=packages/coding-agent link && ln -sfn \"$(pwd)/packages/coding-agent/scripts/omp\" \"$(bun pm -g bin)/omp\"", + "setup": "bun install && bun run build:native", "dev": "bun --cwd=packages/coding-agent src/cli.ts", "dev:timing": "PI_TIMING=x bun --cwd=packages/coding-agent --preload ../utils/src/module-timer.ts src/cli.ts", "stats": "bun --cwd=packages/coding-agent src/cli.ts stats", diff --git a/packages/coding-agent/scripts/omp b/packages/coding-agent/scripts/omp index 8db47a6b4..2d60cb8b8 100755 --- a/packages/coding-agent/scripts/omp +++ b/packages/coding-agent/scripts/omp @@ -1,5 +1,5 @@ #!/bin/sh -# Dev launcher for the omp CLI, installed by `bun run install:dev`. +# Dev launcher for the omp CLI. # # Problem it solves: Bun reads `bunfig.toml` from the *current working # directory* at startup and evaluates its `preload` entries before running the