diff options
| author | Timo Clasen <[email protected]> | 2025-07-16 23:08:25 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-16 16:08:25 -0500 |
| commit | 3c6c2bf13b97150b32e3f800c92c689ae6367545 (patch) | |
| tree | d1b49e1b593605fc5de9e5054705f958f3c4deea | |
| parent | d4f9375548dffa582193ec2e156573d1f0632439 (diff) | |
| download | opencode-3c6c2bf13b97150b32e3f800c92c689ae6367545.tar.gz opencode-3c6c2bf13b97150b32e3f800c92c689ae6367545.zip | |
docs(share): add explicit manual share mode (#1074)
| -rw-r--r-- | packages/opencode/src/config/config.ts | 6 | ||||
| -rw-r--r-- | packages/web/src/content/docs/docs/config.mdx | 12 | ||||
| -rw-r--r-- | packages/web/src/content/docs/docs/share.mdx | 45 |
3 files changed, 37 insertions, 26 deletions
diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index e0961b7b2..c1b237ff7 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -139,9 +139,11 @@ export namespace Config { theme: z.string().optional().describe("Theme name to use for the interface"), keybinds: Keybinds.optional().describe("Custom keybind configurations"), share: z - .enum(["auto", "disabled"]) + .enum(["manual", "auto", "disabled"]) .optional() - .describe("Control sharing behavior: 'auto' enables automatic sharing, 'disabled' disables all sharing"), + .describe( + "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing", + ), autoshare: z .boolean() .optional() diff --git a/packages/web/src/content/docs/docs/config.mdx b/packages/web/src/content/docs/docs/config.mdx index 8cab14ee5..8cb911691 100644 --- a/packages/web/src/content/docs/docs/config.mdx +++ b/packages/web/src/content/docs/docs/config.mdx @@ -135,28 +135,28 @@ With the following options: | `WARN` | Warnings and errors only | | `ERROR` | Errors only | -The **default** log level is `INFO`. If you are running opencode locally in +The **default** log level is `INFO`. If you are running opencode locally in development mode it's set to `DEBUG`. --- ### Sharing -You configure the [share](/docs/share) feature through the `share` option. +You can configure the [share](/docs/share) feature through the `share` option. ```json title="opencode.json" { "$schema": "https://opencode.ai/config.json", - "share": "auto" + "share": "manual" } ``` This takes: +- `"manual"` - Allow manual sharing via commands (default) - `"auto"` - Automatically share new conversations - `"disabled"` - Disable sharing entirely -By default, you'll need to manually share new conversations. -development mode it's set to `DEBUG`. +By default, sharing is set to manual mode where you need to explicitly share conversations using the `/share` command. --- @@ -256,7 +256,7 @@ Use `{env:VARIABLE_NAME}` to substitute environment variables: "anthropic": { "options": { "apiKey": "{env:ANTHROPIC_API_KEY}" - } + } } } } diff --git a/packages/web/src/content/docs/docs/share.mdx b/packages/web/src/content/docs/docs/share.mdx index 58c9b121e..efb54c2d5 100644 --- a/packages/web/src/content/docs/docs/share.mdx +++ b/packages/web/src/content/docs/docs/share.mdx @@ -23,13 +23,13 @@ When you share a conversation, opencode: ## Sharing -You can manually share a conversation or enable automatic sharing for all new conversations. +opencode supports three sharing modes that control how conversations are shared: --- -### Manual +### Manual (default) -Use the `/share` command in any conversation to create a shareable link: +By default, opencode uses manual sharing mode. Sessions are not shared automatically, but you can manually share them using the `/share` command: ``` /share @@ -37,38 +37,35 @@ Use the `/share` command in any conversation to create a shareable link: This will generate a unique URL that'll be copied to your clipboard. ---- - -### Auto-share - -You can enable automatic sharing for all new conversations through the `autoshare` option in your [config file](/docs/config). +To explicitly set manual mode in your [config file](/docs/config): ```json title="opencode.json" { "$schema": "https://opencode.ai/config.json", - "share": "auto" + "share": "manual" } ``` -By default, automatic sharing is disabled. - --- -## Un-sharing +### Auto-share -To stop sharing a conversation and remove it from public access: +You can enable automatic sharing for all new conversations by setting the `share` option to `"auto"` in your [config file](/docs/config): -``` -/unshare +```json title="opencode.json" +{ + "$schema": "https://opencode.ai/config.json", + "share": "auto" +} ``` -This will remove the share link and delete the data related to the conversation. +With auto-share enabled, every new conversation will automatically be shared and a link will be generated. --- -## Disable +### Disabled -If you'd like to disable sharing entirely, you can do so by setting the `share` option to `"disabled"` in your [config file](/docs/config). +You can disable sharing entirely by setting the `share` option to `"disabled"` in your [config file](/docs/config): ```json title="opencode.json" { @@ -81,6 +78,18 @@ To enforce this across your team for a given project, add it to the `opencode.js --- +## Un-sharing + +To stop sharing a conversation and remove it from public access: + +``` +/unshare +``` + +This will remove the share link and delete the data related to the conversation. + +--- + ## Privacy There are a few things to keep in mind when sharing a conversation. |
