docs: added developer setup guide

Added a root setup script that installs workspaces and builds the native addon before running the source CLI.

Documented the fresh-clone setup and smoke-check flow in the README development section.

Fixes #2895
This commit is contained in:
roboomp
2026-06-17 17:51:06 +00:00
parent 7251ca16d4
commit 85b0dc9592
3 changed files with 19 additions and 2 deletions
+17
View File
@@ -474,6 +474,23 @@ Key ideas:
## Development ## 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 Command
`/debug` opens tools for debugging, reporting, and profiling. `/debug` opens tools for debugging, reporting, and profiling.
+1 -1
View File
@@ -91,7 +91,7 @@
}, },
"overrides": {}, "overrides": {},
"scripts": { "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": "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", "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", "stats": "bun --cwd=packages/coding-agent src/cli.ts stats",
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/sh #!/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 # Problem it solves: Bun reads `bunfig.toml` from the *current working
# directory* at startup and evaluates its `preload` entries before running the # directory* at startup and evaluates its `preload` entries before running the