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://www.codmir.com/install.sh | bash

To read the script before running it, download it first with curl -fsSL https://www.codmir.com/install.sh -o install.sh, review it, then run bash install.sh.

Verify the installation:

codmir --version

The 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/sdk

Initialize 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/overseer
import { 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/cortex
import { 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/ai
import { 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

PackageWhat It Does
@codmir/sdkAPI client, error tracking, framework integrations
@codmir/overseerError tracking, session replay, incidents, orchestrator
@codmir/cortexEdge auth, smart routing, self-healing, Cortex Protocol
@codmir/aiMulti-provider AI, governance, swarm, voice

Next Steps