opencode
opencode copied to clipboard
feat: add prompt and attach options to other commands in cli
Adds the --prompt option to the attach, acp, web and serve commands (where it starts a session) Adds an --attach option similar to the attach command to the acp, web and server commands (where it proxies the remote server) Optionally when attaching to a server, instead of starting a new session, allow resuming an existing one via session URL
All tested manually. This allows a us to run the actual server in an isolated sandbox (only proxying out the server, optionally with initial prompt) and then proxy it forward on a secondary server (with correct cors options). We can then attach opencode cli or ACP clients.