diff options
| author | opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com> | 2025-12-29 17:12:42 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-29 17:12:42 -0600 |
| commit | e5c5b5e872635cd3884dea675662ada9001ed7ca (patch) | |
| tree | 3cdde257169951b385253beb120162e55a4edc07 | |
| parent | a1c9a1b8c549e4eeeb6bfe7b9118f756f143b7b6 (diff) | |
| download | opencode-e5c5b5e872635cd3884dea675662ada9001ed7ca.tar.gz opencode-e5c5b5e872635cd3884dea675662ada9001ed7ca.zip | |
docs: add run from source guide (#6405)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
| -rw-r--r-- | CONTRIBUTING.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 52d342709..290e67d40 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,6 +34,36 @@ Want to take on an issue? Leave a comment and a maintainer may assign it to you bun dev ``` +### Running against a different directory + +By default, `bun dev` runs OpenCode in the `packages/opencode` directory. To run it against a different directory or repository: + +```bash +bun dev <directory> +``` + +To run OpenCode in the root of the opencode repo itself: + +```bash +bun dev . +``` + +### Building a "localcode" + +To compile a standalone executable: + +```bash +./packages/opencode/script/build.ts --single +``` + +Then run it with: + +```bash +./packages/opencode/dist/opencode-<platform>/bin/opencode +``` + +Replace `<platform>` with your platform (e.g., `darwin-arm64`, `linux-x64`). + - Core pieces: - `packages/opencode`: OpenCode core business logic & server. - `packages/opencode/src/cli/cmd/tui/`: The TUI code, written in SolidJS with [opentui](https://github.com/sst/opentui) |
