npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codmir/sdk

v0.1.2

Published

Official Codmir SDK - TypeScript/JavaScript library for the Codmir API

Readme

@codmir/sdk

Official TypeScript/JavaScript SDK for the Codmir platform.

npm version npm downloads

Features

  • 🔍 Error Tracking - Capture and track errors with full context
  • 🎬 Session Replay - Record and replay user sessions
  • 📊 Performance Monitoring - Track Core Web Vitals
  • 🤖 AI Agent API - Run automated tasks and workflows
  • 📝 Ticket Management - Create and manage project tickets

Installation

npm install @codmir/sdk

Platform-Specific Imports

| Platform | Import | |----------|--------| | Next.js | @codmir/sdk/nextjs | | React Native | @codmir/sdk/react-native | | Browser (vanilla) | @codmir/sdk/browser | | Node.js/Server | @codmir/sdk/overseer | | API Client | @codmir/sdk or @codmir/sdk/client |

Quick Start - Error Tracking

Next.js

// instrumentation-client.ts
import * as Codmir from '@codmir/sdk/nextjs';

Codmir.init({
  dsn: process.env.NEXT_PUBLIC_OVERSEER_DSN,
  environment: process.env.NODE_ENV,
  release: process.env.NEXT_PUBLIC_APP_VERSION,
});

React Native

// App.tsx
import * as Codmir from '@codmir/sdk/react-native';

Codmir.init({
  dsn: 'https://your-project.codmir.com/api/overseer',
});

// Track screen views
Codmir.trackScreenView('HomeScreen');

Browser (Vanilla JS)

import { init, captureException } from '@codmir/sdk/browser';

init({
  dsn: 'https://your-project.codmir.com/api/overseer',
  trackClicks: true,
  trackRequests: true,
});

Quick Start - API Client

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

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

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

// Create a ticket
const ticket = await client.createTicket({
  title: 'Fix login bug',
  description: 'Users cannot login with SSO',
  type: 'bug',
  priority: 'high',
  projectId: 'project-123',
});

// Use AI chat
const response = await client.chat('How do I implement OAuth2?');
console.log(response);

Configuration

const client = new CodmirClient({
  apiKey: 'your-api-key',      // Or set CODMIR_API_KEY env var
  baseUrl: 'https://codmir.com/api',  // Optional, defaults to production
  timeout: 30000,              // Request timeout in ms
  headers: {                   // Custom headers
    'X-Custom-Header': 'value',
  },
});

API Reference

Authentication

// Get current user
const user = await client.whoami();

Projects

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

// Get a specific project
const project = await client.getProject('project-id');

// Create a project
const newProject = await client.createProject({
  name: 'My Project',
  organizationId: 'org-id',
});

Tickets

// List tickets
const tickets = await client.listTickets('project-id', {
  page: 1,
  pageSize: 20,
  status: 'open',
});

// Get a ticket
const ticket = await client.getTicket('project-id', 'ticket-id');

// Create a ticket
const ticket = await client.createTicket({
  title: 'Bug report',
  description: 'Something is broken',
  type: 'bug',
  priority: 'high',
  projectId: 'project-id',
});

// Update a ticket
const updated = await client.updateTicket('project-id', 'ticket-id', {
  status: 'in_progress',
});

// Delete a ticket
await client.deleteTicket('project-id', 'ticket-id');

Test Cases

// List test cases
const testCases = await client.listTestCases('project-id');

// Create a test case
const testCase = await client.createTestCase({
  title: 'Login flow',
  projectId: 'project-id',
  steps: [
    { order: 1, action: 'Open login page', expectedResult: 'Login form displayed' },
    { order: 2, action: 'Enter credentials', expectedResult: 'Fields populated' },
    { order: 3, action: 'Click submit', expectedResult: 'User logged in' },
  ],
});

AI Agent Tasks

// Create an agent task
const task = await client.createAgentTask({
  type: 'code_review',
  prompt: 'Review this pull request for security issues',
  projectId: 'project-id',
});

// Run the task
const execution = await client.runAgentTask({
  taskId: task.id,
  options: {
    model: 'gpt-4-turbo',
  },
});

// Get task status
const status = await client.getAgentTask(task.id);

AI Chat

// Simple chat
const response = await client.chat('Explain dependency injection');

// Chat with project context
const response = await client.chat('How is auth implemented?', {
  projectId: 'project-id',
});

// Streaming chat
const fullResponse = await client.streamChat('Write a function to...', {
  onChunk: (chunk) => process.stdout.write(chunk),
});

Error Handling

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

try {
  const ticket = await client.getTicket('project-id', 'invalid-id');
} catch (error) {
  if (error instanceof CodmirApiError) {
    console.error(`API Error: ${error.code} - ${error.message}`);
    console.error(`Status: ${error.statusCode}`);
  }
}

TypeScript Support

Full TypeScript support with exported types:

import type {
  Ticket,
  CreateTicketInput,
  TicketStatus,
  TicketPriority,
  AgentTask,
  AgentTaskType,
} from '@codmir/sdk';

Related Packages

  • codmir - CLI tool for terminal usage
  • @codmir/types - Shared type definitions

License

MIT