Official Codmir CLI - AI-powered autonomous agent for developers. Interactive AI assistant, codebase analysis, and intelligent automation.
npm install codmirOfficial Codmir CLI - AI-powered autonomous agent for developers.


- 🤖 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
``bashInstall globally
npm install -g codmir
Quick Start
`bash
Login to your Codmir account
codmir loginStart an interactive AI session
codmirAsk a question about your codebase
codmir "How is authentication implemented?"Analyze your project
codmir analyze
`Commands
$3
`bash
Start interactive AI assistant
codmirYou can then chat naturally:
> How do I add a new API endpoint?
> Explain the database schema
> Help me fix this error: [paste error]
`$3
`bash
Link current directory to a Codmir project
codmir linkShow project status
codmir statusAnalyze codebase and generate insights
codmir analyze
`$3
`bash
Create a new task
codmir task create "Implement user authentication"List tasks
codmir task listGet task details
codmir task show
`$3
`bash
Login to Codmir
codmir loginShow current user
codmir whoamiLogout
codmir logout
`$3
`bash
Sync local context to cloud
codmir syncPush local changes
codmir sync pushPull remote changes
codmir sync pull
`Configuration
The CLI uses the following environment variables:
| Variable | Description | Default |
|----------|-------------|---------|
|
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:`json
{
"projectId": "your-project-id",
"organization": "your-org-slug"
}
`Usage Examples
$3
`bash
Review staged changes
codmir "Review my staged changes for potential issues"Review a specific file
codmir "Review src/auth/login.ts for security issues"
`$3
`bash
Get help with an error
codmir "I'm getting this error: TypeError: Cannot read property 'id' of undefined"Explain code behavior
codmir "Why is this function returning null?"
`$3
`bash
Generate code
codmir "Write a function to validate email addresses"Generate tests
codmir "Write unit tests for the UserService class"
`$3
`bash
Generate documentation
codmir "Document the API endpoints in src/routes/"Explain code
codmir "Explain how the payment flow works"
`Programmatic Usage
You can also import the CLI functionality in your Node.js projects:
`typescript
import { createContext } from 'codmir/context';
import { syncToCloud } from 'codmir/sync';// Create a context for the current directory
const context = await createContext({
rootDir: process.cwd(),
includeGitHistory: true,
});
// Sync to cloud
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- 📖 Documentation
- 🐛 Report Issues
- 💬 Discord Community
MIT