recoder-code 2.2.6 ā 2.2.9
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/README.md +114 -350
- package/cli/interactive.js +9 -2
- package/cli/lite-mode.js +7 -4
- package/cli/run.js +21 -10
- package/cli/simple-setup.js +7 -7
- package/cli/user-onboarding.js +65 -5
- package/config.js +15 -1
- package/package.json +6 -6
- package/setup.js +6 -4
package/README.md
CHANGED
|
@@ -1,424 +1,188 @@
|
|
|
1
|
-
# š Recoder-Code
|
|
1
|
+
# š Recoder-Code
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://nodejs.org/)
|
|
5
|
-
[](https://openrouter.ai/)
|
|
6
|
-
[](https://docker.com/)
|
|
3
|
+
> **Complete AI-powered development platform** - Chat with 32+ AI models, build projects, and automate your workflow
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/recoder-code)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://nodejs.org/)
|
|
9
8
|
|
|
10
|
-
## āØ
|
|
9
|
+
## ⨠Features
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- **Free Models**: DeepSeek, Qwen, Google Gemma - no subscription needed!
|
|
20
|
-
- **Premium Options**: Claude Sonnet 4, GPT-4, and more when you need them
|
|
21
|
-
- **Smart Selection**: Automatically picks the best model for each task
|
|
22
|
-
- **Cost Optimization**: Prioritizes free models without sacrificing quality
|
|
23
|
-
|
|
24
|
-
### šļø **Complete Development Platform**
|
|
25
|
-
- **Real-time Collaboration**: Share projects with your team
|
|
26
|
-
- **ML Model Training**: Train and merge custom models
|
|
27
|
-
- **Plugin Marketplace**: Extend functionality with community plugins
|
|
28
|
-
- **Docker Integration**: Seamless container management
|
|
29
|
-
- **Project Management**: Built-in session tracking and documentation
|
|
11
|
+
- š¤ **32+ AI Models** - Access GPT-4, Claude, Gemini, DeepSeek, and more through OpenRouter
|
|
12
|
+
- š **File Operations** - Create, edit, and manage files directly from chat
|
|
13
|
+
- š§ **Project Builder** - Build complete applications with AI assistance
|
|
14
|
+
- ā” **Fast & Free** - Free models included, instant responses
|
|
15
|
+
- šÆ **Smart Defaults** - Works out of the box with minimal configuration
|
|
16
|
+
- š **Interactive Mode** - Real-time chat interface with syntax highlighting
|
|
17
|
+
- š **Multi-Platform** - Windows, macOS, and Linux support
|
|
30
18
|
|
|
31
19
|
## š Quick Start
|
|
32
20
|
|
|
33
|
-
###
|
|
34
|
-
|
|
35
|
-
**ā ļø Important:** Use `npm install -g` (not `npm i` shown on some npm pages) for global installation.
|
|
21
|
+
### Installation
|
|
36
22
|
|
|
37
23
|
```bash
|
|
38
|
-
# 1. Install globally (use full command for global install)
|
|
39
24
|
npm install -g recoder-code
|
|
40
|
-
|
|
41
|
-
# 2. Launch Recoder Code
|
|
42
|
-
recoder-code
|
|
43
25
|
```
|
|
44
26
|
|
|
45
|
-
|
|
27
|
+
### Setup (30 seconds)
|
|
46
28
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
3. **š¤ Model Selection** - Choose your AI model (defaults to free DeepSeek)
|
|
50
|
-
4. **š Ready to Code** - Interactive AI terminal launches instantly
|
|
51
|
-
|
|
52
|
-
### ⨠First-Time User Experience
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
āāāāāāā āāāāāāāā āāāāāāā āāāāāāā āāāāāāā āāāāāāāāāāāāāāā
|
|
56
|
-
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
57
|
-
āāāāāāāāāāāāāā āāā āāā āāāāāā āāāāāāāāā āāāāāāāā
|
|
58
|
-
āāāāāāāāāāāāāā āāā āāā āāāāāā āāāāāāāāā āāāāāāāā
|
|
59
|
-
āāā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā āāā
|
|
60
|
-
āāā āāāāāāāāāāā āāāāāāā āāāāāāā āāāāāāā āāāāāāāāāāā āāā
|
|
61
|
-
|
|
62
|
-
Welcome to Recoder Code v2.2.3
|
|
63
|
-
Your AI-powered development companion
|
|
64
|
-
|
|
65
|
-
š What's your name? John
|
|
66
|
-
š Enter your OpenRouter API key: [your-free-key]
|
|
67
|
-
š¤ Model Selection:
|
|
68
|
-
1. DeepSeek Chat v3.1 (Free) - Recommended āØ
|
|
69
|
-
2. Claude 3.5 Sonnet - Advanced reasoning
|
|
70
|
-
3. GPT-4 Turbo - OpenAI's latest
|
|
71
|
-
4. Custom model
|
|
72
|
-
|
|
73
|
-
ā
Setup Complete! Welcome aboard, John! š
|
|
74
|
-
Ready for AI-powered development...
|
|
29
|
+
```bash
|
|
30
|
+
recoder-code --setup
|
|
75
31
|
```
|
|
76
32
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
For returning users, just run `recoder-code` and you'll get:
|
|
80
|
-
- Instant welcome back with your saved preferences
|
|
81
|
-
- No setup required - jumps straight to AI chat
|
|
82
|
-
- Your chosen model and settings remembered
|
|
83
|
-
|
|
84
|
-
### š Free API Key Setup
|
|
85
|
-
|
|
86
|
-
1. Visit [OpenRouter.ai](https://openrouter.ai/keys)
|
|
87
|
-
2. Sign up for free account
|
|
88
|
-
3. Generate your API key
|
|
89
|
-
4. Paste when prompted during setup
|
|
33
|
+
You'll need a free API key from [OpenRouter](https://openrouter.ai/keys) - takes 30 seconds to get!
|
|
90
34
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
### All Available Commands
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
# š¬ AI CHAT & CODE GENERATION
|
|
97
|
-
recoder-code "Build me a todo app" # Natural language development
|
|
98
|
-
recoder-code --stream "Help me debug" # Streaming responses
|
|
99
|
-
recoder-code --model claude-3.5 "..." # Choose specific model
|
|
100
|
-
|
|
101
|
-
# š¤ COLLABORATION & WORKSPACES
|
|
102
|
-
recoder-code workspace create "My Project" # Create team workspace
|
|
103
|
-
recoder-code workspace share "My Project" # Share for collaboration
|
|
104
|
-
recoder-code collab create "Team Session" # Start collaboration session
|
|
105
|
-
recoder-code collab join session-123 # Join shared session
|
|
106
|
-
|
|
107
|
-
# š GITHUB INTEGRATION
|
|
108
|
-
recoder-code github list # List open issues
|
|
109
|
-
recoder-code github pr "Fix bug" # Create pull request
|
|
110
|
-
recoder-code github clone <repo-url> # Clone repository
|
|
111
|
-
recoder-code github info owner/repo # Get repository info
|
|
112
|
-
|
|
113
|
-
# š¤ ML TRAINING & MODEL MANAGEMENT
|
|
114
|
-
recoder-code train create "My Model" # Create training session
|
|
115
|
-
recoder-code train start session-123 # Start model training
|
|
116
|
-
recoder-code train status # Check training status
|
|
117
|
-
|
|
118
|
-
# š PLUGIN SYSTEM
|
|
119
|
-
recoder-code plugins search "formatter" # Search for plugins
|
|
120
|
-
recoder-code plugins install <name> # Install plugin
|
|
121
|
-
recoder-code plugins registry start # Start plugin registry
|
|
122
|
-
|
|
123
|
-
# šļø INFRASTRUCTURE & DEPLOYMENT
|
|
124
|
-
recoder-code monitor setup # Set up Prometheus monitoring
|
|
125
|
-
recoder-code infra plan # Plan Terraform deployment
|
|
126
|
-
recoder-code k8s deploy # Deploy to Kubernetes
|
|
127
|
-
recoder-code services start # Start Docker services
|
|
128
|
-
|
|
129
|
-
# š SCRIPTS & AUTOMATION
|
|
130
|
-
recoder-code scripts list # List available scripts
|
|
131
|
-
recoder-code scripts run setup # Run automation script
|
|
132
|
-
|
|
133
|
-
# š ļø SYSTEM & CONFIGURATION
|
|
134
|
-
recoder-code --help # Show help system
|
|
135
|
-
recoder-code --setup # Interactive setup wizard
|
|
136
|
-
recoder-code --info # Show system information
|
|
137
|
-
|
|
138
|
-
### First Time Here? Try These Commands
|
|
35
|
+
### Usage
|
|
139
36
|
|
|
37
|
+
**Interactive Mode** (recommended):
|
|
140
38
|
```bash
|
|
141
|
-
|
|
142
|
-
recoder-code "Hello world"
|
|
143
|
-
|
|
144
|
-
# Build a complete project
|
|
145
|
-
recoder-code "Create a React todo app with TypeScript"
|
|
146
|
-
|
|
147
|
-
# Get help and see what's possible
|
|
148
|
-
recoder-code --help
|
|
149
|
-
|
|
150
|
-
# Check your progress and unlock features
|
|
151
|
-
recoder-code --progress
|
|
39
|
+
recoder-code
|
|
152
40
|
```
|
|
153
41
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
| Feature | Lite Mode | Full Platform | Claude Code |
|
|
157
|
-
|---------|-----------|---------------|-------------|
|
|
158
|
-
| **Setup Time** | 30 seconds | 5 minutes | 30 seconds |
|
|
159
|
-
| **AI Models** | 32+ models | 32+ models | Anthropic only |
|
|
160
|
-
| **Cost** | Free models available | Free + premium | $20/month |
|
|
161
|
-
| **File Operations** | ā
Full support | ā
Full support | ā
Full support |
|
|
162
|
-
| **Project Building** | ā
Complete projects | ā
Complete projects | ā
Complete projects |
|
|
163
|
-
| **Collaboration** | ā Single user | ā
Real-time teams | ā Single user |
|
|
164
|
-
| **ML Training** | ā Not available | ā
Custom models | ā Not available |
|
|
165
|
-
| **Plugin System** | ā Not available | ā
Marketplace | ā Not available |
|
|
166
|
-
| **Docker Management** | ā Manual only | ā
Auto-managed | ā Not available |
|
|
167
|
-
|
|
168
|
-
## šÆ Advanced Features
|
|
169
|
-
|
|
170
|
-
### š§ When You're Ready for More
|
|
171
|
-
|
|
42
|
+
**One-shot Commands**:
|
|
172
43
|
```bash
|
|
173
|
-
#
|
|
174
|
-
recoder-code
|
|
175
|
-
|
|
176
|
-
# Start real-time collaboration
|
|
177
|
-
recoder-code collab create "My Project"
|
|
178
|
-
|
|
179
|
-
# Train custom models
|
|
180
|
-
recoder-code train merge config.json
|
|
44
|
+
# Simple query
|
|
45
|
+
recoder-code "create a hello world in python"
|
|
181
46
|
|
|
182
|
-
#
|
|
183
|
-
recoder-code
|
|
47
|
+
# Build a project
|
|
48
|
+
recoder-code "build a REST API with Express.js"
|
|
184
49
|
|
|
185
|
-
#
|
|
186
|
-
recoder-code
|
|
50
|
+
# Use specific model
|
|
51
|
+
recoder-code --model anthropic/claude-3.5-sonnet "analyze this codebase"
|
|
187
52
|
```
|
|
188
53
|
|
|
189
|
-
|
|
54
|
+
## š Examples
|
|
190
55
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
- **After 3 file operations**: Suggests streaming for faster responses
|
|
194
|
-
- **After building projects**: Suggests collaboration features
|
|
195
|
-
- **When exploring models**: Shows ML training capabilities
|
|
196
|
-
- **Based on usage patterns**: Personalized feature recommendations
|
|
197
|
-
|
|
198
|
-
## š ļø Installation & Setup Options
|
|
199
|
-
|
|
200
|
-
> **ā ļø NPM Command Important Notice**
|
|
201
|
-
> Always use `npm install -g recoder-code` (full command) for global installation.
|
|
202
|
-
> The `npm i` shorthand shown on some npm websites is incorrect for global installs and may cause issues.
|
|
203
|
-
|
|
204
|
-
### Option 1: NPM Global Install (Recommended)
|
|
56
|
+
### Create a Web App
|
|
205
57
|
```bash
|
|
206
|
-
|
|
207
|
-
npm install -g recoder-code
|
|
208
|
-
|
|
209
|
-
# Launch with onboarding
|
|
210
|
-
recoder-code
|
|
58
|
+
recoder-code "create a todo app with React and Tailwind CSS"
|
|
211
59
|
```
|
|
212
60
|
|
|
213
|
-
###
|
|
61
|
+
### Analyze Code
|
|
214
62
|
```bash
|
|
215
|
-
|
|
216
|
-
cd recoder-code
|
|
217
|
-
npm install
|
|
218
|
-
npm link
|
|
219
|
-
recoder-code --setup
|
|
63
|
+
recoder-code "review my authentication system and suggest improvements"
|
|
220
64
|
```
|
|
221
65
|
|
|
222
|
-
###
|
|
66
|
+
### Debug Issues
|
|
223
67
|
```bash
|
|
224
|
-
|
|
225
|
-
cd recoder-code
|
|
226
|
-
docker-compose up -d
|
|
227
|
-
npm install -g .
|
|
228
|
-
recoder-code --setup
|
|
68
|
+
recoder-code "why is my async function not working in app.js?"
|
|
229
69
|
```
|
|
230
70
|
|
|
231
|
-
##
|
|
71
|
+
## šÆ Key Commands
|
|
232
72
|
|
|
233
|
-
### Basic Commands
|
|
234
73
|
```bash
|
|
235
|
-
recoder-code
|
|
236
|
-
recoder-code
|
|
237
|
-
recoder-code --help
|
|
238
|
-
recoder-code --
|
|
239
|
-
recoder-code --
|
|
74
|
+
recoder-code # Start interactive chat
|
|
75
|
+
recoder-code --setup # First-time configuration
|
|
76
|
+
recoder-code --help # Show all options
|
|
77
|
+
recoder-code --models # List available AI models
|
|
78
|
+
recoder-code --stats # View usage statistics
|
|
240
79
|
```
|
|
241
80
|
|
|
242
|
-
###
|
|
243
|
-
```bash
|
|
244
|
-
recoder-code --models # List all available models
|
|
245
|
-
recoder-code --stream "prompt" # Streaming responses (faster)
|
|
246
|
-
recoder-code --fast "prompt" # Optimize for speed
|
|
247
|
-
recoder-code --cheap "prompt" # Optimize for cost
|
|
248
|
-
```
|
|
81
|
+
### Interactive Mode Commands
|
|
249
82
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### Services & Collaboration
|
|
259
|
-
```bash
|
|
260
|
-
recoder-code services status # Check service health
|
|
261
|
-
recoder-code services start # Start all services
|
|
262
|
-
recoder-code --enable-services # Enable full platform
|
|
263
|
-
recoder-code collab create "name" # Start collaboration
|
|
264
|
-
```
|
|
83
|
+
Once in interactive mode:
|
|
84
|
+
- `/help` - Show available commands
|
|
85
|
+
- `/model` - Switch AI models
|
|
86
|
+
- `/clear` - Clear conversation
|
|
87
|
+
- `/export` - Export chat history
|
|
88
|
+
- `/quit` - Exit
|
|
265
89
|
|
|
266
90
|
## š§ Configuration
|
|
267
91
|
|
|
268
|
-
|
|
92
|
+
Your API key is stored securely in `~/.recoder-code/.env`:
|
|
269
93
|
|
|
270
|
-
|
|
271
|
-
-
|
|
272
|
-
|
|
273
|
-
- **Capabilities**: Memory, cores, available tools
|
|
274
|
-
- **Project Context**: Framework, language, existing configs
|
|
94
|
+
```bash
|
|
95
|
+
OPENROUTER_API_KEY=sk-or-v1-...
|
|
96
|
+
```
|
|
275
97
|
|
|
276
|
-
###
|
|
98
|
+
### Advanced Options
|
|
277
99
|
|
|
278
100
|
```bash
|
|
279
|
-
#
|
|
280
|
-
recoder-code
|
|
101
|
+
# Use faster model
|
|
102
|
+
recoder-code --fast "quick question"
|
|
281
103
|
|
|
282
|
-
#
|
|
283
|
-
recoder-code
|
|
284
|
-
recoder-code config set cli.theme dark
|
|
104
|
+
# Use cheapest model
|
|
105
|
+
recoder-code --cheap "simple task"
|
|
285
106
|
|
|
286
|
-
#
|
|
287
|
-
recoder-code
|
|
107
|
+
# Enable streaming
|
|
108
|
+
recoder-code --stream "long response"
|
|
109
|
+
|
|
110
|
+
# Debug mode
|
|
111
|
+
RECODER_DEBUG=true recoder-code "test query"
|
|
288
112
|
```
|
|
289
113
|
|
|
290
|
-
|
|
114
|
+
## š Why Recoder-Code?
|
|
291
115
|
|
|
292
|
-
|
|
116
|
+
- ā
**No Configuration Hell** - Works immediately after setup
|
|
117
|
+
- ā
**Multiple Models** - Switch between 32+ AI models instantly
|
|
118
|
+
- ā
**Free Tier Available** - Use free models without a credit card
|
|
119
|
+
- ā
**File Operations** - AI can create and edit files directly
|
|
120
|
+
- ā
**Session History** - Conversations are automatically saved
|
|
121
|
+
- ā
**Fallback Support** - Auto-switches models if primary fails
|
|
122
|
+
- ā
**Production Ready** - Used in real development workflows
|
|
293
123
|
|
|
294
|
-
|
|
124
|
+
## š Documentation
|
|
295
125
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
126
|
+
- [Model Selection Guide](./MODEL_SELECTION.md)
|
|
127
|
+
- [Interactive Guide](./INTERACTIVE_GUIDE.md)
|
|
128
|
+
- [Production Deployment](./PRODUCTION_GUIDE.md)
|
|
129
|
+
- [Contributing](./CONTRIBUTING.md)
|
|
299
130
|
|
|
300
|
-
|
|
301
|
-
recoder-code services smart-start collaboration
|
|
131
|
+
## š Troubleshooting
|
|
302
132
|
|
|
303
|
-
|
|
304
|
-
|
|
133
|
+
### "Command not found"
|
|
134
|
+
```bash
|
|
135
|
+
npm install -g recoder-code
|
|
136
|
+
```
|
|
305
137
|
|
|
306
|
-
|
|
307
|
-
|
|
138
|
+
### "API Key Required"
|
|
139
|
+
```bash
|
|
140
|
+
recoder-code --setup
|
|
308
141
|
```
|
|
309
142
|
|
|
310
|
-
###
|
|
143
|
+
### "Module not found"
|
|
144
|
+
```bash
|
|
145
|
+
npm install -g recoder-code --force
|
|
146
|
+
```
|
|
311
147
|
|
|
312
|
-
|
|
313
|
-
- **Collaboration Service** (Port 3003): Real-time collaborative editing
|
|
314
|
-
- **Plugin Registry** (Port 3000): Plugin discovery and management
|
|
315
|
-
- **Redis** (Port 6379): Session and cache management
|
|
316
|
-
- **PostgreSQL** (Port 5432): User data and project storage
|
|
148
|
+
## š” Pro Tips
|
|
317
149
|
|
|
318
|
-
|
|
150
|
+
1. **Use Free Models First** - DeepSeek and others are free and fast
|
|
151
|
+
2. **Enable Streaming** - Get responses faster with `--stream`
|
|
152
|
+
3. **Save Sessions** - Your chats are auto-saved in `~/.recoder-code/`
|
|
153
|
+
4. **Keyboard Shortcuts** - Use `Ctrl+C` to stop, `Ctrl+D` to exit
|
|
154
|
+
5. **Debug Mode** - Set `RECODER_DEBUG=true` for detailed logs
|
|
319
155
|
|
|
320
|
-
|
|
321
|
-
- Keys stored securely in `~/.recoder-code/.env`
|
|
322
|
-
- Never logged or transmitted except to chosen AI providers
|
|
323
|
-
- Support for multiple provider keys
|
|
324
|
-
- Easy key rotation and management
|
|
156
|
+
## š¤ Contributing
|
|
325
157
|
|
|
326
|
-
|
|
327
|
-
- **Lite Mode**: No data leaves your machine except AI API calls
|
|
328
|
-
- **Full Platform**: Data stored locally by default
|
|
329
|
-
- **Collaboration**: Optional encrypted sharing
|
|
330
|
-
- **ML Training**: Models trained on your local hardware
|
|
158
|
+
We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
331
159
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
- Safe execution environments
|
|
336
|
-
- No telemetry unless explicitly enabled
|
|
160
|
+
```bash
|
|
161
|
+
# Clone the repo
|
|
162
|
+
git clone https://github.com/caelum0x/recoder-code.git
|
|
337
163
|
|
|
338
|
-
|
|
164
|
+
# Install dependencies
|
|
165
|
+
npm install
|
|
339
166
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
recoder-code help <command> # Command-specific help
|
|
343
|
-
recoder-code --help --advanced # Full platform help
|
|
344
|
-
recoder-code --info # System information
|
|
167
|
+
# Run locally
|
|
168
|
+
node cli/run.js "test query"
|
|
345
169
|
```
|
|
346
170
|
|
|
347
|
-
|
|
348
|
-
- **Website**: [recoder.xyz](https://recoder.xyz)
|
|
349
|
-
- **NPM Package**: [npmjs.com/package/recoder-code](https://www.npmjs.com/package/recoder-code)
|
|
350
|
-
- **GitHub**: [caelum0x/recoder-code](https://github.com/caelum0x/recoder-code) (Private Repository)
|
|
351
|
-
- **Issues**: Report bugs and request features
|
|
352
|
-
- **Discussions**: Share workflows and tips
|
|
353
|
-
- **Plugin Development**: Extend the platform
|
|
354
|
-
|
|
355
|
-
### Contributing
|
|
356
|
-
We welcome contributions! Areas where help is most needed:
|
|
357
|
-
- New AI model integrations
|
|
358
|
-
- Plugin development
|
|
359
|
-
- Documentation improvements
|
|
360
|
-
- Platform testing on different environments
|
|
361
|
-
|
|
362
|
-
## š Performance & Benchmarks
|
|
363
|
-
|
|
364
|
-
### Startup Performance
|
|
365
|
-
- **Lite Mode**: ~0.12s to first response
|
|
366
|
-
- **Full Platform**: ~2s with all services
|
|
367
|
-
- **Memory Usage**: 50MB (lite) to 500MB (full platform)
|
|
368
|
-
- **Model Switching**: Sub-second model changes
|
|
369
|
-
|
|
370
|
-
### Model Performance
|
|
371
|
-
- **Free Models**: DeepSeek R1 - competitive with GPT-4
|
|
372
|
-
- **Speed Optimization**: Automatic throughput prioritization
|
|
373
|
-
- **Cost Efficiency**: Free models handle 80% of tasks effectively
|
|
374
|
-
- **Quality**: Intelligent model selection maintains output quality
|
|
375
|
-
|
|
376
|
-
## šŗļø Roadmap
|
|
377
|
-
|
|
378
|
-
### Current (v2.0)
|
|
379
|
-
- ā
Lite mode with 30-second setup
|
|
380
|
-
- ā
Progressive feature discovery
|
|
381
|
-
- ā
Auto-service management
|
|
382
|
-
- ā
32+ AI models with smart selection
|
|
383
|
-
- ā
Docker integration
|
|
384
|
-
|
|
385
|
-
### Next Release (v2.1)
|
|
386
|
-
- š VS Code extension
|
|
387
|
-
- š Web UI for collaboration
|
|
388
|
-
- š Plugin marketplace launch
|
|
389
|
-
- š Advanced ML training workflows
|
|
390
|
-
- š Enterprise SSO integration
|
|
391
|
-
|
|
392
|
-
### Future (v3.0)
|
|
393
|
-
- š® Multi-language support
|
|
394
|
-
- š® AI-powered DevOps automation
|
|
395
|
-
- š® Custom model fine-tuning
|
|
396
|
-
- š® Advanced analytics and insights
|
|
397
|
-
|
|
398
|
-
## š License
|
|
399
|
-
|
|
400
|
-
MIT License - see [LICENSE.md](LICENSE.md) for details.
|
|
401
|
-
|
|
402
|
-
## š Acknowledgments
|
|
403
|
-
|
|
404
|
-
- **OpenRouter**: For providing access to multiple AI models
|
|
405
|
-
- **Anthropic**: For Claude models and inspiration from Claude Code
|
|
406
|
-
- **Docker**: For containerization technology
|
|
407
|
-
- **Node.js Community**: For the excellent ecosystem
|
|
408
|
-
- **Contributors**: Everyone who has helped improve the platform
|
|
171
|
+
## š License
|
|
409
172
|
|
|
410
|
-
|
|
173
|
+
MIT Ā© [Recoder Code Team](https://github.com/caelum0x)
|
|
411
174
|
|
|
412
|
-
|
|
175
|
+
## š Links
|
|
413
176
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
177
|
+
- [NPM Package](https://www.npmjs.com/package/recoder-code)
|
|
178
|
+
- [GitHub Repository](https://github.com/caelum0x/recoder-code)
|
|
179
|
+
- [OpenRouter (Get API Key)](https://openrouter.ai)
|
|
180
|
+
- [Report Issues](https://github.com/caelum0x/recoder-code/issues)
|
|
417
181
|
|
|
418
|
-
|
|
419
|
-
recoder-code
|
|
182
|
+
## ā Star Us!
|
|
420
183
|
|
|
421
|
-
|
|
422
|
-
|
|
184
|
+
If you find Recoder-Code useful, please star the repo on GitHub! It helps others discover the project.
|
|
185
|
+
|
|
186
|
+
---
|
|
423
187
|
|
|
424
|
-
|
|
188
|
+
**Made with ā¤ļø by developers, for developers**
|
package/cli/interactive.js
CHANGED
|
@@ -951,9 +951,16 @@ class InteractiveRecoderChat {
|
|
|
951
951
|
}
|
|
952
952
|
|
|
953
953
|
setupEventHandlers() {
|
|
954
|
+
// Event handlers already set up in setupReadlineHandlers()
|
|
955
|
+
// Just start the prompt
|
|
956
|
+
this.rl.prompt();
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
// Legacy method - kept for compatibility but logic moved to setupReadlineHandlers
|
|
960
|
+
setupEventHandlersOld() {
|
|
954
961
|
this.rl.on('line', async (input) => {
|
|
955
962
|
const trimmedInput = input.trim();
|
|
956
|
-
|
|
963
|
+
|
|
957
964
|
// Handle multi-line mode
|
|
958
965
|
if (this.multiLineMode) {
|
|
959
966
|
if (trimmedInput === '```') {
|
|
@@ -962,7 +969,7 @@ class InteractiveRecoderChat {
|
|
|
962
969
|
const fullInput = this.multiLineBuffer.join('\n');
|
|
963
970
|
this.multiLineBuffer = [];
|
|
964
971
|
this.updatePrompt();
|
|
965
|
-
|
|
972
|
+
|
|
966
973
|
if (fullInput.trim()) {
|
|
967
974
|
await this.processInput(fullInput);
|
|
968
975
|
}
|
package/cli/lite-mode.js
CHANGED
|
@@ -61,15 +61,18 @@ class LiteMode {
|
|
|
61
61
|
this.isLiteMode = true;
|
|
62
62
|
this.disabledFeatures = [
|
|
63
63
|
'ml-training',
|
|
64
|
-
'collaboration',
|
|
64
|
+
'collaboration',
|
|
65
65
|
'plugins',
|
|
66
66
|
'user-auth',
|
|
67
67
|
'project-management'
|
|
68
68
|
];
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
// Only show in debug mode
|
|
71
|
+
if (process.env.RECODER_DEBUG === 'true') {
|
|
72
|
+
console.log(chalk.cyan('š Running in Lite Mode - AI Chat Only'));
|
|
73
|
+
console.log(chalk.gray(' Advanced features disabled for simplicity'));
|
|
74
|
+
console.log(chalk.gray(' Run "recoder-code --services" to enable full platform\n'));
|
|
75
|
+
}
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
/**
|
package/cli/run.js
CHANGED
|
@@ -82,10 +82,17 @@ class RecoderCode {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
if (!this.apiKey) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
// Don't exit in interactive mode - let interactive.js handle the prompt
|
|
86
|
+
if (process.argv[1] && !process.argv[1].includes('interactive')) {
|
|
87
|
+
console.log(chalk.bold.yellow('\nš API Key Required'));
|
|
88
|
+
console.log(chalk.gray('ā'.repeat(50)));
|
|
89
|
+
console.log(chalk.white('Recoder-Code needs an OpenRouter API key to work.\n'));
|
|
90
|
+
console.log(chalk.cyan('š Get your FREE key at: ') + chalk.magenta('https://openrouter.ai/keys'));
|
|
91
|
+
console.log(chalk.gray('\nThen run setup:'));
|
|
92
|
+
console.log(chalk.white(' recoder-code --setup\n'));
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
return; // Return early to allow interactive mode to handle
|
|
89
96
|
}
|
|
90
97
|
|
|
91
98
|
// Initialize OpenAI client with OpenRouter configuration
|
|
@@ -147,8 +154,8 @@ class RecoderCode {
|
|
|
147
154
|
}
|
|
148
155
|
|
|
149
156
|
try {
|
|
150
|
-
// Only show
|
|
151
|
-
if (process.env.RECODER_DEBUG === 'true'
|
|
157
|
+
// Only show in debug mode
|
|
158
|
+
if (process.env.RECODER_DEBUG === 'true') {
|
|
152
159
|
console.log(chalk.gray('š Initializing enhanced AI CLI systems...'));
|
|
153
160
|
}
|
|
154
161
|
|
|
@@ -196,7 +203,9 @@ class RecoderCode {
|
|
|
196
203
|
// Setup system integrations
|
|
197
204
|
this.setupSystemIntegrations();
|
|
198
205
|
|
|
199
|
-
|
|
206
|
+
if (process.env.RECODER_DEBUG === 'true') {
|
|
207
|
+
console.log(chalk.green('ā
Enhanced systems ready'));
|
|
208
|
+
}
|
|
200
209
|
|
|
201
210
|
} catch (error) {
|
|
202
211
|
console.log(chalk.yellow(`ā ļø Some advanced features may be limited: ${error.message}`));
|
|
@@ -250,8 +259,8 @@ class RecoderCode {
|
|
|
250
259
|
const logFile = path.join(logsDir, `recoder-${new Date().toISOString().split('T')[0]}.jsonl`);
|
|
251
260
|
fs.appendFileSync(logFile, JSON.stringify(logEntry) + '\n');
|
|
252
261
|
|
|
253
|
-
// Log usage info if available
|
|
254
|
-
if (response?.usage) {
|
|
262
|
+
// Log usage info if available (only in debug mode)
|
|
263
|
+
if (response?.usage && process.env.RECODER_DEBUG === 'true') {
|
|
255
264
|
console.log(`š° Tokens used: ${response.usage.prompt_tokens} prompt + ${response.usage.completion_tokens} completion = ${response.usage.total_tokens} total`);
|
|
256
265
|
}
|
|
257
266
|
}
|
|
@@ -295,7 +304,9 @@ class RecoderCode {
|
|
|
295
304
|
}
|
|
296
305
|
|
|
297
306
|
try {
|
|
298
|
-
|
|
307
|
+
if (process.env.RECODER_DEBUG === 'true') {
|
|
308
|
+
console.log(`š Using model: ${payload.model} ${payload.models ? `with fallbacks: ${payload.models.slice(1).join(', ')}` : ''}`);
|
|
309
|
+
}
|
|
299
310
|
|
|
300
311
|
if (streamResponse && !tools) {
|
|
301
312
|
// Handle streaming response
|
package/cli/simple-setup.js
CHANGED
|
@@ -137,30 +137,30 @@ class SimpleSetup {
|
|
|
137
137
|
async testApiKey(apiKey) {
|
|
138
138
|
try {
|
|
139
139
|
const https = require('https');
|
|
140
|
-
|
|
140
|
+
|
|
141
141
|
return new Promise((resolve) => {
|
|
142
142
|
const options = {
|
|
143
|
-
hostname: '
|
|
143
|
+
hostname: 'openrouter.ai',
|
|
144
144
|
port: 443,
|
|
145
|
-
path: '/v1/models',
|
|
145
|
+
path: '/api/v1/models',
|
|
146
146
|
method: 'GET',
|
|
147
147
|
headers: {
|
|
148
148
|
'Authorization': `Bearer ${apiKey}`,
|
|
149
149
|
'Content-Type': 'application/json'
|
|
150
150
|
},
|
|
151
|
-
timeout:
|
|
151
|
+
timeout: 10000
|
|
152
152
|
};
|
|
153
|
-
|
|
153
|
+
|
|
154
154
|
const req = https.request(options, (res) => {
|
|
155
155
|
resolve(res.statusCode === 200);
|
|
156
156
|
});
|
|
157
|
-
|
|
157
|
+
|
|
158
158
|
req.on('error', () => resolve(false));
|
|
159
159
|
req.on('timeout', () => {
|
|
160
160
|
req.destroy();
|
|
161
161
|
resolve(false);
|
|
162
162
|
});
|
|
163
|
-
|
|
163
|
+
|
|
164
164
|
req.end();
|
|
165
165
|
});
|
|
166
166
|
} catch (error) {
|
package/cli/user-onboarding.js
CHANGED
|
@@ -74,6 +74,43 @@ class UserOnboarding {
|
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Test API key validity
|
|
79
|
+
*/
|
|
80
|
+
async testApiKey(apiKey) {
|
|
81
|
+
try {
|
|
82
|
+
const https = require('https');
|
|
83
|
+
|
|
84
|
+
return new Promise((resolve) => {
|
|
85
|
+
const options = {
|
|
86
|
+
hostname: 'openrouter.ai',
|
|
87
|
+
port: 443,
|
|
88
|
+
path: '/api/v1/models',
|
|
89
|
+
method: 'GET',
|
|
90
|
+
headers: {
|
|
91
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
92
|
+
'Content-Type': 'application/json'
|
|
93
|
+
},
|
|
94
|
+
timeout: 10000
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const req = https.request(options, (res) => {
|
|
98
|
+
resolve(res.statusCode === 200);
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
req.on('error', () => resolve(false));
|
|
102
|
+
req.on('timeout', () => {
|
|
103
|
+
req.destroy();
|
|
104
|
+
resolve(false);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
req.end();
|
|
108
|
+
});
|
|
109
|
+
} catch (error) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
77
114
|
/**
|
|
78
115
|
* Get API key from user
|
|
79
116
|
*/
|
|
@@ -81,12 +118,35 @@ class UserOnboarding {
|
|
|
81
118
|
console.log(chalk.yellow('\nš API Key Setup'));
|
|
82
119
|
console.log(chalk.white('To use Recoder Code, you need an API key from OpenRouter.'));
|
|
83
120
|
console.log(chalk.gray('š” Get your free API key at: https://openrouter.ai/keys\n'));
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
121
|
+
|
|
122
|
+
while (true) {
|
|
123
|
+
const apiKey = await new Promise((resolve) => {
|
|
124
|
+
this.rl.question(chalk.cyan('Enter your OpenRouter API key: '), (answer) => {
|
|
125
|
+
resolve(answer.trim());
|
|
126
|
+
});
|
|
88
127
|
});
|
|
89
|
-
|
|
128
|
+
|
|
129
|
+
if (!apiKey || apiKey.length === 0) {
|
|
130
|
+
console.log(chalk.red('ā API key cannot be empty\n'));
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (!apiKey.startsWith('sk-or-v1-')) {
|
|
135
|
+
console.log(chalk.red('ā Invalid format. OpenRouter keys start with "sk-or-v1-"\n'));
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Test the API key
|
|
140
|
+
console.log(chalk.gray('š Testing API key...'));
|
|
141
|
+
const isValid = await this.testApiKey(apiKey);
|
|
142
|
+
|
|
143
|
+
if (isValid) {
|
|
144
|
+
console.log(chalk.green('ā
API key is valid!\n'));
|
|
145
|
+
return apiKey;
|
|
146
|
+
} else {
|
|
147
|
+
console.log(chalk.red('ā API key test failed. Please check and try again.\n'));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
90
150
|
}
|
|
91
151
|
|
|
92
152
|
/**
|
package/config.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
require('
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const os = require('os');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
// Load from user config directory first, then fallback to project directory
|
|
6
|
+
const userEnvPath = path.join(os.homedir(), '.recoder-code', '.env');
|
|
7
|
+
const projectEnvPath = path.join(process.cwd(), '.env');
|
|
8
|
+
|
|
9
|
+
if (fs.existsSync(userEnvPath)) {
|
|
10
|
+
require('dotenv').config({ path: userEnvPath });
|
|
11
|
+
} else if (fs.existsSync(projectEnvPath)) {
|
|
12
|
+
require('dotenv').config({ path: projectEnvPath });
|
|
13
|
+
} else {
|
|
14
|
+
require('dotenv').config();
|
|
15
|
+
}
|
|
2
16
|
|
|
3
17
|
module.exports = {
|
|
4
18
|
maxTokens: 4096,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "recoder-code",
|
|
3
|
-
"version": "2.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.2.9",
|
|
4
|
+
"description": "š AI-powered development platform - Chat with 32+ models, build projects, automate workflows. Free models included!",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "node cli/run.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"todo": "node cli/todo-manager.js",
|
|
32
32
|
"todo:list": "node cli/todo-manager.js list",
|
|
33
33
|
"todo:stats": "node cli/todo-manager.js stats",
|
|
34
|
-
"production:check": "npm run
|
|
34
|
+
"production:check": "npm run lint && npm run typecheck && npm run security:audit",
|
|
35
35
|
"production:bundle": "npm run production:check && npm run build:production",
|
|
36
36
|
"production:deploy": "npm run production:bundle && npm publish --access public",
|
|
37
|
-
"postinstall": "node -e \"console.log('
|
|
37
|
+
"postinstall": "node -e \"console.log('\\\\nš Recoder-Code v2.2.9 installed!\\\\n\\\\nā
Quick Start: recoder-code\\\\nš” Get API key: https://openrouter.ai\\\\n')\"",
|
|
38
38
|
"prepare": "echo 'Package prepared for distribution'",
|
|
39
39
|
"prepublishOnly": "npm run prepare && npm run security:audit"
|
|
40
40
|
},
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"@octokit/rest": "^22.0.0",
|
|
46
46
|
"axios": "^1.12.2",
|
|
47
47
|
"chai": "^6.0.1",
|
|
48
|
-
"chalk": "^
|
|
48
|
+
"chalk": "^4.1.2",
|
|
49
49
|
"chokidar": "^4.0.3",
|
|
50
50
|
"commander": "^14.0.1",
|
|
51
51
|
"dotenv": "^17.2.2",
|
|
52
|
-
"inquirer": "^
|
|
52
|
+
"inquirer": "^9.3.8",
|
|
53
53
|
"jsdom": "^27.0.0",
|
|
54
54
|
"openai": "^5.21.0",
|
|
55
55
|
"openrouter-client": "^1.6.0",
|
package/setup.js
CHANGED
|
@@ -481,14 +481,15 @@ class EnhancedSetupWizard {
|
|
|
481
481
|
process.stdout.write(question);
|
|
482
482
|
process.stdin.setRawMode(true);
|
|
483
483
|
process.stdin.resume();
|
|
484
|
-
|
|
484
|
+
|
|
485
485
|
let password = '';
|
|
486
|
-
|
|
486
|
+
const dataHandler = (char) => {
|
|
487
487
|
char = char.toString();
|
|
488
|
-
|
|
488
|
+
|
|
489
489
|
if (char === '\r' || char === '\n') {
|
|
490
490
|
process.stdin.setRawMode(false);
|
|
491
491
|
process.stdin.pause();
|
|
492
|
+
process.stdin.removeListener('data', dataHandler);
|
|
492
493
|
process.stdout.write('\n');
|
|
493
494
|
resolve(password);
|
|
494
495
|
} else if (char === '\u0003') {
|
|
@@ -502,7 +503,8 @@ class EnhancedSetupWizard {
|
|
|
502
503
|
password += char;
|
|
503
504
|
process.stdout.write('*');
|
|
504
505
|
}
|
|
505
|
-
}
|
|
506
|
+
};
|
|
507
|
+
process.stdin.on('data', dataHandler);
|
|
506
508
|
} else {
|
|
507
509
|
this.rl.question(question, resolve);
|
|
508
510
|
}
|