share.mdx 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. ---
  2. title: Share
  3. description: Share your OpenCode conversations.
  4. ---
  5. OpenCode's share feature allows you to create public links to your OpenCode conversations, so you can collaborate with teammates or get help from others.
  6. :::note
  7. Shared conversations are publicly accessible to anyone with the link.
  8. :::
  9. ---
  10. ## How it works
  11. When you share a conversation, OpenCode:
  12. 1. Creates a unique public URL for your session
  13. 2. Syncs your conversation history to our servers
  14. 3. Makes the conversation accessible via the shareable link — `opencode.ai/s/<share-id>`
  15. ---
  16. ## Sharing
  17. OpenCode supports three sharing modes that control how conversations are shared:
  18. ---
  19. ### Manual (default)
  20. By default, OpenCode uses manual sharing mode. Sessions are not shared automatically, but you can manually share them using the `/share` command:
  21. ```
  22. /share
  23. ```
  24. This will generate a unique URL that'll be copied to your clipboard.
  25. To explicitly set manual mode in your [config file](/docs/config):
  26. ```json title="opencode.json"
  27. {
  28. "$schema": "https://opencode.ai/config.json",
  29. "share": "manual"
  30. }
  31. ```
  32. ---
  33. ### Auto-share
  34. You can enable automatic sharing for all new conversations by setting the `share` option to `"auto"` in your [config file](/docs/config):
  35. ```json title="opencode.json"
  36. {
  37. "$schema": "https://opencode.ai/config.json",
  38. "share": "auto"
  39. }
  40. ```
  41. With auto-share enabled, every new conversation will automatically be shared and a link will be generated.
  42. ---
  43. ### Disabled
  44. You can disable sharing entirely by setting the `share` option to `"disabled"` in your [config file](/docs/config):
  45. ```json title="opencode.json"
  46. {
  47. "$schema": "https://opencode.ai/config.json",
  48. "share": "disabled"
  49. }
  50. ```
  51. To enforce this across your team for a given project, add it to the `opencode.json` in your project and check into Git.
  52. ---
  53. ## Un-sharing
  54. To stop sharing a conversation and remove it from public access:
  55. ```
  56. /unshare
  57. ```
  58. This will remove the share link and delete the data related to the conversation.
  59. ---
  60. ## Privacy
  61. There are a few things to keep in mind when sharing a conversation.
  62. ---
  63. ### Data retention
  64. Shared conversations remain accessible until you explicitly unshare them. This
  65. includes:
  66. - Full conversation history
  67. - All messages and responses
  68. - Session metadata
  69. ---
  70. ### Recommendations
  71. - Only share conversations that don't contain sensitive information.
  72. - Review conversation content before sharing.
  73. - Unshare conversations when collaboration is complete.
  74. - Avoid sharing conversations with proprietary code or confidential data.
  75. - For sensitive projects, disable sharing entirely.
  76. ---
  77. ## For enterprises
  78. For enterprise deployments, the share feature can be:
  79. - **Disabled** entirely for security compliance
  80. - **Restricted** to users authenticated through SSO only
  81. - **Self-hosted** on your own infrastructure
  82. [Learn more](/docs/enterprise) about using opencode in your organization.