{"library":"lmnr-cli","title":"Laminar AI CLI for Observability","description":"lmnr-cli is the command-line interface tool for interacting with the Laminar AI observability platform. It allows developers to debug AI agent rollouts, run SQL queries against project data (spans, traces, events), and manage datasets (list, push, pull, create). While the core Laminar TypeScript SDK (`@lmnr-ai/lmnr`) is at version 0.8.20 (as of recent changelogs), the `lmnr-cli` itself is currently at version 0.1.9, with new features and dependency bumps frequently integrated from the monorepo. Laminar is an open-source platform designed to help developers build and monitor reliable AI agents by providing tools for tracing, evaluating, and analyzing AI agent performance. Its key differentiators include comprehensive tracing of AI agents compatible with popular LLM frameworks, tools for creating and running evaluations, and a built-in SQL editor for data analysis.","language":"javascript","status":"active","last_verified":"Wed Apr 22","install":{"commands":["npm install lmnr-cli"],"cli":{"name":"lmnr","version":null}},"imports":["npx lmnr-cli@latest <command>","npm install -g lmnr-cli\nlmnr-cli <command>","export LMNR_PROJECT_API_KEY='your_api_key'\nlmnr-cli sql schema"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { exec } from 'child_process';\n\nconst projectApiKey = process.env.LMNR_PROJECT_API_KEY ?? '';\n\nif (!projectApiKey) {\n  console.error('Error: LMNR_PROJECT_API_KEY environment variable is not set.');\n  process.exit(1);\n}\n\n// Example: Run a SQL query against Laminar project data and output as JSON\nconst command = `npx lmnr-cli@latest sql query \"SELECT * FROM spans LIMIT 5\" --json --project-api-key ${projectApiKey}`;\n\nexec(command, (error, stdout, stderr) => {\n  if (error) {\n    console.error(`exec error: ${error}`);\n    return;\n  }\n  if (stderr) {\n    console.error(`stderr: ${stderr}`);\n    return;\n  }\n  console.log(`Query results:\\n${stdout}`);\n  try {\n    const results = JSON.parse(stdout);\n    console.log(`Parsed ${results.length} records.`);\n  } catch (parseError) {\n    console.error(`Failed to parse JSON output: ${parseError}`);\n  }\n});","lang":"typescript","description":"Demonstrates how to programmatically execute `lmnr-cli` to run a SQL query against Laminar data and process its JSON output.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}