一键导入
opik-setup
Configure Opik SDK for LLM observability. Use when setting up a new project, connecting to Opik Cloud, or configuring self-hosted Opik.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Configure Opik SDK for LLM observability. Use when setting up a new project, connecting to Opik Cloud, or configuring self-hosted Opik.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | opik-setup |
| description | Configure Opik SDK for LLM observability. Use when setting up a new project, connecting to Opik Cloud, or configuring self-hosted Opik. |
Python: pip install opik && opik configure
TypeScript: npm install opik && npx opik-ts configure
Verify: opik healthcheck (Python only)
Config: ~/.opik.config or OPIK_API_KEY env var
pip install opik
Interactive (recommended):
opik configure
Or set environment variables:
export OPIK_API_KEY="your-api-key"
export OPIK_WORKSPACE="your-workspace" # Optional
export OPIK_PROJECT_NAME="my-project" # Optional, defaults to "default"
opik healthcheck
✅ "Connection successful" → Ready to trace ❌ "Connection failed" → Check API key and network
npm install opik
Interactive:
npx opik-ts configure
Or set environment variables:
export OPIK_API_KEY="your-api-key"
export OPIK_WORKSPACE="your-workspace" # Optional
export OPIK_PROJECT_NAME="my-project" # Optional
Note: TypeScript SDK doesn't have a
healthcheckCLI command. Use these alternatives:
Check config file exists:
cat ~/.opik.config
Or verify env var is set:
echo $OPIK_API_KEY
Or test with a simple script:
import { Opik } from "opik";
const client = new Opik();
console.log("Opik configured successfully");
| Variable | Required | Description |
|---|---|---|
OPIK_API_KEY | Yes* | API key from comet.com (Cloud) |
OPIK_URL_OVERRIDE | Yes* | Custom URL (self-hosted only) |
OPIK_WORKSPACE | No | Workspace name |
OPIK_PROJECT_NAME | No | Project name (defaults to "default") |
*Either OPIK_API_KEY (Cloud) or OPIK_URL_OVERRIDE (self-hosted) is required.
For self-hosted Opik instances:
export OPIK_URL_OVERRIDE="http://your-opik-server:5173/api"
No API key required for self-hosted deployments.
After setup is complete:
/opik-trace/opik-eval/opik-promptSee CONFIGURATION.md for:
Create and run evaluations on your LLM outputs. Use when testing prompts, measuring quality, comparing models, or creating evaluation datasets.
Manage prompt versions and run comparisons. Use when versioning prompts, comparing prompt variations, or optimizing prompt performance.
Add LLM tracing and observability to your code. Use when instrumenting functions, integrating frameworks (LangChain, OpenAI, etc.), or adding custom spans.