Programmatic access to Codmir tickets, projects, and AI chat.

API Client

The CodmirClient provides programmatic access to the Codmir platform — create tickets, manage projects, and use the AI chat API.

npm install @codmir/sdk

Quick Start

import { CodmirClient } from '@codmir/sdk';

const client = new CodmirClient({
  apiKey: process.env.CODMIR_API_KEY,
});

// Create a ticket
const ticket = await client.createTicket({
  title: 'Bug: Login fails on mobile',
  description: 'Users report blank screen after OAuth redirect',
  type: 'bug',
  priority: 'high',
  projectId: 'project-123',
});

// AI chat
const response = await client.chat('How do I fix this CORS error?');

Tickets

// Create
const ticket = await client.createTicket({
  title: 'Add dark mode',
  type: 'feature',
  priority: 'medium',
  projectId: 'project-123',
});

// List
const tickets = await client.listTickets({ projectId: 'project-123' });

// Update
await client.updateTicket(ticket.id, { status: 'in_progress' });

Projects

// List projects
const projects = await client.listProjects();

// Get project details
const project = await client.getProject('project-123');

AI Chat

// Simple chat
const response = await client.chat('Explain this error: TypeError: Cannot read property...');

// With context
const response = await client.chat('How should I refactor this?', {
  context: { file: 'src/auth.ts', language: 'typescript' },
});