You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Add cwd option to createOpencodeServer #3321
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I'm working on a vite plugin that starts an opencode server in the onStart hook. My problem is that I'm working in a monorepo and my app is at packages/app, the server will be spawned in packages/app and won't have access to other parts of the monorepo.
By adding a cwd property to the options of createOpencodeServer, I could spawn the opencode server process at the root of the monorepo and opencode would have access to the whole monorepo.
If it's approved I'm happy to create the PR, it's a fairly small change imo.
Activity
github-actions commentedon Oct 21, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Oct 22, 2025
Yeah I think that'd be acceptable
veracioux commentedon Oct 22, 2025
Perhaps allow the SDK client to override the spawn options for the server as a more general feature? Which would cover cwd as well.
rekram1-node commentedon Oct 22, 2025
yeah that works
wan-kong commentedon Oct 23, 2025
cwd-option
add a new
--cwdoption to specify the current working directory when runningopencode serve.All right , just a idea now.