codmir
Official Codmir CLI - AI-powered autonomous agent for developers.

Features
- 🤖 AI Assistant - Interactive AI-powered coding assistant in your terminal
- 🔍 Codebase Analysis - Understand and navigate your codebase with AI
- ⚡ Intelligent Automation - Automate repetitive development tasks
- 🎯 Context-Aware - Understands your project structure and dependencies
- 🔗 Cloud Sync - Sync tasks and context with the Codmir platform
Installation
npm install -g codmir
npx codmir
Quick Start
codmir login
codmir
codmir "How is authentication implemented?"
codmir analyze
Commands
Interactive Mode
codmir
Project Commands
codmir link
codmir status
codmir analyze
Task Commands
codmir task create "Implement user authentication"
codmir task list
codmir task show <task-id>
Authentication
codmir login
codmir whoami
codmir logout
Cloud Sync
codmir sync
codmir sync push
codmir sync pull
Configuration
The CLI uses the following environment variables:
CODMIR_API_KEY | API key for authentication | - |
CODMIR_API_URL | Custom API endpoint | https://codmir.com/api |
CODMIR_PROJECT_ID | Default project ID | - |
You can also create a .codmir config file in your project root:
{
"projectId": "your-project-id",
"organization": "your-org-slug"
}
Usage Examples
Code Review
codmir "Review my staged changes for potential issues"
codmir "Review src/auth/login.ts for security issues"
Debugging Help
codmir "I'm getting this error: TypeError: Cannot read property 'id' of undefined"
codmir "Why is this function returning null?"
Code Generation
codmir "Write a function to validate email addresses"
codmir "Write unit tests for the UserService class"
Documentation
codmir "Document the API endpoints in src/routes/"
codmir "Explain how the payment flow works"
Programmatic Usage
You can also import the CLI functionality in your Node.js projects:
import { createContext } from 'codmir/context';
import { syncToCloud } from 'codmir/sync';
const context = await createContext({
rootDir: process.cwd(),
includeGitHistory: true,
});
await syncToCloud(context, {
projectId: 'your-project-id',
});
Requirements
- Node.js >= 18.0.0
- npm, pnpm, or yarn
Related Packages
@codmir/sdk - TypeScript/JavaScript SDK for the Codmir API
@codmir/types - Shared type definitions
Support
License
MIT