Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/opencode/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ export namespace Config {
if (result.autoshare === true && !result.share) {
result.share = "auto"
}

// Set default share behavior to disabled if not explicitly configured
if (result.share === undefined) {
result.share = "disabled"
}

if (result.keybinds?.messages_revert && !result.keybinds.messages_undo) {
result.keybinds.messages_undo = result.keybinds.messages_revert
}
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/content/docs/docs/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ You can configure the [share](/docs/share) feature through the `share` option.

This takes:

- `"manual"` - Allow manual sharing via commands (default)
- `"manual"` - Allow manual sharing via commands
- `"auto"` - Automatically share new conversations
- `"disabled"` - Disable sharing entirely
- `"disabled"` - Disable sharing entirely (default)

By default, sharing is set to manual mode where you need to explicitly share conversations using the `/share` command.
Sharing is disabled by default. You can enable manual sharing to explicitly share conversations using the `/share` command, or auto-sharing to automatically share all new conversations.

---

Expand Down
12 changes: 10 additions & 2 deletions packages/web/src/content/docs/docs/share.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,17 @@ opencode supports three sharing modes that control how conversations are shared:

---

### Manual (default)
### Disabled (default)

By default, opencode uses manual sharing mode. Sessions are not shared automatically, but you can manually share them using the `/share` command:
By default, opencode disables sharing for security. No sessions are shared automatically.

To enable sharing, explicitly configure the `share` option to either `"manual"` or `"auto"` in your [config file](/docs/config#sharing).

---

### Manual

In manual sharing mode, you can manually share sessions using the `/share` command:

```
/share
Expand Down