Skip to content

Conversation

@e-roux
Copy link

@e-roux e-roux commented Feb 2, 2026

This PR add missing parameters to authentication as well as remove hardcoded hostname.

Enables connecting to opencode servers on non-localhost hosts
and authenticating via OPENCODE_SERVER_PASSWORD env var
@e-roux e-roux force-pushed the feature/server-config-auth branch 3 times, most recently from 511f2a8 to d78d614 Compare February 2, 2026 21:54
@e-roux e-roux force-pushed the feature/server-config-auth branch from d78d614 to 9dedea1 Compare February 2, 2026 22:00
--- - [implementation](https://github.com/sst/opencode/blob/dev/packages/opencode/src/server/server.ts)
local M = {}

local config = require("opencode.config")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you inline this please? Top-level require calls hurt lazy-loading :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this makes sense in preparation of nvim 0.12 vim.pack

regarding the server url: I added an extra check to avoid faulty user configuration. May be not a good idea. Better located in the config module?

@nickjvandyke
Copy link
Owner

Thanks for this, very cool use case!

I assume this is for connecting to opencodes running outside your local machine right? I thought to ask you to append the hostname flag and option to provider.cmd like we do with port, but that probably doesn't make sense as a result.

@e-roux
Copy link
Author

e-roux commented Feb 3, 2026

I investigate the opencode server capabilities to use it on several machines.

Before I eventually make further PRs, I thought SoC would be good and wanted avoid to push this one commonly with new endpoints.

Thank you for this package!

@e-roux e-roux force-pushed the feature/server-config-auth branch from 5d2b2ea to 9714c3d Compare February 3, 2026 06:23
@e-roux e-roux force-pushed the feature/server-config-auth branch from 9714c3d to 866e9b1 Compare February 3, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants