opencode icon indicating copy to clipboard operation
opencode copied to clipboard

missing documentation for how to run from source

Open aspiers opened this issue 3 days ago • 6 comments

AFAICS, there is nothing in any of README.md, CONTRIBUTING.md, https://opencode.ai/docs#install etc. explaining how to run OpenCode from source on another repository, i.e. whilst having the working directory be a different repo other than OpenCode itself.

Fixing this is really important if you want more people to help test (and even develop against) the latest development branches.

I spent several few hours bashing my head against this problem. Eventually I searched the OpenCode Discord chat history and found some breadcrumbs to follow which led me to #3764 and then #3778. Unfortunately however neither of those PRs added / updated any docs.

With extra help from OpenCode, I concluded that this approach works and seems to be correct:

# Save the path to the code we want to run OpenCode against
orig_cwd="$(pwd)"

# Now we can switch to the opencode repo...
cd "$OPENCODE_REPO"
# ... and pass the target directory as a parameter to bun:
bun dev "$orig_cwd" "$@"

Is this right?

aspiers avatar Dec 29 '25 22:12 aspiers