Skip to content

[FEATURE]: Add cwd option to createOpencodeServer #3321

Closed

Description

@simonxabris

Feature hasn't been suggested before.

  • 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

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Oct 21, 2025
  2. github-actions commented on Oct 21, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. rekram1-node commented on Oct 22, 2025

    @rekram1-node
    Contributor

    Yeah I think that'd be acceptable

  4. veracioux commented on Oct 22, 2025

    @veracioux
    Contributor

    Perhaps allow the SDK client to override the spawn options for the server as a more general feature? Which would cover cwd as well.

  5. rekram1-node commented on Oct 22, 2025

    @rekram1-node
    Contributor

    yeah that works

  6. wan-kong commented on Oct 23, 2025

    @wan-kong
    Contributor

    cwd-option

    add a new --cwd option to specify the current working directory when running opencode serve.

    All right , just a idea now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions