feat: /share slash command — shareable link to the ocman session view #294

Closed
opened 2026-07-12 01:29:45 +02:00 by dries · 0 comments
Owner

Part of OpenCode command parity (transparent-layer goal). OpenCode's TUI has /share / /unshare to publish a session to OpenCode's cloud share service.

Approach (decided): share ocman's OWN URL, not OpenCode's cloud share

Rationale: ocman is a self-hosted, localhost-first layer. Rather than pushing conversation data to OpenCode's public share cloud, /share should produce a link to the ocman session view (the ocman:// scheme / http URL of the running instance).

Scope

  • Add share to BUILTIN_COMMANDS (frontend/src/lib/commands/builtinCommands.ts).
  • Generate the ocman session URL for the current session and copy to clipboard (+ toast).
  • Relates to #74 (project-aware ocman:// URL schemes) — reuse that scheme if landed.

Caveats to resolve in the ticket

  • The link only works for clients that can reach this ocman instance. Ocman binds 127.0.0.1 by default → link is local-only unless the instance is exposed / behind auth (see docs/configuration.md password auth). Make the copied link honour the actual bind address, and surface the reachability caveat in the toast/help text.
  • NOT the same semantic as OpenCode's public /share. If a true OpenCode-cloud share is wanted later, file a separate ticket to proxy OpenCode's share/unshare endpoints.

Reference

OpenCode /share docs: https://opencode.ai/docs/share

Part of OpenCode command parity (transparent-layer goal). OpenCode's TUI has `/share` / `/unshare` to publish a session to OpenCode's cloud share service. ## Approach (decided): share ocman's OWN URL, not OpenCode's cloud share Rationale: ocman is a self-hosted, localhost-first layer. Rather than pushing conversation data to OpenCode's public share cloud, `/share` should produce a link to the ocman session view (the ocman:// scheme / http URL of the running instance). ## Scope - Add `share` to `BUILTIN_COMMANDS` (frontend/src/lib/commands/builtinCommands.ts). - Generate the ocman session URL for the current session and copy to clipboard (+ toast). - Relates to #74 (project-aware ocman:// URL schemes) — reuse that scheme if landed. ## Caveats to resolve in the ticket - The link only works for clients that can reach this ocman instance. Ocman binds 127.0.0.1 by default → link is local-only unless the instance is exposed / behind auth (see docs/configuration.md password auth). Make the copied link honour the actual bind address, and surface the reachability caveat in the toast/help text. - NOT the same semantic as OpenCode's public /share. If a true OpenCode-cloud share is wanted later, file a separate ticket to proxy OpenCode's share/unshare endpoints. ## Reference OpenCode /share docs: https://opencode.ai/docs/share
dries closed this issue 2026-07-12 10:10:43 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dries/ocman#294
No description provided.