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:
@@ -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.
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user