codmir 0.3.2 → 0.3.3

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.
package/LICENSE ADDED
@@ -0,0 +1,55 @@
1
+ Copyright (c) 2024-2025 codmir, Inc. All Rights Reserved.
2
+
3
+ PROPRIETARY SOFTWARE LICENSE AGREEMENT
4
+
5
+ codmir CLI & SDK
6
+
7
+ This command-line interface, software development kit, and associated files
8
+ (the "Software") are the proprietary and confidential information of codmir, Inc.
9
+
10
+ ALL RIGHTS RESERVED.
11
+
12
+ USAGE TERMS:
13
+
14
+ 1. This Software is provided to users with a valid codmir account.
15
+
16
+ 2. Licensed users may:
17
+ - Install the CLI globally on their development machines
18
+ - Use the SDK in their projects with a valid API key
19
+ - Access codmir services according to their subscription tier
20
+
21
+ 3. You may NOT:
22
+ - Redistribute, sublicense, or sell the Software
23
+ - Modify or create derivative works
24
+ - Reverse engineer or decompile
25
+ - Remove proprietary notices
26
+ - Use without a valid codmir account and API key
27
+ - Exceed usage limits of your subscription tier
28
+
29
+ 4. This Software connects to codmir's proprietary services which require:
30
+ - A valid account (free tier available)
31
+ - API key for authentication
32
+ - Compliance with Terms of Service
33
+
34
+ SUBSCRIPTION TIERS:
35
+
36
+ - Free: Limited features and usage
37
+ - Pro: Full features with usage-based billing
38
+ - Enterprise: Custom pricing and private deployment
39
+
40
+ DATA & PRIVACY:
41
+
42
+ - All data transmitted is encrypted
43
+ - Usage data is collected for billing
44
+ - See Privacy Policy at https://codmir.com/privacy
45
+
46
+ DISCLAIMER:
47
+
48
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
51
+
52
+ For licensing inquiries: sales@codmir.com
53
+ For support: support@codmir.com
54
+ Website: https://codmir.com
55
+ Terms of Service: https://codmir.com/terms
package/README.md CHANGED
@@ -3,18 +3,36 @@
3
3
  > TypeScript SDK for codmir API - **the AI that prevents wasted engineering time**.
4
4
 
