Opik TS - Interactive Setup Tool
Opik TS - Interactive Setup Tool
Opik TS - Interactive Setup Tool
The Opik TS is an interactive command-line tool that streamlines the process of adding Opik observability to your Node.js and TypeScript applications. It automatically detects your project setup, installs dependencies, and configures tracing for your LLM integrations.
.env files with proper Opik configurationRun the CLI in your project directory:
The CLI will guide you through:
The CLI supports several command-line options for customization:
Verbose debugging mode:
Non-interactive mode with defaults:
Install in a specific directory:
Force installation (skip peer dependency checks):
Local development setup:
This will skip the deployment selection step and automatically configure your environment for local development (localhost:5173).
The CLI automatically creates or updates your .env file with the necessary configuration:
The CLI will prompt you to enter your API keys during setup. For Opik Cloud,
you can get your API key from the Opik
dashboard. For self-hosted instances, set
OPIK_URL_OVERRIDE to your server address.
If you encounter permission errors during installation:
If the CLI fails to detect your package manager:
package.json in your project directorynpx opik-ts configure --debugIf environment variables aren’t being set correctly:
.env file was created in your project rootdotenv)If traces aren’t appearing in Opik:
OPIK_API_KEY is correctOPIK_URL_OVERRIDE points to the right endpointflush() before your application exits:
Enable verbose logging to troubleshoot issues:
This will show detailed information about:
For automated deployments, use the non-interactive mode:
Set environment variables beforehand:
After running the CLI: