Skip to content

Commit b6b451c

Browse files
authored
Merge pull request #13 from comet-ml/jacques/readme-updates
docs: document the [opik_cc] config section
2 parents 17ecba1 + 81660cb commit b6b451c

1 file changed

Lines changed: 28 additions & 6 deletions

File tree

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,41 @@ All plugin env vars use the `OPIK_CC_` prefix to avoid conflicts with standard O
6565

6666
`OPIK_CC_WORKSPACE` and `OPIK_CC_PROJECT` let you send Claude Code traces to a different
6767
workspace/project than the rest of your Opik setup, without touching the global
68-
`OPIK_WORKSPACE` / `project_name` in `~/.opik.config` used by the Opik SDK. Both can also be
69-
set in `~/.opik.config` via the plugin-scoped `cc_workspace` and `cc_project` keys:
68+
`OPIK_WORKSPACE` in your environment. You can also keep the plugin's settings in a dedicated
69+
`[opik_cc]` section of `~/.opik.config`:
7070

7171
```ini
7272
[opik]
73+
url_override = https://www.comet.com/opik/api/
74+
api_key = your-api-key
7375
workspace = my-sdk-workspace # used by the Opik SDK
7476
project_name = my-sdk-project # used by the Opik SDK
75-
cc_workspace = my-cc-workspace # used only by the Claude Code plugin
76-
cc_project_name = my-cc-project # used only by the Claude Code plugin
77+
78+
[opik_cc]
79+
workspace = comet-all # used by the Claude Code plugin
80+
project_name = claude-code # used by the Claude Code plugin
81+
```
82+
83+
> **Place `[opik_cc]` below `[opik]`.** The plugin reads the keys it recognizes (`workspace`,
84+
> `project_name`, `url_override`, `api_key`) from the whole file, with later values overriding
85+
> earlier ones — so the `[opik_cc]` values win only when that section comes last. The
86+
> environment variables (`OPIK_CC_WORKSPACE`, `OPIK_CC_PROJECT`) always take precedence over
87+
> the file.
88+
89+
You can also override `url_override` and `api_key` in `[opik_cc]` to point Claude Code traces
90+
at a **different Opik instance** than the SDK:
91+
92+
```ini
93+
[opik_cc]
94+
url_override = https://my-other-opik/api/ # different Opik instance for the plugin
95+
api_key = other-instance-api-key # must match that instance
96+
workspace = comet-all
97+
project_name = claude-code
7798
```
7899

79-
> Note: for backward compatibility, if `cc_project_name` is not set the plugin still falls back
80-
> to the shared `project_name` key.
100+
> Set `url_override` and `api_key` together — a URL pointing at one instance with the other
101+
> instance's key will fail auth. `OPIK_BASE_URL` (env) is the simpler way to point only the
102+
> plugin at a different URL, and always wins over the file.
81103
82104
### External Trace Linking
83105

0 commit comments

Comments
 (0)