Install the Codmir CLI and SDK in under 2 minutes.
Installation
This guide covers installing all Codmir packages: the CLI for project management, the SDK for error tracking and AI monitoring, Overseer for observability, Cortex for intelligent edge runtime, and the AI package for multi-provider support.
CLI
Install the Codmir CLI globally:
curl -fsSL https://codmir.com/install.sh | bashVerify the installation:
codmir --versionThe CLI provides commands for project linking, ticket management, agent tasks, and deployments.
SDK
The core SDK provides the API client, error tracking, and framework integrations.
npm install @codmir/sdkInitialize for Next.js
import * as Codmir from '@codmir/sdk/nextjs';
Codmir.init({
dsn: process.env.NEXT_PUBLIC_CODMIR_DSN,
traceAI: true,
});Initialize the API Client
import { CodmirClient } from '@codmir/sdk';
const client = new CodmirClient({
apiKey: process.env.CODMIR_API_KEY,
});Overseer
Overseer provides error tracking, session replay, incident management, and the autonomous orchestrator.
npm install @codmir/overseerimport { init, captureException } from '@codmir/overseer';
init({
dsn: 'https://your-project.codmir.com/overseer',
service: 'my-app',
environment: 'production',
});Cortex
Cortex provides the intelligent edge runtime: auth with threat detection, smart model routing, adaptive scheduling, self-healing, and the Cortex Protocol for AI-native project files.
npm install @codmir/corteximport { createCortex } from '@codmir/cortex';
const cortex = createCortex({
auth: {
jwtSecret: process.env.JWT_SECRET!,
jwtIssuer: 'my-app',
},
models: [
{
id: 'claude-sonnet-4-20250514',
provider: 'anthropic',
tier: 'standard',
costPer1kInput: 0.003,
costPer1kOutput: 0.015,
avgLatencyMs: 800,
qualityScore: 0.95,
capabilities: ['code', 'reasoning'],
maxTokens: 200000,
healthy: true,
circuitOpen: false,
},
],
threat: {},
router: { defaultStrategy: 'balanced' },
scheduler: {},
healer: {},
mesh: {},
});AI
The AI package provides a unified interface for multiple AI providers with governance and swarm capabilities.
npm install @codmir/aiimport { createCodemirAI } from '@codmir/ai';
const ai = createCodemirAI({
defaultProvider: 'anthropic',
context: {
projectId: 'my-project',
name: 'My App',
techStack: ['TypeScript', 'React'],
},
governance: {
enabled: true,
rateLimitPerMinute: 60,
},
});Verify Installation
Run a quick check that everything is connected:
import { CodmirClient } from '@codmir/sdk';
const client = new CodmirClient({
apiKey: process.env.CODMIR_API_KEY,
});
const me = await client.whoami();
console.log(`Authenticated as: ${me.email}`);
const projects = await client.listProjects();
console.log(`Projects: ${projects.length}`);If you see your email and project count, the installation is complete.
Package Summary
| Package | What It Does |
|---|---|
@codmir/sdk | API client, error tracking, framework integrations |
@codmir/overseer | Error tracking, session replay, incidents, orchestrator |
@codmir/cortex | Edge auth, smart routing, self-healing, Cortex Protocol |
@codmir/ai | Multi-provider AI, governance, swarm, voice |
Next Steps
- Your First Project -- create a project and see your first dashboard
- Error Tracking -- capture your first production error
- Connect Your Project -- link a Git repository