claude-dev-cli 0.1.0__tar.gz → 0.2.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.1.0/src/claude_dev_cli.egg-info → claude_dev_cli-0.2.0}/PKG-INFO +41 -1
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/README.md +37 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/pyproject.toml +5 -1
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli/__init__.py +1 -1
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli/cli.py +120 -0
- claude_dev_cli-0.2.0/src/claude_dev_cli/toon_utils.py +117 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0/src/claude_dev_cli.egg-info}/PKG-INFO +41 -1
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli.egg-info/SOURCES.txt +1 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli.egg-info/requires.txt +4 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/LICENSE +0 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/MANIFEST.in +0 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/setup.cfg +0 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli/commands.py +0 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli/config.py +0 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli/core.py +0 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli/templates.py +0 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli/usage.py +0 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli.egg-info/dependency_links.txt +0 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli.egg-info/entry_points.txt +0 -0
- {claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-dev-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.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
|
|
@@ -26,11 +26,14 @@ Requires-Dist: anthropic>=0.18.0
|
|
|
26
26
|
Requires-Dist: click>=8.1.0
|
|
27
27
|
Requires-Dist: rich>=13.0.0
|
|
28
28
|
Requires-Dist: pydantic>=2.0.0
|
|
29
|
+
Provides-Extra: toon
|
|
30
|
+
Requires-Dist: toon-format>=0.9.0; extra == "toon"
|
|
29
31
|
Provides-Extra: dev
|
|
30
32
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
31
33
|
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
32
34
|
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
33
35
|
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
36
|
+
Requires-Dist: toon-format>=0.9.0; extra == "dev"
|
|
34
37
|
Dynamic: license-file
|
|
35
38
|
|
|
36
39
|
# Claude Dev CLI
|
|
@@ -63,12 +66,27 @@ A powerful command-line tool for developers using Claude AI with multi-API routi
|
|
|
63
66
|
- **Interactive**: Chat mode with conversation history
|
|
64
67
|
- **Streaming**: Real-time responses
|
|
65
68
|
|
|
69
|
+
### 🎒 TOON Format Support (Optional)
|
|
70
|
+
- **Token Reduction**: 30-60% fewer tokens than JSON
|
|
71
|
+
- **Cost Savings**: Reduce API costs significantly
|
|
72
|
+
- **Format Conversion**: JSON ↔ TOON with CLI tools
|
|
73
|
+
- **Auto-fallback**: Works without TOON installed
|
|
74
|
+
|
|
66
75
|
## Installation
|
|
67
76
|
|
|
77
|
+
### Basic Installation
|
|
78
|
+
|
|
68
79
|
```bash
|
|
69
80
|
pip install claude-dev-cli
|
|
70
81
|
```
|
|
71
82
|
|
|
83
|
+
### With TOON Support (Recommended for Cost Savings)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Install with TOON format support for 30-60% token reduction
|
|
87
|
+
pip install claude-dev-cli[toon]
|
|
88
|
+
```
|
|
89
|
+
|
|
72
90
|
## Quick Start
|
|
73
91
|
|
|
74
92
|
### 1. Set Up API Keys
|
|
@@ -141,6 +159,28 @@ cdc usage --days 7
|
|
|
141
159
|
cdc usage --api client
|
|
142
160
|
```
|
|
143
161
|
|
|
162
|
+
### 5. TOON Format (Optional - Reduces Tokens by 30-60%)
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Check if TOON is installed
|
|
166
|
+
cdc toon info
|
|
167
|
+
|
|
168
|
+
# Convert JSON to TOON
|
|
169
|
+
echo '{"users": [{"id": 1, "name": "Alice"}]}' | cdc toon encode
|
|
170
|
+
# Output:
|
|
171
|
+
# users[1]{id,name}:
|
|
172
|
+
# 1,Alice
|
|
173
|
+
|
|
174
|
+
# Convert file
|
|
175
|
+
cdc toon encode data.json -o data.toon
|
|
176
|
+
|
|
177
|
+
# Convert TOON back to JSON
|
|
178
|
+
cdc toon decode data.toon -o data.json
|
|
179
|
+
|
|
180
|
+
# Use in workflows
|
|
181
|
+
cat large_data.json | cdc toon encode | cdc ask "analyze this data"
|
|
182
|
+
```
|
|
183
|
+
|
|
144
184
|
## Configuration
|
|
145
185
|
|
|
146
186
|
### Global Configuration
|
|
@@ -28,12 +28,27 @@ A powerful command-line tool for developers using Claude AI with multi-API routi
|
|
|
28
28
|
- **Interactive**: Chat mode with conversation history
|
|
29
29
|
- **Streaming**: Real-time responses
|
|
30
30
|
|
|
31
|
+
### 🎒 TOON Format Support (Optional)
|
|
32
|
+
- **Token Reduction**: 30-60% fewer tokens than JSON
|
|
33
|
+
- **Cost Savings**: Reduce API costs significantly
|
|
34
|
+
- **Format Conversion**: JSON ↔ TOON with CLI tools
|
|
35
|
+
- **Auto-fallback**: Works without TOON installed
|
|
36
|
+
|
|
31
37
|
## Installation
|
|
32
38
|
|
|
39
|
+
### Basic Installation
|
|
40
|
+
|
|
33
41
|
```bash
|
|
34
42
|
pip install claude-dev-cli
|
|
35
43
|
```
|
|
36
44
|
|
|
45
|
+
### With TOON Support (Recommended for Cost Savings)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Install with TOON format support for 30-60% token reduction
|
|
49
|
+
pip install claude-dev-cli[toon]
|
|
50
|
+
```
|
|
51
|
+
|
|
37
52
|
## Quick Start
|
|
38
53
|
|
|
39
54
|
### 1. Set Up API Keys
|
|
@@ -106,6 +121,28 @@ cdc usage --days 7
|
|
|
106
121
|
cdc usage --api client
|
|
107
122
|
```
|
|
108
123
|
|
|
124
|
+
### 5. TOON Format (Optional - Reduces Tokens by 30-60%)
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Check if TOON is installed
|
|
128
|
+
cdc toon info
|
|
129
|
+
|
|
130
|
+
# Convert JSON to TOON
|
|
131
|
+
echo '{"users": [{"id": 1, "name": "Alice"}]}' | cdc toon encode
|
|
132
|
+
# Output:
|
|
133
|
+
# users[1]{id,name}:
|
|
134
|
+
# 1,Alice
|
|
135
|
+
|
|
136
|
+
# Convert file
|
|
137
|
+
cdc toon encode data.json -o data.toon
|
|
138
|
+
|
|
139
|
+
# Convert TOON back to JSON
|
|
140
|
+
cdc toon decode data.toon -o data.json
|
|
141
|
+
|
|
142
|
+
# Use in workflows
|
|
143
|
+
cat large_data.json | cdc toon encode | cdc ask "analyze this data"
|
|
144
|
+
```
|
|
145
|
+
|
|
109
146
|
## Configuration
|
|
110
147
|
|
|
111
148
|
### Global Configuration
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "claude-dev-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.2.0"
|
|
8
8
|
description = "A powerful CLI tool for developers using Claude AI with multi-API routing, test generation, code review, and usage tracking"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -35,11 +35,15 @@ dependencies = [
|
|
|
35
35
|
]
|
|
36
36
|
|
|
37
37
|
[project.optional-dependencies]
|
|
38
|
+
toon = [
|
|
39
|
+
"toon-format>=0.9.0",
|
|
40
|
+
]
|
|
38
41
|
dev = [
|
|
39
42
|
"pytest>=7.0.0",
|
|
40
43
|
"black>=23.0.0",
|
|
41
44
|
"ruff>=0.1.0",
|
|
42
45
|
"mypy>=1.0.0",
|
|
46
|
+
"toon-format>=0.9.0",
|
|
43
47
|
]
|
|
44
48
|
|
|
45
49
|
[project.urls]
|
|
@@ -21,6 +21,7 @@ from claude_dev_cli.commands import (
|
|
|
21
21
|
git_commit_message,
|
|
22
22
|
)
|
|
23
23
|
from claude_dev_cli.usage import UsageTracker
|
|
24
|
+
from claude_dev_cli import toon_utils
|
|
24
25
|
|
|
25
26
|
console = Console()
|
|
26
27
|
|
|
@@ -394,5 +395,124 @@ def usage(ctx: click.Context, days: Optional[int], api: Optional[str]) -> None:
|
|
|
394
395
|
sys.exit(1)
|
|
395
396
|
|
|
396
397
|
|
|
398
|
+
@main.group()
|
|
399
|
+
def toon() -> None:
|
|
400
|
+
"""TOON format conversion tools."""
|
|
401
|
+
pass
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
@toon.command('encode')
|
|
405
|
+
@click.argument('input_file', type=click.Path(exists=True), required=False)
|
|
406
|
+
@click.option('-o', '--output', type=click.Path(), help='Output file')
|
|
407
|
+
@click.pass_context
|
|
408
|
+
def toon_encode(ctx: click.Context, input_file: Optional[str], output: Optional[str]) -> None:
|
|
409
|
+
"""Convert JSON to TOON format."""
|
|
410
|
+
console = ctx.obj['console']
|
|
411
|
+
|
|
412
|
+
if not toon_utils.is_toon_available():
|
|
413
|
+
console.print("[red]TOON support not installed.[/red]")
|
|
414
|
+
console.print("Install with: [cyan]pip install claude-dev-cli[toon][/cyan]")
|
|
415
|
+
sys.exit(1)
|
|
416
|
+
|
|
417
|
+
try:
|
|
418
|
+
import json
|
|
419
|
+
|
|
420
|
+
# Read input
|
|
421
|
+
if input_file:
|
|
422
|
+
with open(input_file, 'r') as f:
|
|
423
|
+
data = json.load(f)
|
|
424
|
+
elif not sys.stdin.isatty():
|
|
425
|
+
data = json.load(sys.stdin)
|
|
426
|
+
else:
|
|
427
|
+
console.print("[red]Error: No input provided[/red]")
|
|
428
|
+
console.print("Usage: cdc toon encode [FILE] or pipe JSON via stdin")
|
|
429
|
+
sys.exit(1)
|
|
430
|
+
|
|
431
|
+
# Convert to TOON
|
|
432
|
+
toon_str = toon_utils.to_toon(data)
|
|
433
|
+
|
|
434
|
+
# Output
|
|
435
|
+
if output:
|
|
436
|
+
with open(output, 'w') as f:
|
|
437
|
+
f.write(toon_str)
|
|
438
|
+
console.print(f"[green]✓[/green] Converted to TOON: {output}")
|
|
439
|
+
else:
|
|
440
|
+
console.print(toon_str)
|
|
441
|
+
|
|
442
|
+
except Exception as e:
|
|
443
|
+
console.print(f"[red]Error: {e}[/red]")
|
|
444
|
+
sys.exit(1)
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
@toon.command('decode')
|
|
448
|
+
@click.argument('input_file', type=click.Path(exists=True), required=False)
|
|
449
|
+
@click.option('-o', '--output', type=click.Path(), help='Output file')
|
|
450
|
+
@click.pass_context
|
|
451
|
+
def toon_decode(ctx: click.Context, input_file: Optional[str], output: Optional[str]) -> None:
|
|
452
|
+
"""Convert TOON format to JSON."""
|
|
453
|
+
console = ctx.obj['console']
|
|
454
|
+
|
|
455
|
+
if not toon_utils.is_toon_available():
|
|
456
|
+
console.print("[red]TOON support not installed.[/red]")
|
|
457
|
+
console.print("Install with: [cyan]pip install claude-dev-cli[toon][/cyan]")
|
|
458
|
+
sys.exit(1)
|
|
459
|
+
|
|
460
|
+
try:
|
|
461
|
+
import json
|
|
462
|
+
|
|
463
|
+
# Read input
|
|
464
|
+
if input_file:
|
|
465
|
+
with open(input_file, 'r') as f:
|
|
466
|
+
toon_str = f.read()
|
|
467
|
+
elif not sys.stdin.isatty():
|
|
468
|
+
toon_str = sys.stdin.read()
|
|
469
|
+
else:
|
|
470
|
+
console.print("[red]Error: No input provided[/red]")
|
|
471
|
+
console.print("Usage: cdc toon decode [FILE] or pipe TOON via stdin")
|
|
472
|
+
sys.exit(1)
|
|
473
|
+
|
|
474
|
+
# Convert from TOON
|
|
475
|
+
data = toon_utils.from_toon(toon_str)
|
|
476
|
+
|
|
477
|
+
# Output
|
|
478
|
+
json_str = json.dumps(data, indent=2)
|
|
479
|
+
if output:
|
|
480
|
+
with open(output, 'w') as f:
|
|
481
|
+
f.write(json_str)
|
|
482
|
+
console.print(f"[green]✓[/green] Converted to JSON: {output}")
|
|
483
|
+
else:
|
|
484
|
+
console.print(json_str)
|
|
485
|
+
|
|
486
|
+
except Exception as e:
|
|
487
|
+
console.print(f"[red]Error: {e}[/red]")
|
|
488
|
+
sys.exit(1)
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
@toon.command('info')
|
|
492
|
+
@click.pass_context
|
|
493
|
+
def toon_info(ctx: click.Context) -> None:
|
|
494
|
+
"""Show TOON format installation status and token savings info."""
|
|
495
|
+
console = ctx.obj['console']
|
|
496
|
+
|
|
497
|
+
if toon_utils.is_toon_available():
|
|
498
|
+
console.print("[green]✓[/green] TOON format support is installed")
|
|
499
|
+
console.print("\n[bold]About TOON:[/bold]")
|
|
500
|
+
console.print("• Token-Oriented Object Notation")
|
|
501
|
+
console.print("• 30-60% fewer tokens than JSON")
|
|
502
|
+
console.print("• Optimized for LLM prompts")
|
|
503
|
+
console.print("• Human-readable and lossless")
|
|
504
|
+
console.print("\n[bold]Usage:[/bold]")
|
|
505
|
+
console.print(" cdc toon encode data.json -o data.toon")
|
|
506
|
+
console.print(" cdc toon decode data.toon -o data.json")
|
|
507
|
+
console.print(" cat data.json | cdc toon encode")
|
|
508
|
+
else:
|
|
509
|
+
console.print("[yellow]TOON format support not installed[/yellow]")
|
|
510
|
+
console.print("\nInstall with: [cyan]pip install claude-dev-cli[toon][/cyan]")
|
|
511
|
+
console.print("\n[bold]Benefits:[/bold]")
|
|
512
|
+
console.print("• Reduce API costs by 30-60%")
|
|
513
|
+
console.print("• Faster LLM response times")
|
|
514
|
+
console.print("• Same data, fewer tokens")
|
|
515
|
+
|
|
516
|
+
|
|
397
517
|
if __name__ == '__main__':
|
|
398
518
|
main(obj={})
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"""TOON format utilities for token-efficient LLM communication."""
|
|
2
|
+
|
|
3
|
+
from typing import Any, Optional
|
|
4
|
+
|
|
5
|
+
# Try to import toon-format, but make it optional
|
|
6
|
+
try:
|
|
7
|
+
from toon_format import encode as toon_encode, decode as toon_decode
|
|
8
|
+
TOON_AVAILABLE = True
|
|
9
|
+
except ImportError:
|
|
10
|
+
TOON_AVAILABLE = False
|
|
11
|
+
toon_encode = None
|
|
12
|
+
toon_decode = None
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def is_toon_available() -> bool:
|
|
16
|
+
"""Check if TOON format support is available."""
|
|
17
|
+
return TOON_AVAILABLE
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def to_toon(data: Any) -> str:
|
|
21
|
+
"""
|
|
22
|
+
Convert Python data to TOON format.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
data: Python dict, list, or primitive to encode
|
|
26
|
+
|
|
27
|
+
Returns:
|
|
28
|
+
TOON-formatted string
|
|
29
|
+
|
|
30
|
+
Raises:
|
|
31
|
+
ImportError: If toon-format is not installed
|
|
32
|
+
"""
|
|
33
|
+
if not TOON_AVAILABLE:
|
|
34
|
+
raise ImportError(
|
|
35
|
+
"TOON format support not installed. "
|
|
36
|
+
"Install with: pip install claude-dev-cli[toon]"
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return toon_encode(data)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def from_toon(toon_str: str) -> Any:
|
|
43
|
+
"""
|
|
44
|
+
Convert TOON format back to Python data.
|
|
45
|
+
|
|
46
|
+
Args:
|
|
47
|
+
toon_str: TOON-formatted string
|
|
48
|
+
|
|
49
|
+
Returns:
|
|
50
|
+
Python dict, list, or primitive
|
|
51
|
+
|
|
52
|
+
Raises:
|
|
53
|
+
ImportError: If toon-format is not installed
|
|
54
|
+
"""
|
|
55
|
+
if not TOON_AVAILABLE:
|
|
56
|
+
raise ImportError(
|
|
57
|
+
"TOON format support not installed. "
|
|
58
|
+
"Install with: pip install claude-dev-cli[toon]"
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
return toon_decode(toon_str)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def format_for_llm(data: Any, use_toon: bool = True) -> str:
|
|
65
|
+
"""
|
|
66
|
+
Format data for LLM consumption, preferring TOON if available.
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
data: Data to format
|
|
70
|
+
use_toon: Whether to use TOON format if available (default: True)
|
|
71
|
+
|
|
72
|
+
Returns:
|
|
73
|
+
Formatted string (TOON if available and requested, else JSON)
|
|
74
|
+
"""
|
|
75
|
+
import json
|
|
76
|
+
|
|
77
|
+
if use_toon and TOON_AVAILABLE:
|
|
78
|
+
try:
|
|
79
|
+
return to_toon(data)
|
|
80
|
+
except Exception:
|
|
81
|
+
# Fall back to JSON if TOON encoding fails
|
|
82
|
+
pass
|
|
83
|
+
|
|
84
|
+
return json.dumps(data, indent=2)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def auto_detect_format(content: str) -> tuple[str, Any]:
|
|
88
|
+
"""
|
|
89
|
+
Auto-detect if content is TOON or JSON and decode accordingly.
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
content: String content to decode
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
Tuple of (format_name, decoded_data)
|
|
96
|
+
|
|
97
|
+
Raises:
|
|
98
|
+
ValueError: If content cannot be parsed as either format
|
|
99
|
+
"""
|
|
100
|
+
import json
|
|
101
|
+
|
|
102
|
+
# Try TOON first if available
|
|
103
|
+
if TOON_AVAILABLE:
|
|
104
|
+
try:
|
|
105
|
+
data = from_toon(content)
|
|
106
|
+
return ("toon", data)
|
|
107
|
+
except Exception:
|
|
108
|
+
pass
|
|
109
|
+
|
|
110
|
+
# Try JSON
|
|
111
|
+
try:
|
|
112
|
+
data = json.loads(content)
|
|
113
|
+
return ("json", data)
|
|
114
|
+
except json.JSONDecodeError:
|
|
115
|
+
pass
|
|
116
|
+
|
|
117
|
+
raise ValueError("Content is neither valid TOON nor JSON")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-dev-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.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
|
|
@@ -26,11 +26,14 @@ Requires-Dist: anthropic>=0.18.0
|
|
|
26
26
|
Requires-Dist: click>=8.1.0
|
|
27
27
|
Requires-Dist: rich>=13.0.0
|
|
28
28
|
Requires-Dist: pydantic>=2.0.0
|
|
29
|
+
Provides-Extra: toon
|
|
30
|
+
Requires-Dist: toon-format>=0.9.0; extra == "toon"
|
|
29
31
|
Provides-Extra: dev
|
|
30
32
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
31
33
|
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
32
34
|
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
33
35
|
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
36
|
+
Requires-Dist: toon-format>=0.9.0; extra == "dev"
|
|
34
37
|
Dynamic: license-file
|
|
35
38
|
|
|
36
39
|
# Claude Dev CLI
|
|
@@ -63,12 +66,27 @@ A powerful command-line tool for developers using Claude AI with multi-API routi
|
|
|
63
66
|
- **Interactive**: Chat mode with conversation history
|
|
64
67
|
- **Streaming**: Real-time responses
|
|
65
68
|
|
|
69
|
+
### 🎒 TOON Format Support (Optional)
|
|
70
|
+
- **Token Reduction**: 30-60% fewer tokens than JSON
|
|
71
|
+
- **Cost Savings**: Reduce API costs significantly
|
|
72
|
+
- **Format Conversion**: JSON ↔ TOON with CLI tools
|
|
73
|
+
- **Auto-fallback**: Works without TOON installed
|
|
74
|
+
|
|
66
75
|
## Installation
|
|
67
76
|
|
|
77
|
+
### Basic Installation
|
|
78
|
+
|
|
68
79
|
```bash
|
|
69
80
|
pip install claude-dev-cli
|
|
70
81
|
```
|
|
71
82
|
|
|
83
|
+
### With TOON Support (Recommended for Cost Savings)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Install with TOON format support for 30-60% token reduction
|
|
87
|
+
pip install claude-dev-cli[toon]
|
|
88
|
+
```
|
|
89
|
+
|
|
72
90
|
## Quick Start
|
|
73
91
|
|
|
74
92
|
### 1. Set Up API Keys
|
|
@@ -141,6 +159,28 @@ cdc usage --days 7
|
|
|
141
159
|
cdc usage --api client
|
|
142
160
|
```
|
|
143
161
|
|
|
162
|
+
### 5. TOON Format (Optional - Reduces Tokens by 30-60%)
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Check if TOON is installed
|
|
166
|
+
cdc toon info
|
|
167
|
+
|
|
168
|
+
# Convert JSON to TOON
|
|
169
|
+
echo '{"users": [{"id": 1, "name": "Alice"}]}' | cdc toon encode
|
|
170
|
+
# Output:
|
|
171
|
+
# users[1]{id,name}:
|
|
172
|
+
# 1,Alice
|
|
173
|
+
|
|
174
|
+
# Convert file
|
|
175
|
+
cdc toon encode data.json -o data.toon
|
|
176
|
+
|
|
177
|
+
# Convert TOON back to JSON
|
|
178
|
+
cdc toon decode data.toon -o data.json
|
|
179
|
+
|
|
180
|
+
# Use in workflows
|
|
181
|
+
cat large_data.json | cdc toon encode | cdc ask "analyze this data"
|
|
182
|
+
```
|
|
183
|
+
|
|
144
184
|
## Configuration
|
|
145
185
|
|
|
146
186
|
### Global Configuration
|
|
@@ -8,6 +8,7 @@ src/claude_dev_cli/commands.py
|
|
|
8
8
|
src/claude_dev_cli/config.py
|
|
9
9
|
src/claude_dev_cli/core.py
|
|
10
10
|
src/claude_dev_cli/templates.py
|
|
11
|
+
src/claude_dev_cli/toon_utils.py
|
|
11
12
|
src/claude_dev_cli/usage.py
|
|
12
13
|
src/claude_dev_cli.egg-info/PKG-INFO
|
|
13
14
|
src/claude_dev_cli.egg-info/SOURCES.txt
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{claude_dev_cli-0.1.0 → claude_dev_cli-0.2.0}/src/claude_dev_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|