> ## Documentation Index
> Fetch the complete documentation index at: https://goldengoose.zue.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenCode

> Enable and run OpenCode provider sessions.

OpenCode is a local provider. Unlike cloud providers, it typically does not require an online login — you just need the OpenCode runtime available on your machine.

## Setup

1. Install OpenCode and confirm the `opencode` command works in your terminal.
2. Launch goldengoose.
3. Create a new thread and choose provider `opencode`.

## If the provider doesn’t appear

If OpenCode isn’t showing up, you can explicitly enable it by setting:

```bash theme={null}
GG_AGENT_OPENCODE_ENABLED=1
```

You can also disable it explicitly with:

```bash theme={null}
GG_AGENT_OPENCODE_ENABLED=0
```

## Advanced configuration (optional)

If you need to customize how OpenCode is launched, these environment variables are commonly useful:

* `GG_OPENCODE_COMMAND`: override the OpenCode executable path/command.
* `GG_OPENCODE_BIND_ADDRESS`: configure the local bind address.
* `GG_OPENCODE_SHARD_COUNT`: tune concurrency.
* `GG_OPENCODE_SESSION_PERSISTENCE_MODE`: control session persistence behavior.
* `GG_OPENCODE_CONFIG_DIR_ROOT`: override where OpenCode reads/writes config.
