claude-dev-cli 0.13.0__tar.gz → 0.16.0__tar.gz
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.
Potentially problematic release.
This version of claude-dev-cli might be problematic. Click here for more details.
- {claude_dev_cli-0.13.0/src/claude_dev_cli.egg-info → claude_dev_cli-0.16.0}/PKG-INFO +297 -15
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/README.md +286 -14
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/pyproject.toml +15 -1
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/__init__.py +1 -1
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/cli.py +234 -16
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/config.py +95 -9
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/core.py +48 -53
- claude_dev_cli-0.16.0/src/claude_dev_cli/multi_file_handler.py +732 -0
- claude_dev_cli-0.16.0/src/claude_dev_cli/providers/__init__.py +28 -0
- claude_dev_cli-0.16.0/src/claude_dev_cli/providers/anthropic.py +216 -0
- claude_dev_cli-0.16.0/src/claude_dev_cli/providers/base.py +168 -0
- claude_dev_cli-0.16.0/src/claude_dev_cli/providers/factory.py +114 -0
- claude_dev_cli-0.16.0/src/claude_dev_cli/providers/ollama.py +283 -0
- claude_dev_cli-0.16.0/src/claude_dev_cli/providers/openai.py +268 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0/src/claude_dev_cli.egg-info}/PKG-INFO +297 -15
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli.egg-info/SOURCES.txt +6 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli.egg-info/requires.txt +14 -0
- claude_dev_cli-0.16.0/tests/test_core.py +188 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_multi_file_handler.py +193 -0
- claude_dev_cli-0.13.0/src/claude_dev_cli/multi_file_handler.py +0 -348
- claude_dev_cli-0.13.0/tests/test_core.py +0 -241
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/LICENSE +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/MANIFEST.in +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/setup.cfg +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/commands.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/context.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/history.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/input_sources.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/path_utils.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/plugins/__init__.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/plugins/base.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/plugins/diff_editor/__init__.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/plugins/diff_editor/plugin.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/plugins/diff_editor/viewer.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/secure_storage.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/template_manager.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/templates.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/toon_utils.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/usage.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/warp_integration.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli/workflows.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli.egg-info/dependency_links.txt +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli.egg-info/entry_points.txt +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/src/claude_dev_cli.egg-info/top_level.txt +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_cli.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_commands.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_config.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_context.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_diff_editor.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_history.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_input_sources.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_path_utils.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_secure_storage.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_template_manager.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_toon_utils.py +0 -0
- {claude_dev_cli-0.13.0 → claude_dev_cli-0.16.0}/tests/test_usage.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-dev-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.0
|
|
4
4
|
Summary: A powerful CLI tool for developers using Claude AI with multi-API routing, test generation, code review, and usage tracking
|
|
5
5
|
Author-email: Julio <thinmanj@users.noreply.github.com>
|
|
6
6
|
License: MIT
|
|
@@ -29,6 +29,7 @@ Requires-Dist: pydantic>=2.0.0
|
|
|
29
29
|
Requires-Dist: keyring>=24.0.0
|
|
30
30
|
Requires-Dist: cryptography>=41.0.0
|
|
31
31
|
Requires-Dist: pyyaml>=6.0.0
|
|
32
|
+
Requires-Dist: unidiff>=0.7.0
|
|
32
33
|
Provides-Extra: toon
|
|
33
34
|
Requires-Dist: toon-format>=0.1.0; extra == "toon"
|
|
34
35
|
Provides-Extra: plugins
|
|
@@ -37,6 +38,15 @@ Provides-Extra: generation
|
|
|
37
38
|
Requires-Dist: pypdf>=3.0.0; extra == "generation"
|
|
38
39
|
Requires-Dist: requests>=2.28.0; extra == "generation"
|
|
39
40
|
Requires-Dist: beautifulsoup4>=4.0.0; extra == "generation"
|
|
41
|
+
Provides-Extra: openai
|
|
42
|
+
Requires-Dist: openai>=1.0.0; extra == "openai"
|
|
43
|
+
Provides-Extra: ollama
|
|
44
|
+
Requires-Dist: requests>=2.28.0; extra == "ollama"
|
|
45
|
+
Provides-Extra: local
|
|
46
|
+
Requires-Dist: requests>=2.28.0; extra == "local"
|
|
47
|
+
Provides-Extra: all-providers
|
|
48
|
+
Requires-Dist: openai>=1.0.0; extra == "all-providers"
|
|
49
|
+
Requires-Dist: requests>=2.28.0; extra == "all-providers"
|
|
40
50
|
Provides-Extra: dev
|
|
41
51
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
42
52
|
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
@@ -62,9 +72,25 @@ A powerful command-line tool for developers using Claude AI with multi-API routi
|
|
|
62
72
|
|
|
63
73
|
## Features
|
|
64
74
|
|
|
75
|
+
### 🌐 Multi-Provider AI Support (v0.14.0+)
|
|
76
|
+
- **Anthropic (Claude)**: GPT-4 class models with 200k context
|
|
77
|
+
- Haiku, Sonnet, Opus - full model family
|
|
78
|
+
- Industry-leading context window
|
|
79
|
+
- **OpenAI (GPT)**: ChatGPT and GPT-4 models (v0.15.0+)
|
|
80
|
+
- GPT-3.5 Turbo, GPT-4, GPT-4 Turbo
|
|
81
|
+
- Azure OpenAI support
|
|
82
|
+
- Install: `pip install 'claude-dev-cli[openai]'`
|
|
83
|
+
- **Ollama (Local)**: Zero-cost local inference (v0.16.0+)
|
|
84
|
+
- Mistral, Mixtral, Code Llama, DeepSeek Coder
|
|
85
|
+
- 100% free, private, offline
|
|
86
|
+
- Install: `pip install 'claude-dev-cli[ollama]'`
|
|
87
|
+
- **Provider Abstraction**: Unified interface across all providers
|
|
88
|
+
- **Cost Tracking**: Per-provider usage and cost monitoring
|
|
89
|
+
- **Graceful Fallback**: Works with any combination of providers
|
|
90
|
+
|
|
65
91
|
### 🔑 Multi-API Key Management
|
|
66
92
|
- **Secure Storage**: API keys stored in system keyring (macOS Keychain, Linux Secret Service, Windows Credential Locker)
|
|
67
|
-
- Route tasks to different
|
|
93
|
+
- Route tasks to different API keys/providers (personal, client, enterprise, local)
|
|
68
94
|
- Automatic API selection based on project configuration
|
|
69
95
|
- Automatic migration from plaintext to secure storage
|
|
70
96
|
|
|
@@ -172,34 +198,118 @@ brew install thinmanj/tap/claude-dev-cli
|
|
|
172
198
|
|
|
173
199
|
### Via pip
|
|
174
200
|
|
|
201
|
+
#### Basic Installation
|
|
202
|
+
|
|
203
|
+
Core dependencies only (includes unidiff for diff parsing):
|
|
204
|
+
|
|
175
205
|
```bash
|
|
176
|
-
# Basic installation
|
|
177
206
|
pip install claude-dev-cli
|
|
207
|
+
```
|
|
178
208
|
|
|
179
|
-
|
|
180
|
-
|
|
209
|
+
Core dependencies:
|
|
210
|
+
- `anthropic>=0.18.0` - Claude API client
|
|
211
|
+
- `click>=8.1.0` - CLI framework
|
|
212
|
+
- `rich>=13.0.0` - Terminal formatting
|
|
213
|
+
- `pydantic>=2.0.0` - Data validation
|
|
214
|
+
- `keyring>=24.0.0` - Secure credential storage
|
|
215
|
+
- `cryptography>=41.0.0` - Encryption for secure storage
|
|
216
|
+
- `pyyaml>=6.0.0` - YAML configuration support
|
|
217
|
+
- `unidiff>=0.7.0` - Production-grade diff parsing
|
|
181
218
|
|
|
182
|
-
|
|
183
|
-
pip install claude-dev-cli[toon]
|
|
219
|
+
#### With Optional Features
|
|
184
220
|
|
|
185
|
-
|
|
186
|
-
|
|
221
|
+
**Multi-Provider Support**:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# OpenAI (GPT) support
|
|
225
|
+
pip install 'claude-dev-cli[openai]'
|
|
226
|
+
|
|
227
|
+
# Ollama (local/free) support
|
|
228
|
+
pip install 'claude-dev-cli[ollama]'
|
|
229
|
+
|
|
230
|
+
# All providers
|
|
231
|
+
pip install 'claude-dev-cli[all-providers]'
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Code Generation Support** (PDF & URL input):
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
pip install 'claude-dev-cli[generation]'
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Adds:
|
|
241
|
+
- `pypdf>=3.0.0` - PDF text extraction
|
|
242
|
+
- `requests>=2.28.0` - HTTP client for URL fetching
|
|
243
|
+
- `beautifulsoup4>=4.0.0` - HTML parsing
|
|
244
|
+
|
|
245
|
+
**TOON Format Support** (30-60% token reduction):
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
pip install 'claude-dev-cli[toon]'
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Adds:
|
|
252
|
+
- `toon-format>=0.1.0` - TOON encoding/decoding
|
|
253
|
+
|
|
254
|
+
**Syntax Highlighting** (enhanced diff display):
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
pip install 'claude-dev-cli[plugins]'
|
|
187
258
|
```
|
|
188
259
|
|
|
260
|
+
Adds:
|
|
261
|
+
- `pygments>=2.0.0` - Syntax highlighting for diffs
|
|
262
|
+
|
|
263
|
+
**All Optional Features**:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
pip install 'claude-dev-cli[generation,toon,plugins]'
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Development Installation** (for contributors):
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
pip install 'claude-dev-cli[dev]'
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Includes all optional features plus:
|
|
276
|
+
- `pytest>=7.0.0` - Testing framework
|
|
277
|
+
- `black>=23.0.0` - Code formatting
|
|
278
|
+
- `ruff>=0.1.0` - Linting
|
|
279
|
+
- `mypy>=1.0.0` - Type checking
|
|
280
|
+
|
|
189
281
|
### Via pipx (Recommended for CLI tools)
|
|
190
282
|
|
|
283
|
+
pipx provides isolated installations without affecting your system Python:
|
|
284
|
+
|
|
191
285
|
```bash
|
|
192
|
-
#
|
|
286
|
+
# Basic installation
|
|
193
287
|
pipx install claude-dev-cli
|
|
194
288
|
|
|
195
|
-
# With code generation support
|
|
196
|
-
pipx install claude-dev-cli[generation]
|
|
289
|
+
# With code generation support (PDF & URL)
|
|
290
|
+
pipx install 'claude-dev-cli[generation]'
|
|
291
|
+
|
|
292
|
+
# With TOON support (token reduction)
|
|
293
|
+
pipx install 'claude-dev-cli[toon]'
|
|
197
294
|
|
|
198
|
-
# With
|
|
199
|
-
pipx install claude-dev-cli[
|
|
295
|
+
# With syntax highlighting
|
|
296
|
+
pipx install 'claude-dev-cli[plugins]'
|
|
200
297
|
|
|
201
298
|
# With all optional features
|
|
202
|
-
pipx install claude-dev-cli[generation,toon]
|
|
299
|
+
pipx install 'claude-dev-cli[generation,toon,plugins]'
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### Upgrade Existing Installation
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
# Upgrade via pip
|
|
306
|
+
pip install --upgrade claude-dev-cli
|
|
307
|
+
|
|
308
|
+
# Upgrade via pipx
|
|
309
|
+
pipx upgrade claude-dev-cli
|
|
310
|
+
|
|
311
|
+
# Upgrade via Homebrew
|
|
312
|
+
brew upgrade claude-dev-cli
|
|
203
313
|
```
|
|
204
314
|
|
|
205
315
|
## Quick Start
|
|
@@ -223,6 +333,78 @@ cdc config list
|
|
|
223
333
|
cdc config migrate-keys
|
|
224
334
|
```
|
|
225
335
|
|
|
336
|
+
### 1.1 Setup Ollama (Local/Free Alternative) - v0.16.0+
|
|
337
|
+
|
|
338
|
+
Run AI models locally with **zero cost** and full privacy using Ollama:
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
# Install Ollama (one-time setup)
|
|
342
|
+
# macOS/Linux: Download from https://ollama.ai
|
|
343
|
+
# Or via Homebrew: brew install ollama
|
|
344
|
+
|
|
345
|
+
# Start Ollama server
|
|
346
|
+
ollama serve # Run in background or separate terminal
|
|
347
|
+
|
|
348
|
+
# Install Ollama support
|
|
349
|
+
pip install 'claude-dev-cli[ollama]'
|
|
350
|
+
|
|
351
|
+
# Configure local provider (no API key needed!)
|
|
352
|
+
cdc config add ollama local --default
|
|
353
|
+
# ℹ️ No API key needed for local provider
|
|
354
|
+
|
|
355
|
+
# Pull models (one-time per model)
|
|
356
|
+
cdc ollama pull mistral # Fast, general-purpose (7B)
|
|
357
|
+
cdc ollama pull codellama # Code-specialized (7B-34B)
|
|
358
|
+
cdc ollama pull mixtral # Powerful reasoning (8x7B)
|
|
359
|
+
|
|
360
|
+
# List available models
|
|
361
|
+
cdc ollama list
|
|
362
|
+
# ┌──────────────┬─────────────────┬─────────┬──────────┬─────────────────┐
|
|
363
|
+
# │ Model │ Display Name │ Context │ Cost │ Capabilities │
|
|
364
|
+
# │ mistral │ Mistral 7B │ 8,192 │ FREE │ chat, code │
|
|
365
|
+
# │ codellama │ Code Llama │ 16,384 │ FREE │ code, chat │
|
|
366
|
+
# │ mixtral │ Mixtral 8x7B │ 32,768 │ FREE │ chat, analysis │
|
|
367
|
+
# └──────────────┴─────────────────┴─────────┴──────────┴─────────────────┘
|
|
368
|
+
|
|
369
|
+
# Show model details
|
|
370
|
+
cdc ollama show mistral
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
**Benefits of Local Models:**
|
|
374
|
+
- ✅ **Zero Cost**: No API fees, unlimited usage
|
|
375
|
+
- ✅ **Privacy**: Data never leaves your machine
|
|
376
|
+
- ✅ **Offline**: Works without internet connection
|
|
377
|
+
- ✅ **Fast**: No API latency (after model loads)
|
|
378
|
+
- ✅ **Control**: Full control over models and data
|
|
379
|
+
|
|
380
|
+
**Considerations:**
|
|
381
|
+
- ⚠️ Requires decent hardware (8GB+ RAM, GPU recommended)
|
|
382
|
+
- ⚠️ Models need disk space (4-40GB per model)
|
|
383
|
+
- ⚠️ Quality may be lower than GPT-4/Claude Opus
|
|
384
|
+
- ⚠️ Initial model download can take time
|
|
385
|
+
|
|
386
|
+
**Use Local Models:**
|
|
387
|
+
```bash
|
|
388
|
+
# Use with any command - completely FREE!
|
|
389
|
+
cdc ask "explain async/await"
|
|
390
|
+
cdc ask -m fast-local "quick question"
|
|
391
|
+
cdc generate tests -m code-local mymodule.py
|
|
392
|
+
cdc review -m smart-local src/
|
|
393
|
+
|
|
394
|
+
# Use specific model directly
|
|
395
|
+
cdc ask -m mistral "your question"
|
|
396
|
+
cdc ask -m codellama "write a function to parse JSON"
|
|
397
|
+
|
|
398
|
+
# Remote Ollama server
|
|
399
|
+
cdc config add ollama remote --base-url http://server:11434
|
|
400
|
+
cdc ask -a remote "question"
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**Available Model Profiles:**
|
|
404
|
+
- `fast-local`: mistral (8k context, fast inference)
|
|
405
|
+
- `smart-local`: mixtral (32k context, powerful)
|
|
406
|
+
- `code-local`: codellama (16k context, code-focused)
|
|
407
|
+
|
|
226
408
|
### 2. Basic Usage
|
|
227
409
|
|
|
228
410
|
```bash
|
|
@@ -315,8 +497,108 @@ cdc generate feature --file spec.md --yes # Apply without confirmation
|
|
|
315
497
|
|
|
316
498
|
# Interactive feature implementation
|
|
317
499
|
cdc generate feature --description "Add logging" src/ --interactive
|
|
500
|
+
|
|
501
|
+
# Hunk-by-hunk approval (like git add -p) - NEW in v0.13.1
|
|
502
|
+
cdc generate feature -f spec.md
|
|
503
|
+
# At confirmation prompt, type 'patch' to review changes hunk-by-hunk
|
|
504
|
+
# Options: y (yes), n (no), s (skip file), q (quit), help
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
### 3.1 Interactive Diff Approval (v0.13.1+)
|
|
508
|
+
|
|
509
|
+
When applying file modifications, you can review and approve changes hunk-by-hunk, similar to `git add -p`:
|
|
510
|
+
|
|
511
|
+
```bash
|
|
512
|
+
# After generating feature/refactor changes:
|
|
513
|
+
cdc generate feature -f spec.md
|
|
514
|
+
|
|
515
|
+
# At the confirmation prompt:
|
|
516
|
+
Continue? (Y/n/preview/patch/help) patch
|
|
517
|
+
|
|
518
|
+
# For each file:
|
|
519
|
+
File: src/main.py
|
|
520
|
+
Modify file (3 hunk(s))
|
|
521
|
+
|
|
522
|
+
Hunk 1/3:
|
|
523
|
+
[Shows diff with syntax highlighting]
|
|
524
|
+
@@ -10,3 +10,5 @@
|
|
525
|
+
def main():
|
|
526
|
+
- print("old")
|
|
527
|
+
+ print("new")
|
|
528
|
+
+ logging.info("Started")
|
|
529
|
+
|
|
530
|
+
Apply this hunk? (y/n/s=skip file/q=quit/help) y # Approve this hunk
|
|
531
|
+
|
|
532
|
+
Hunk 2/3:
|
|
533
|
+
[Shows next diff]
|
|
534
|
+
Apply this hunk? (y/n/s=skip file/q=quit/help) n # Skip this hunk
|
|
535
|
+
|
|
536
|
+
Hunk 3/3:
|
|
537
|
+
[Shows final diff]
|
|
538
|
+
Apply this hunk? (y/n/s=skip file/q=quit/help) s # Skip remaining in file
|
|
539
|
+
|
|
540
|
+
# File operations options:
|
|
541
|
+
Create this file? (y/n/s=skip/q=quit) y # For new files
|
|
542
|
+
Delete this file? (y/n/s=skip/q=quit) n # For file deletions
|
|
318
543
|
```
|
|
319
544
|
|
|
545
|
+
**Options:**
|
|
546
|
+
- `y, yes` - Apply this hunk/file
|
|
547
|
+
- `n, no` - Skip this hunk (keeps original)
|
|
548
|
+
- `s, skip` - Skip remaining hunks in current file
|
|
549
|
+
- `q, quit` - Stop reviewing and apply approved changes so far
|
|
550
|
+
- `edit` - Open files in $EDITOR before applying
|
|
551
|
+
- `save` - Save to custom location
|
|
552
|
+
- `help` - Show help message
|
|
553
|
+
|
|
554
|
+
**Benefits:**
|
|
555
|
+
- Fine-grained control over changes
|
|
556
|
+
- Keep original code for some hunks while applying others
|
|
557
|
+
- Syntax-highlighted diffs for easy review
|
|
558
|
+
- Edit files before applying for manual tweaks
|
|
559
|
+
- Save to custom location without -o flag
|
|
560
|
+
- Safe: only approved hunks are written
|
|
561
|
+
|
|
562
|
+
### 3.2 Edit and Save Options (v0.13.2+)
|
|
563
|
+
|
|
564
|
+
Before applying changes, you can edit files or save to custom locations:
|
|
565
|
+
|
|
566
|
+
#### Edit in $EDITOR
|
|
567
|
+
```bash
|
|
568
|
+
cdc generate feature -f spec.md
|
|
569
|
+
|
|
570
|
+
# At confirmation:
|
|
571
|
+
Continue? (Y/n/preview/patch/edit/save/help) edit
|
|
572
|
+
|
|
573
|
+
# Opens each file in your $EDITOR (vi, nano, code, etc.)
|
|
574
|
+
# Make manual adjustments, save and close
|
|
575
|
+
# Changes are applied after editing
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
#### Save to Custom Location
|
|
579
|
+
```bash
|
|
580
|
+
cdc generate code -d "REST API" -o /tmp/output
|
|
581
|
+
|
|
582
|
+
# At confirmation:
|
|
583
|
+
Continue? (Y/n/preview/patch/edit/save/help) save
|
|
584
|
+
|
|
585
|
+
# Single file:
|
|
586
|
+
Filename: my-custom-name.py # Save to custom filename
|
|
587
|
+
|
|
588
|
+
# Multiple files:
|
|
589
|
+
Directory: /path/to/output/ # Save entire project elsewhere
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
**Use Cases:**
|
|
593
|
+
- **Edit**: Make manual tweaks before applying (fix formatting, adjust logic)
|
|
594
|
+
- **Save**: Try changes elsewhere before applying to project
|
|
595
|
+
- **Edit + Preview**: Review, edit, then apply with confidence
|
|
596
|
+
- **Save for later**: Generate code, save it, review offline, apply manually
|
|
597
|
+
|
|
598
|
+
**Environment Variables:**
|
|
599
|
+
- `$EDITOR`: Your preferred editor (e.g., `export EDITOR=nano`)
|
|
600
|
+
- Defaults to `vi` if `$EDITOR` not set
|
|
601
|
+
|
|
320
602
|
### 4. Developer Commands
|
|
321
603
|
|
|
322
604
|
```bash
|