5
5
  [![npm version](https://badge.fury.io/js/codmir.svg)](https://www.npmjs.com/package/codmir)
6
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue.svg)](https://www.typescriptlang.org/)
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
6
 
9
- ## Features
7
+ We've massively expanded the SDK with game-changing AI features:
10
8
 
11
- - **Full TypeScript support** with complete type definitions
12
- - 🎫 **Tickets API** - Create and manage project tickets
13
- - 🧪 **Test Cases API** - Create, update, and manage test cases
14
- - 🔐 **API Key authentication**
15
- - **Promise-based** async/await API
16
- - 🌐 **Works in Node.js and browsers**
17
- - 📦 **Zero dependencies**
9
+ - **Codebase Analysis** - Analyze your project in 1-5 seconds, understand structure, dependencies, and patterns
10
+ - **Knowledge Base** - Auto-generated project knowledge for AI context
11
+ - **AI Task Replication** - Save, clone, and resume AI tasks anywhere (like VM snapshots for AI)
12
+ - **Usage Tracking** - Track AI costs per API key with detailed billing
13
+ - **Multi-Agent Support** - Coordinate TARS, Cascade, Overseer agents
14
+ - **Observability** - Session replay and error tracking (separate @codmir/observe package)
15
+ - **IDE Integration** - VSCode extension with project graph visualization
16
+
17
+ ## Core Features
18
+
19
+ ### AI & Automation
20
+ - **AI Assistant** - Interactive AI chat with project context
21
+ - **Codebase Analysis** - Local (fast) or Railway (deep) analysis
22
+ - **Knowledge Base** - Structured project understanding for AI
23
+ - **Task DNA** - Snapshot and replicate AI tasks
24
+ - **Cost Tracking** - Monitor AI usage and costs
25
+
26
+ ### Project Management
27
+ - **Projects** - Create and manage projects
28
+ - **Tickets** - Full ticket lifecycle with AI integration
29
+ - **Tasks** - Track and automate tasks
30
+
31
+ ### Development Tools
32
+ - **Authentication** - Secure API key management
33
+ - **REST API** - Comprehensive API client
34
+ - **TypeScript** - Full type safety
35
+ - **CLI** - Powerful command-line interface
18
36
 
19
37
  ## Installation
20
38
 
@@ -39,11 +57,17 @@ yarn add codmir
39
57
  ### As a CLI (Global)
40
58
 
41
59
  ```bash
42
- npm install -g codmir
43
- # or
44
60
  pnpm add -g codmir
45
61
  ```
46
62
 
63
+ **New CLI Commands:**
64
+ - `codmir analyze` - Analyze codebase and generate knowledge base
65
+ - `codmir ai` - Interactive AI assistant with project context
66
+ - `codmir usage` - View API usage and billing stats
67
+ - `codmir task` - Manage AI task snapshots and replication
68
+
69
+ See [CLI Documentation](./CLI.md) for all commands.
70
+
47
71
  Then authenticate and link your project:
48
72
 
49
73
  ```bash
@@ -52,7 +76,154 @@ codmir link # Link current directory to a project
52
76
  codmir init # Initialize with examples
53
77
  ```
54
78
 
55
- See [CLI Documentation](./CLI.md) for more details.
79
+ ### AI Agent Mode
80
+
81
+ The CLI includes a powerful AI assistant that understands YOUR codebase:
82
+
83
+ ```bash
84
+ # Interactive agent session
85
+ codmir ai
86
+
87
+ # With full project context (uses knowledge base)
88
+ codmir ai --context
89
+
90
+ # Quick query
91
+ codmir ask "How do I setup authentication?"
92
+ ```
93
+
94
+ **Enhanced Features:**
95
+ - 🤖 **Context-Aware AI** - Uses project knowledge base
96
+ - 📋 **Clipboard Support** - Attach images automatically
97
+ - 🔗 **Execution Context** - Knows if you're in a linked project
98
+ - 🖼️ **Media Upload** - Screenshots, diagrams, error messages
99
+ - 💰 **Cost Tracking** - See token usage after each query
100
+ - 🎯 **Smart Responses** - AI follows YOUR code patterns
101
+
102
+ ### Codebase Analysis
103
+
104
+ Analyze your project to enable context-aware AI:
105
+
106
+ ```bash
107
+ # Link project (auto-prompts to analyze)
108
+ codmir link
109
+
110
+ # Manual analysis
111
+ codmir analyze
112
+
113
+ # Deep analysis on Railway
114
+ codmir analyze --mode railway
115
+
116
+ # Force re-analysis
117
+ codmir analyze --force
118
+ ```
119
+
120
+ **What Gets Analyzed:**
121
+ - 📁 File structure and organization
122
+ - 🔗 Dependencies and imports
123
+ - ⚙️ Tech stack (frameworks, libraries, tools)
124
+ - 📄 Entry points and scripts
125
+ - 📚 Documentation (README, etc.)
126
+ - 🎯 Code patterns and best practices
127
+
128
+ **Knowledge Base Location:** `.codmir/knowledge/`
129
+
130
+ ### Usage Tracking & Billing
131
+
132
+ Monitor AI costs and usage per API key:
133
+
134
+ ```bash
135
+ # View current month usage
136
+ codmir usage
137
+
138
+ # Detailed breakdown by provider
139
+ codmir usage --detailed
140
+
141
+ # Specific month
142
+ codmir usage --month 2025-12
143
+ ```
144
+
145
+ **Tracks:**
146
+ - 🤖 AI calls per agent (TARS, Cascade, Overseer)
147
+ - 🎟️ Token usage (prompt + completion)
148
+ - 💰 Cost breakdown by provider (OpenAI, Anthropic)
149
+ - 📊 Monthly aggregation
150
+ - 🎯 ROI calculation (time saved)
151
+
152
+ ### AI Task Replication (Coming Soon)
153
+
154
+ Snapshot and clone AI tasks like VM snapshots:
155
+
156
+ ```bash
157
+ # Create task
158
+ codmir task create "Implement feature X"
159
+
160
+ # Snapshot current state (50% done)
161
+ codmir task snapshot task_123
162
+
163
+ # Clone for testing
164
+ codmir task clone task_123 --count 3
165
+
166
+ # Restore anywhere
167
+ codmir task restore task_123.dna
168
+
169
+ # Resume from checkpoint
170
+ codmir task resume task_123
171
+ ```
172
+
173
+ **Benefits:**
174
+ - 💾 Save AI progress anytime
175
+ - 🔄 Resume on different infrastructure
176
+ - 🧬 Clone for parallel execution
177
+ - ☁️ Migrate between services (Railway → Lambda → Local)
178
+ - 📦 Share AI states with team
179
+
180
+ See [AI Task Replication Docs](../../AI_TASK_REPLICATION_FRAMEWORK.md) for details.
181
+
182
+ See [Agent Mode Quick Start](./AGENT_MODE_QUICK_START.md) and [CLI Documentation](./CLI.md) for more details.
183
+
184
+ ## The codmir Ecosystem
185
+
186
+ ### Complete Platform
187
+
188
+ codmir is more than just an SDK - it's a complete AI-powered development platform:
189
+
190
+ ```
191
+ ┌──────────────────────────────────────────────┐
192
+ │ codmir Platform │
193
+ ├──────────────────────────────────────────────┤
194
+ │ │
195
+ │ 📦 @codmir/sdk │
196
+ │ └─ CLI & SDK (this package) │
197
+ │ │
198
+ │ 🔍 @codmir/observe │
199
+ │ └─ Session replay & error tracking │
200
+ │ │
201
+ │ 🎨 VSCode Extension │
202
+ │ └─ IDE integration with project graph │
203
+ │ │
204
+ │ 🤖 AI Agents │
205
+ │ ├─ TARS (code generation) │
206
+ │ ├─ Cascade (code review) │
207
+ │ └─ Overseer (monitoring) │
208
+ │ │
209
+ │ 🌐 Web Dashboard │
210
+ │ └─ Projects, tickets, reports, analytics │
211
+ │ │
212
+ └──────────────────────────────────────────────┘
213
+ ```
214
+
215
+ ### Related Packages
216
+
217
+ - **@codmir/observe** - Observability SDK for session replay and error tracking
218
+ - **codmir-vscode** - VSCode extension with project graph visualization
219
+
220
+ ### Documentation
221
+
222
+ - [Complete System Integration](../../COMPLETE_SYSTEM_INTEGRATION.md)
223
+ - [Codebase Analysis Architecture](../../CODEBASE_ANALYSIS_ARCHITECTURE.md)
224
+ - [AI Task Replication Framework](../../AI_TASK_REPLICATION_FRAMEWORK.md)
225
+ - [Observability Platform](../../OBSERVABILITY_PLATFORM_ARCHITECTURE.md)
226
+ - [AI Orchestration Vision](../../AI_ORCHESTRATION_VISION.md)
56
227
 
57
228
  ## Quick Start
58
229
 
@@ -317,10 +488,34 @@ import type {
317
488
  } from 'codmir';
318
489
  ```
319
490
 
491
+ ## What Makes codmir Different?
492
+
493
+ ### vs Traditional Tools
494
+
495
+ | Feature | codmir | Sentry | Datadog | GitHub |
496
+ |---------|--------|--------|---------|--------|
497
+ | Codebase Understanding | ✅ AI-powered | ❌ | ❌ | ❌ |
498
+ | Usage-Based Billing | ✅ Transparent | ✅ | ✅ | ❌ |
499
+ | Session Replay | ✅ 10KB/min | ✅ 50KB/min | ✅ 100KB/min | ❌ |
500
+ | AI Task Cloning | ✅ Unique | ❌ | ❌ | ❌ |
501
+ | Multi-Agent System | ✅ Built-in | ❌ | ❌ | ❌ |
502
+ | Cost Tracking | ✅ Per AI call | ❌ | ❌ | ❌ |
503
+ | IDE Integration | ✅ VSCode | ❌ | ❌ | ❌ |
504
+ | Knowledge Base | ✅ Auto-generated | ❌ | ❌ | ❌ |
505
+
506
+ ### Key Differentiators
507
+
508
+ 1. **AI Understands YOUR Code** - Not generic responses, context from your actual codebase
509
+ 2. **Task Replication** - Save and clone AI states (no other platform does this)
510
+ 3. **Complete Visibility** - Track every AI call, token, and cost
511
+ 4. **3-10x More Efficient** - Smaller bundle, less data, better performance
512
+ 5. **Unified Platform** - One tool for everything (no juggling multiple services)
513
+
320
514
  ## Requirements
321
515
 
322
516
  - Node.js >= 18.0.0
323
517
  - TypeScript >= 5.0.0 (if using TypeScript)
518
+ - codmir account (free tier available)
324
519
 
325
520
  ## Browser Support
326
521
 
@@ -328,7 +523,17 @@ This package uses the Fetch API which is available in all modern browsers and No
328
523
 
329
524
  ## License
330
525
 
331
- MIT
526
+ **Proprietary - All Rights Reserved**
527
+
528
+ Copyright © 2024-2025 codmir, Inc.
529
+
530
+ This software is proprietary and confidential. Unauthorized copying, distribution, or use is strictly prohibited.
531
+
532
+ - Requires valid codmir account
533
+ - Subject to Terms of Service
534
+ - Commercial use requires paid subscription
535
+
536
+ For licensing inquiries: sales@codmir.com
332
537
 
333
538
  ## Links
334
539
 
@@ -0,0 +1,7 @@
1
+ import {
2
+ analyzeCommand
3
+ } from "./chunk-ASGAT3Z5.mjs";
4
+ import "./chunk-EBO3CZXG.mjs";
5
+ export {
6
+ analyzeCommand
7
+ };