codmir 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +207 -0
  2. package/package.json +6 -6
package/README.md ADDED
@@ -0,0 +1,207 @@
1
+ # codmir
2
+
3
+ Official Codmir CLI - AI-powered autonomous agent for developers.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/codmir.svg)](https://www.npmjs.com/package/codmir)
6
+ [![npm downloads](https://img.shields.io/npm/dm/codmir.svg)](https://www.npmjs.com/package/codmir)
7
+
8
+ ## Features
9
+
10
+ - 🤖 **AI Assistant** - Interactive AI-powered coding assistant in your terminal
11
+ - 🔍 **Codebase Analysis** - Understand and navigate your codebase with AI
12
+ - ⚡ **Intelligent Automation** - Automate repetitive development tasks
13
+ - 🎯 **Context-Aware** - Understands your project structure and dependencies
14
+ - 🔗 **Cloud Sync** - Sync tasks and context with the Codmir platform
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ # Install globally
20
+ npm install -g codmir
21
+
22
+ # Or use with npx
23
+ npx codmir
24
+ ```
25
+
26
+ ## Quick Start
27
+
28
+ ```bash
29
+ # Login to your Codmir account
30
+ codmir login
31
+
32
+ # Start an interactive AI session
33
+ codmir
34
+
35
+ # Ask a question about your codebase
36
+ codmir "How is authentication implemented?"
37
+
38
+ # Analyze your project
39
+ codmir analyze
40
+ ```
41
+
42
+ ## Commands
43
+
44
+ ### Interactive Mode
45
+
46
+ ```bash
47
+ # Start interactive AI assistant
48
+ codmir
49
+
50
+ # You can then chat naturally:
51
+ # > How do I add a new API endpoint?
52
+ # > Explain the database schema
53
+ # > Help me fix this error: [paste error]
54
+ ```
55
+
56
+ ### Project Commands
57
+
58
+ ```bash
59
+ # Link current directory to a Codmir project
60
+ codmir link
61
+
62
+ # Show project status
63
+ codmir status
64
+
65
+ # Analyze codebase and generate insights
66
+ codmir analyze
67
+ ```
68
+
69
+ ### Task Commands
70
+
71
+ ```bash
72
+ # Create a new task
73
+ codmir task create "Implement user authentication"
74
+
75
+ # List tasks
76
+ codmir task list
77
+
78
+ # Get task details
79
+ codmir task show <task-id>
80
+ ```
81
+
82
+ ### Authentication
83
+
84
+ ```bash
85
+ # Login to Codmir
86
+ codmir login
87
+
88
+ # Show current user
89
+ codmir whoami
90
+
91
+ # Logout
92
+ codmir logout
93
+ ```
94
+
95
+ ### Cloud Sync
96
+
97
+ ```bash
98
+ # Sync local context to cloud
99
+ codmir sync
100
+
101
+ # Push local changes
102
+ codmir sync push
103
+
104
+ # Pull remote changes
105
+ codmir sync pull
106
+ ```
107
+
108
+ ## Configuration
109
+
110
+ The CLI uses the following environment variables:
111
+
112
+ | Variable | Description | Default |
113
+ |----------|-------------|---------|
114
+ | `CODMIR_API_KEY` | API key for authentication | - |
115
+ | `CODMIR_API_URL` | Custom API endpoint | `https://codmir.com/api` |
116
+ | `CODMIR_PROJECT_ID` | Default project ID | - |
117
+
118
+ You can also create a `.codmir` config file in your project root:
119
+
120
+ ```json
121
+ {
122
+ "projectId": "your-project-id",
123
+ "organization": "your-org-slug"
124
+ }
125
+ ```
126
+
127
+ ## Usage Examples
128
+
129
+ ### Code Review
130
+
131
+ ```bash
132
+ # Review staged changes
133
+ codmir "Review my staged changes for potential issues"
134
+
135
+ # Review a specific file
136
+ codmir "Review src/auth/login.ts for security issues"
137
+ ```
138
+
139
+ ### Debugging Help
140
+
141
+ ```bash
142
+ # Get help with an error
143
+ codmir "I'm getting this error: TypeError: Cannot read property 'id' of undefined"
144
+
145
+ # Explain code behavior
146
+ codmir "Why is this function returning null?"
147
+ ```
148
+
149
+ ### Code Generation
150
+
151
+ ```bash
152
+ # Generate code
153
+ codmir "Write a function to validate email addresses"
154
+
155
+ # Generate tests
156
+ codmir "Write unit tests for the UserService class"
157
+ ```
158
+
159
+ ### Documentation
160
+
161
+ ```bash
162
+ # Generate documentation
163
+ codmir "Document the API endpoints in src/routes/"
164
+
165
+ # Explain code
166
+ codmir "Explain how the payment flow works"
167
+ ```
168
+
169
+ ## Programmatic Usage
170
+
171
+ You can also import the CLI functionality in your Node.js projects:
172
+
173
+ ```typescript
174
+ import { createContext } from 'codmir/context';
175
+ import { syncToCloud } from 'codmir/sync';
176
+
177
+ // Create a context for the current directory
178
+ const context = await createContext({
179
+ rootDir: process.cwd(),
180
+ includeGitHistory: true,
181
+ });
182
+
183
+ // Sync to cloud
184
+ await syncToCloud(context, {
185
+ projectId: 'your-project-id',
186
+ });
187
+ ```
188
+
189
+ ## Requirements
190
+
191
+ - Node.js >= 18.0.0
192
+ - npm, pnpm, or yarn
193
+
194
+ ## Related Packages
195
+
196
+ - [`@codmir/sdk`](https://www.npmjs.com/package/@codmir/sdk) - TypeScript/JavaScript SDK for the Codmir API
197
+ - `@codmir/types` - Shared type definitions
198
+
199
+ ## Support
200
+
201
+ - 📖 [Documentation](https://codmir.com/docs/cli)
202
+ - 🐛 [Report Issues](https://github.com/codmir-org/platform/issues)
203
+ - 💬 [Discord Community](https://discord.gg/codmir)
204
+
205
+ ## License
206
+
207
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codmir",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Official Codmir CLI - AI-powered autonomous agent for developers. Interactive AI assistant, codebase analysis, and intelligent automation.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -54,11 +54,11 @@
54
54
  "homepage": "https://codmir.com",
55
55
  "dependencies": {
56
56
  "@anthropic-ai/sdk": "^0.30.1",
57
- "@codmir/agent": "workspace:*",
58
- "@codmir/contracts": "workspace:*",
59
- "@codmir/engine": "workspace:*",
60
- "@codmir/governor": "workspace:*",
61
- "@codmir/sdk": "workspace:*",
57
+ "@codmir/agent": "^0.1.0",
58
+ "@codmir/contracts": "^0.1.0",
59
+ "@codmir/engine": "^0.1.0",
60
+ "@codmir/governor": "^0.1.0",
61
+ "@codmir/sdk": "^0.1.2",
62
62
  "chalk": "^5.3.0",
63
63
  "clipboardy": "^5.1.0",
64
64
  "commander": "^12.1.0",