We're excited that you're interested in contributing to Opik! There are many ways to contribute, from writing code to improving the documentation.
The easiest way to get started is to:
- Submit bug reports and feature requests
- Review the documentation and submit Pull Requests to improve it
- Speaking or writing about Opik and letting us know
- Upvoting popular feature requests to show your support
- Review our Contributor License Agreement
Thanks for taking the time to submit an issue, it's the best way to help us improve Opik!
Before submitting a new issue, please check the existing issues to avoid duplicates.
To help us understand the issue you're experiencing, please provide steps to reproduce the issue included a minimal code snippet that reproduces the issue. This helps us diagnose the issue and fix it more quickly.
Feature requests are welcome! To help us understand the feature you'd like to see, please provide:
- A short description of the motivation behind this request
- A detailed description of the feature you'd like to see, including any code snippets if applicable
If you are in a position to submit a PR for the feature, feel free to open a PR !
When contributing to Opik, please follow these formatting and code style guidelines:
Do not apply formatting changes that drastically alter files without clear benefit. When submitting PRs:
- Focus on meaningful changes: Only format code that you're actively modifying or fixing
- Avoid mass reformatting: Don't run formatters across entire files or codebases unless specifically requested
- Be intentional: If you need to apply formatting changes, ensure they serve a clear purpose (e.g., fixing consistency issues, improving readability)
- Fixing inconsistent indentation in code you're modifying
- Correcting style violations in files you're actively working on
- Following project-specific linting rules (see component-specific sections below)
- Addressing formatting issues flagged by CI/CD pipelines
- Applying auto-formatters to entire files when only changing a few lines
- Changing whitespace, line endings, or indentation across large portions of unchanged code
- Reformatting files just because your editor suggests it
- Making stylistic changes that don't align with the existing codebase patterns
Remember: Code reviews should focus on logic, functionality, and meaningful improvements. Excessive formatting changes can obscure the actual purpose of your contribution and make reviews more difficult.
The Opik project is made up of five main sub-projects:
apps/opik-documentation: The Opik documentation websitedeployment/installer: The Opik installersdks/python: The Opik Python SDKapps/opik-frontend: The Opik frontend applicationapps/opik-backend: The Opik backend server
In addition, Opik relies on:
- Clickhouse: Used to trace traces, spans and feedback scores
- MySQL: Used to store metadata associated with projects, datasets, experiments, etc.
- Redis: Used for caching
We provide multiple development modes optimized for different workflows:
| Mode | Use Case | Command | Speed |
|---|---|---|---|
| Docker Mode | Full stack testing, closest to production | ./opik.sh --build |
Slow |
| Local Process | Fast BE + FE development with hot reload | scripts/dev-runner.sh |
Fast |
| BE-Only | Backend development only | scripts/dev-runner.sh --be-only-restart |
Fast |
| Infrastructure | Manual with IDE development | ./opik.sh --infra --port-mapping |
Medium |
Best for testing the complete system or when you need an environment closest to production.
# Build and start all services (first time setup)
./opik.sh --build
# On Windows
.\opik.ps1 --build
# Start without rebuilding (faster for subsequent runs)
./opik.sh
# Check service health
./opik.sh --verify
# Stop all services
./opik.sh --stopAccess the UI at http://localhost:5173
Best for rapid development with instant code reloading. Runs backend and frontend as local processes.
# Full restart (stop, build, start) - use this for first time or after major changes
scripts/dev-runner.sh
# On Windows
scripts\dev-runner.ps1
# Start without rebuilding (faster when no dependency changes)
scripts/dev-runner.sh --start
# Check status
scripts/dev-runner.sh --verify
# View logs
scripts/dev-runner.sh --logsAccess the UI at http://localhost:5174 (Vite dev server with hot reload)
Best for backend-focused work. Frontend runs in Docker, backend as a local process.
# Start BE-only mode
scripts/dev-runner.sh --be-only-restart
# On Windows
scripts\dev-runner.ps1 --be-only-restartAccess the UI at http://localhost:5173
# Build backend only
scripts/dev-runner.sh --build-be
# Build frontend only
scripts/dev-runner.sh --build-fe
# Run database migrations
scripts/dev-runner.sh --migrate
# Lint code
scripts/dev-runner.sh --lint-be
scripts/dev-runner.sh --lint-fe
# Enable debug logging
scripts/dev-runner.sh --restart --debugFor a complete list of available commands and options, use the --help flag:
# Linux/Mac
./opik.sh --help
scripts/dev-runner.sh --help
# Windows
.\opik.ps1 --help
scripts\dev-runner.ps1 --helpFor comprehensive documentation on local development, including troubleshooting, advanced usage, and workflow examples, see our Local Development Guide.
The documentation is made up of two main parts:
apps/opik-documentation/documentation: The Opik documentation websiteapps/opik-documentation/python-sdk-docs: The Python reference documentation
The documentation website is built with Fern and is located in apps/opik-documentation/documentation.
In order to run the documentation website locally, you need to have Node.js and npm installed. You can follow this guide to install Node.js and npm here.
Once installed, you can run the documentation locally using the following command:
cd apps/opik-documentation/documentation
# Install dependencies - Only needs to be run once
npm install
# Run the documentation website locally
npm run devYou can then access the documentation website at http://localhost:3000. Any change you make to the documentation will be updated in real-time.
When updating the documentation, you will need to update either:
fern/docs: This is where all the markdown code is stored and where the majority of the documentation is located.docs/cookbook: This is where all our cookbooks are located.
The Python SDK reference documentation is built using Sphinx and is located in apps/opik-documentation/python-sdk-docs.
In order to run the Python SDK reference documentation locally, you need to have python and pip installed. Once installed, you can run the documentation locally using the following command:
cd apps/opik-documentation/python-sdk-docs
# Install dependencies - Only needs to be run once
pip install -r requirements.txt
# Run the python sdk reference documentation locally
make devThe Python SDK reference documentation will be built and available at http://127.0.0.1:8000. Any change you make to the documentation will be updated in real-time.
Setting up your development environment:
In order to develop features in the Python SDK, you will need to have Opik running locally. Use the provided scripts to start the appropriate services:
On Linux or Mac:
# From the root of the repository
./opik.sh
# Configure the Python SDK to point to the local Opik deployment
opik configure --use_localOn Windows:
# From the root of the repository
powershell -ExecutionPolicy ByPass -c ".\opik.ps1"
# Configure the Python SDK to point to the local Opik deployment
opik configure --use_localThe Opik server will be running on http://localhost:5173.
Note for Windows users:
- If Python is installed at system level, make sure
C:\Users\<name>\AppData\Local\Programs\Python<version>\Scripts\is added to your PATH for theopikcommand to work after installation, and restart your terminal. - It's recommended to use a virtual environment:
# Create a virtual environment py -m venv <environment_name> # Activate the virtual environment cd <environment_name>\Scripts && .\activate.bat # Install the SDK pip install -e sdks/python # Configure the SDK opik configure --use_local
Submitting a PR:
First, please read the coding guidelines for our Python SDK.
The Python SDK is available under sdks/python and can be installed locally using pip install -e sdks/python.
Testing your changes:
For most SDK contributions, you should run the e2e tests which validate the core functionality:
cd sdks/python
# Install the test requirements
pip install -r tests/test_requirements.txt
pip install -r tests/unit/test_requirements.txt
# Install pre-commit for linting
pip install pre-commit
# Run the e2e tests
pytest tests/e2eIf you're making changes to specific integrations (openai, anthropic, etc.):
- Install the integration-specific requirements:
# Example for OpenAI integration pip install -r tests/integrations/openai/requirements.txt - Configure any necessary API keys for the integration
- Run the specific integration tests:
# Example for OpenAI integration pytest tests/integrations/openai
Before submitting a PR, please ensure that your code passes the linter:
cd sdks/python
pre-commit run --all-filesNote
If you changes impact public facing methods or docstrings, please also update the documentation. You can find more information about updating the docs in the documentation contribution guide.
The Opik frontend is a React application located in apps/opik-frontend.
- Ensure you have Node.js installed.
For rapid development with hot reload, use the local process mode:
# Linux/Mac - restart everything
scripts/dev-runner.sh
# Or just start (faster if already built)
scripts/dev-runner.sh --start
# Windows
scripts\dev-runner.ps1Access the UI at http://localhost:5174 (Vite dev server with hot reload)
You can also use:
- Docker Mode:
./opik.sh --buildfor a complete Docker-based environment - Manual Setup:
./opik.sh --backend --port-mappingthen manually start the frontend
For detailed setup instructions for each mode, see our Frontend Contribution Guide.
Before submitting a PR, ensure your code passes all checks:
# Linting (recommended)
scripts/dev-runner.sh --lint-fe # Linux/Mac
scripts\dev-runner.ps1 --lint-fe # Windows
# Or manually
cd apps/opik-frontend
npm run lint
npm run typecheck # TypeScript type checkingcd apps/opik-frontend
npm run test # Unit tests for utilities and helpersThe Opik backend is a Java application located in apps/opik-backend.
- Ensure you have Java and Maven installed.
For rapid backend development with a local process:
# Linux/Mac - restart everything
scripts/dev-runner.sh --be-only-restart
# Or just start (faster if already built)
scripts/dev-runner.sh --be-only-start
# Windows
scripts\dev-runner.ps1 --be-only-restartAccess the backend API at http://localhost:8080
You can also use:
- Docker Mode:
./opik.sh --buildfor a complete Docker-based environment - Manual Setup:
./opik.sh --infra --port-mappingthen manually build and start the backend
For detailed setup instructions for each mode, see our Backend Contribution Guide.
Before submitting a PR, ensure your code is formatted. Our CI will check and fail if it is not formatted. Use the following command:
# Code formatting (recommended)
scripts/dev-runner.sh --lint-be # Linux/Mac
scripts\dev-runner.ps1 --lint-be # Windows
# Or manually
cd apps/opik-backend
mvn spotless:apply# Run tests
mvn test
Tests leverage the testcontainers library to run integration tests against a real instances of the external services. Ports are randomly assigned by the library to avoid conflicts.
To see your applications health enter url http://localhost:8080/healthcheck
To run database migrations:
# Using dev-runner (recommended)
scripts/dev-runner.sh --migrate # Linux/Mac
scripts\dev-runner.ps1 --migrate # Windows
# Or manually
cd apps/opik-backend
java -jar target/opik-backend-*.jar db migrate config.yml # MySQL
java -jar target/opik-backend-*.jar dbAnalytics migrate config.yml # ClickHouseFor detailed information on migrations, health checks, and advanced topics, see our Backend Contribution Guide.
You can curl the ClickHouse REST endpoint with echo 'SELECT version()' | curl -H 'X-ClickHouse-User: opik' -H 'X-ClickHouse-Key: opik' 'http://localhost:8123/' -d @-.
SHOW DATABASES
Query id: a9faa739-5565-4fc5-8843-5dc0f72ff46d
┌─name───────────────┐
│ INFORMATION_SCHEMA │
│ opik │
│ default │
│ information_schema │
│ system │
└────────────────────┘
5 rows in set. Elapsed: 0.004 sec.
Sample result: 23.8.15.35