claude-dev-cli 0.16.1__tar.gz → 0.16.2__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.16.1/src/claude_dev_cli.egg-info → claude_dev_cli-0.16.2}/PKG-INFO +266 -7
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/README.md +265 -6
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/pyproject.toml +1 -1
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/__init__.py +1 -1
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2/src/claude_dev_cli.egg-info}/PKG-INFO +266 -7
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/LICENSE +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/MANIFEST.in +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/setup.cfg +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/cli.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/commands.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/config.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/context.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/core.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/history.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/input_sources.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/multi_file_handler.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/path_utils.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/plugins/__init__.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/plugins/base.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/plugins/diff_editor/__init__.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/plugins/diff_editor/plugin.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/plugins/diff_editor/viewer.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/providers/__init__.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/providers/anthropic.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/providers/base.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/providers/factory.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/providers/ollama.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/providers/openai.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/secure_storage.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/template_manager.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/templates.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/toon_utils.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/usage.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/warp_integration.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/workflows.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli.egg-info/SOURCES.txt +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli.egg-info/dependency_links.txt +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli.egg-info/entry_points.txt +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli.egg-info/requires.txt +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli.egg-info/top_level.txt +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_cli.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_commands.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_config.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_context.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_core.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_diff_editor.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_history.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_input_sources.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_multi_file_handler.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_path_utils.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_secure_storage.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_template_manager.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/tests/test_toon_utils.py +0 -0
- {claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/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.16.
|
|
3
|
+
Version: 0.16.2
|
|
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
|
|
@@ -175,6 +175,17 @@ A powerful command-line tool for developers using Claude AI with multi-API routi
|
|
|
175
175
|
- **Project Memory**: Remember preferences per project
|
|
176
176
|
- **Global Config**: Set context defaults in `~/.claude-dev-cli/config.json`
|
|
177
177
|
|
|
178
|
+
### 🔄 Workflows (v0.7.0+, Enhanced v0.16.1)
|
|
179
|
+
- **Multi-Step Automation**: Chain AI operations and shell commands with YAML
|
|
180
|
+
- **AI Decision Making**: Use `ask` command to make intelligent workflow decisions (v0.16.1)
|
|
181
|
+
- **Variable Interpolation**: Pass data between steps with `{{variable}}` syntax
|
|
182
|
+
- **Conditional Execution**: Skip steps based on conditions with `if` clauses
|
|
183
|
+
- **Approval Gates**: Human-in-the-loop with `approval_required: true`
|
|
184
|
+
- **Model Selection**: Use different AI models per step for cost optimization (v0.16.1)
|
|
185
|
+
- **Error Handling**: Continue on failure with `continue_on_error: true`
|
|
186
|
+
- **Three Step Types**: command (cdc), shell (bash/zsh), set (variables)
|
|
187
|
+
- **Cost Optimization**: Mix free local AI with paid cloud AI strategically
|
|
188
|
+
|
|
178
189
|
### 🎒 TOON Format Support (Optional)
|
|
179
190
|
- **Token Reduction**: 30-60% fewer tokens than JSON
|
|
180
191
|
- **Cost Savings**: Reduce API costs significantly
|
|
@@ -770,7 +781,208 @@ cdc history delete 20240109_143022
|
|
|
770
781
|
- Reduces API costs by ~30-50% in long conversations
|
|
771
782
|
- Shows token savings after summarization
|
|
772
783
|
|
|
773
|
-
### 7.
|
|
784
|
+
### 7. Workflows - AI-Powered Automation (v0.7.0+, Enhanced v0.16.1)
|
|
785
|
+
|
|
786
|
+
Chain multiple AI operations into automated sequences with YAML workflows.
|
|
787
|
+
|
|
788
|
+
#### Basic Workflow Usage
|
|
789
|
+
|
|
790
|
+
```bash
|
|
791
|
+
# Run a workflow
|
|
792
|
+
cdc workflow run my-workflow.yaml
|
|
793
|
+
|
|
794
|
+
# Pass variables
|
|
795
|
+
cdc workflow run workflow.yaml --var file=main.py --var api=local
|
|
796
|
+
|
|
797
|
+
# List available workflows
|
|
798
|
+
cdc workflow list
|
|
799
|
+
|
|
800
|
+
# Show workflow details
|
|
801
|
+
cdc workflow show workflow.yaml
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
#### Example: Simple Review & Test Workflow
|
|
805
|
+
|
|
806
|
+
```yaml
|
|
807
|
+
name: "Review and Test"
|
|
808
|
+
description: "Review code and generate tests"
|
|
809
|
+
|
|
810
|
+
steps:
|
|
811
|
+
- name: code-review
|
|
812
|
+
command: review
|
|
813
|
+
args:
|
|
814
|
+
file: "{{target_file}}"
|
|
815
|
+
api: "local" # Use FREE local AI
|
|
816
|
+
model: "smart-local"
|
|
817
|
+
output_var: review_result
|
|
818
|
+
|
|
819
|
+
- name: generate-tests
|
|
820
|
+
command: generate tests
|
|
821
|
+
args:
|
|
822
|
+
file: "{{target_file}}"
|
|
823
|
+
api: "local"
|
|
824
|
+
model: "code-local"
|
|
825
|
+
output_var: tests
|
|
826
|
+
|
|
827
|
+
- name: run-tests
|
|
828
|
+
shell: "pytest tests/"
|
|
829
|
+
continue_on_error: true
|
|
830
|
+
```
|
|
831
|
+
|
|
832
|
+
**Run it:**
|
|
833
|
+
```bash
|
|
834
|
+
cdc workflow run review-test.yaml --var target_file=app.py
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
#### Example: AI Decision Making (NEW in v0.16.1)
|
|
838
|
+
|
|
839
|
+
Use the `ask` command to make intelligent workflow decisions:
|
|
840
|
+
|
|
841
|
+
```yaml
|
|
842
|
+
name: "Adaptive Code Analysis"
|
|
843
|
+
description: "AI analyzes code complexity and adapts workflow"
|
|
844
|
+
|
|
845
|
+
steps:
|
|
846
|
+
# AI rates complexity
|
|
847
|
+
- name: check-complexity
|
|
848
|
+
command: ask
|
|
849
|
+
args:
|
|
850
|
+
prompt: "Rate this code complexity 1-10, respond with number only: {{code}}"
|
|
851
|
+
api: "local" # FREE
|
|
852
|
+
model: "fast-local"
|
|
853
|
+
output_var: complexity
|
|
854
|
+
|
|
855
|
+
# Conditional deep review for complex code
|
|
856
|
+
- name: deep-review
|
|
857
|
+
command: review
|
|
858
|
+
args:
|
|
859
|
+
file: "{{file}}"
|
|
860
|
+
api: "personal" # Use paid API for complex code
|
|
861
|
+
model: "powerful"
|
|
862
|
+
if: "{{complexity}} > 7"
|
|
863
|
+
approval_required: true # Ask before using paid API
|
|
864
|
+
|
|
865
|
+
# Simple refactor for medium complexity
|
|
866
|
+
- name: simple-refactor
|
|
867
|
+
command: refactor
|
|
868
|
+
args:
|
|
869
|
+
file: "{{file}}"
|
|
870
|
+
api: "local" # FREE
|
|
871
|
+
if: "{{complexity}} >= 5 and {{complexity}} <= 7"
|
|
872
|
+
```
|
|
873
|
+
|
|
874
|
+
**Key Features:**
|
|
875
|
+
- ✨ `ask` command for AI queries
|
|
876
|
+
- 💰 Mix free local and paid cloud AI
|
|
877
|
+
- 🎯 Conditional execution based on AI responses
|
|
878
|
+
- ✋ Approval gates before expensive operations
|
|
879
|
+
|
|
880
|
+
#### Example: Cost-Optimized Workflow
|
|
881
|
+
|
|
882
|
+
```yaml
|
|
883
|
+
name: "Smart Cost Optimization"
|
|
884
|
+
description: "Use local AI first, cloud only when critical"
|
|
885
|
+
|
|
886
|
+
steps:
|
|
887
|
+
# Quick scan with FREE local AI
|
|
888
|
+
- name: quick-scan
|
|
889
|
+
command: ask
|
|
890
|
+
args:
|
|
891
|
+
prompt: "Quick scan for obvious issues: {{code}}"
|
|
892
|
+
api: "local" # FREE
|
|
893
|
+
model: "fast-local"
|
|
894
|
+
output_var: issues
|
|
895
|
+
|
|
896
|
+
# Only use expensive cloud AI if critical issues found
|
|
897
|
+
- name: deep-security-analysis
|
|
898
|
+
command: ask
|
|
899
|
+
args:
|
|
900
|
+
prompt: "Deep security analysis: {{code}}"
|
|
901
|
+
api: "personal" # PAID
|
|
902
|
+
model: "powerful" # Claude Opus - expensive
|
|
903
|
+
system: "You are a security expert"
|
|
904
|
+
if: "{{issues}} contains 'critical' or {{issues}} contains 'security'"
|
|
905
|
+
approval_required: true
|
|
906
|
+
|
|
907
|
+
# Tests with local code-specialized model (FREE)
|
|
908
|
+
- name: generate-tests
|
|
909
|
+
command: generate tests
|
|
910
|
+
args:
|
|
911
|
+
file: "{{file}}"
|
|
912
|
+
api: "local" # FREE
|
|
913
|
+
model: "code-local"
|
|
914
|
+
```
|
|
915
|
+
|
|
916
|
+
**Cost Savings:**
|
|
917
|
+
- Local AI for initial scans: $0
|
|
918
|
+
- Cloud AI only when needed: saves 70-90%
|
|
919
|
+
- Approval gates prevent accidental costs
|
|
920
|
+
|
|
921
|
+
#### Workflow Step Types
|
|
922
|
+
|
|
923
|
+
**1. Command Steps (cdc commands)**
|
|
924
|
+
```yaml
|
|
925
|
+
- name: review-code
|
|
926
|
+
command: review # or: generate tests, debug, refactor, etc.
|
|
927
|
+
args:
|
|
928
|
+
file: "{{file}}"
|
|
929
|
+
api: "local"
|
|
930
|
+
model: "smart-local"
|
|
931
|
+
output_var: result
|
|
932
|
+
```
|
|
933
|
+
|
|
934
|
+
**Supported commands:** `review`, `generate tests`, `generate docs`, `refactor`, `debug`, `git commit`, `ask` (v0.16.1)
|
|
935
|
+
|
|
936
|
+
**2. Shell Steps (any command)**
|
|
937
|
+
```yaml
|
|
938
|
+
- name: run-tests
|
|
939
|
+
shell: "pytest tests/ -v"
|
|
940
|
+
output_var: test_output
|
|
941
|
+
continue_on_error: true
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
**3. Set Steps (variables)**
|
|
945
|
+
```yaml
|
|
946
|
+
- name: set-config
|
|
947
|
+
set: api_endpoint
|
|
948
|
+
value: "https://api.example.com"
|
|
949
|
+
```
|
|
950
|
+
|
|
951
|
+
#### Advanced Features
|
|
952
|
+
|
|
953
|
+
**Conditional Execution:**
|
|
954
|
+
```yaml
|
|
955
|
+
if: "{{score}} > 7" # Simple comparison
|
|
956
|
+
if: "{{result}} contains 'error'" # String matching
|
|
957
|
+
if: "{{tests.success}}" # Access step results
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
**Approval Gates:**
|
|
961
|
+
```yaml
|
|
962
|
+
approval_required: true # Pause for user confirmation
|
|
963
|
+
```
|
|
964
|
+
|
|
965
|
+
**Error Handling:**
|
|
966
|
+
```yaml
|
|
967
|
+
continue_on_error: true # Don't stop workflow on failure
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
**Variable Interpolation:**
|
|
971
|
+
```yaml
|
|
972
|
+
{{variable}} # Simple variable
|
|
973
|
+
{{step_name.output}} # Step output
|
|
974
|
+
{{step_name.success}} # Step success status
|
|
975
|
+
```
|
|
976
|
+
|
|
977
|
+
#### Example Workflows Included
|
|
978
|
+
|
|
979
|
+
**Location:** `examples/workflows/`
|
|
980
|
+
|
|
981
|
+
1. **review-and-refactor.yaml** - Basic review workflow
|
|
982
|
+
2. **ai-decision-workflow.yaml** - AI-powered decisions (v0.16.1)
|
|
983
|
+
3. **multi-model-workflow.yaml** - Cost optimization (v0.16.1)
|
|
984
|
+
|
|
985
|
+
### 8. Usage Tracking
|
|
774
986
|
|
|
775
987
|
```bash
|
|
776
988
|
# View all usage
|
|
@@ -783,7 +995,7 @@ cdc usage --days 7
|
|
|
783
995
|
cdc usage --api client
|
|
784
996
|
```
|
|
785
997
|
|
|
786
|
-
###
|
|
998
|
+
### 9. TOON Format (Optional - Reduces Tokens by 30-60%)
|
|
787
999
|
|
|
788
1000
|
```bash
|
|
789
1001
|
# Check if TOON is installed
|
|
@@ -952,6 +1164,31 @@ When using a client's Enterprise API:
|
|
|
952
1164
|
|---------|-------------|
|
|
953
1165
|
| `cdc git commit` | Generate commit message |
|
|
954
1166
|
|
|
1167
|
+
### Workflows (v0.7.0+)
|
|
1168
|
+
|
|
1169
|
+
| Command | Description |
|
|
1170
|
+
|---------|-------------|
|
|
1171
|
+
| `cdc workflow run <file>` | Execute workflow from YAML |
|
|
1172
|
+
| `cdc workflow list` | List available workflows |
|
|
1173
|
+
| `cdc workflow show <file>` | Show workflow details |
|
|
1174
|
+
|
|
1175
|
+
### Ollama (Local AI) (v0.16.0+)
|
|
1176
|
+
|
|
1177
|
+
| Command | Description |
|
|
1178
|
+
|---------|-------------|
|
|
1179
|
+
| `cdc ollama list` | List local models |
|
|
1180
|
+
| `cdc ollama pull <model>` | Download model |
|
|
1181
|
+
| `cdc ollama show <model>` | Show model details |
|
|
1182
|
+
|
|
1183
|
+
### Model Profiles (v0.10.0+)
|
|
1184
|
+
|
|
1185
|
+
| Command | Description |
|
|
1186
|
+
|---------|-------------|
|
|
1187
|
+
| `cdc model list` | List all model profiles |
|
|
1188
|
+
| `cdc model show <name>` | Show profile details |
|
|
1189
|
+
| `cdc model add <name> <model_id>` | Add custom profile |
|
|
1190
|
+
| `cdc model set-default <name>` | Set default profile |
|
|
1191
|
+
|
|
955
1192
|
## Options
|
|
956
1193
|
|
|
957
1194
|
### Common Options
|
|
@@ -962,11 +1199,33 @@ When using a client's Enterprise API:
|
|
|
962
1199
|
- `-f, --file <path>`: Include file in prompt
|
|
963
1200
|
- `-o, --output <path>`: Save output to file
|
|
964
1201
|
|
|
965
|
-
###
|
|
1202
|
+
### Model Profiles
|
|
1203
|
+
|
|
1204
|
+
**Anthropic (Claude):**
|
|
1205
|
+
- `fast` / `claude-3-5-haiku-20241022` - Fast & economical ($0.80/$4 per Mtok)
|
|
1206
|
+
- `smart` / `claude-sonnet-4-5-20250929` - Balanced (default) ($3/$15 per Mtok)
|
|
1207
|
+
- `powerful` / `claude-opus-4-20250514` - Most capable ($15/$75 per Mtok)
|
|
1208
|
+
|
|
1209
|
+
**OpenAI (GPT):** (requires `pip install 'claude-dev-cli[openai]'`)
|
|
1210
|
+
- `fast-openai` / `gpt-3.5-turbo` - Fast & cheap ($0.50/$1.50 per Mtok)
|
|
1211
|
+
- `smart-openai` / `gpt-4-turbo` - Balanced ($10/$30 per Mtok)
|
|
1212
|
+
- `powerful-openai` / `gpt-4` - High capability ($30/$60 per Mtok)
|
|
1213
|
+
|
|
1214
|
+
**Ollama (Local - FREE):** (requires `pip install 'claude-dev-cli[ollama]'`)
|
|
1215
|
+
- `fast-local` / `mistral` - Fast inference (8k context, FREE)
|
|
1216
|
+
- `smart-local` / `mixtral` - Powerful reasoning (32k context, FREE)
|
|
1217
|
+
- `code-local` / `codellama` - Code specialist (16k context, FREE)
|
|
966
1218
|
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1219
|
+
**Usage:**
|
|
1220
|
+
```bash
|
|
1221
|
+
# Use model profile
|
|
1222
|
+
cdc ask -m fast "quick question" # Uses Haiku
|
|
1223
|
+
cdc ask -m fast-local "question" # Uses Mistral (FREE)
|
|
1224
|
+
|
|
1225
|
+
# Use specific model ID
|
|
1226
|
+
cdc ask -m claude-opus-4-20250514 "complex task"
|
|
1227
|
+
cdc ask -m gpt-4-turbo "openai task"
|
|
1228
|
+
```
|
|
970
1229
|
|
|
971
1230
|
## Examples
|
|
972
1231
|
|
|
@@ -114,6 +114,17 @@ A powerful command-line tool for developers using Claude AI with multi-API routi
|
|
|
114
114
|
- **Project Memory**: Remember preferences per project
|
|
115
115
|
- **Global Config**: Set context defaults in `~/.claude-dev-cli/config.json`
|
|
116
116
|
|
|
117
|
+
### 🔄 Workflows (v0.7.0+, Enhanced v0.16.1)
|
|
118
|
+
- **Multi-Step Automation**: Chain AI operations and shell commands with YAML
|
|
119
|
+
- **AI Decision Making**: Use `ask` command to make intelligent workflow decisions (v0.16.1)
|
|
120
|
+
- **Variable Interpolation**: Pass data between steps with `{{variable}}` syntax
|
|
121
|
+
- **Conditional Execution**: Skip steps based on conditions with `if` clauses
|
|
122
|
+
- **Approval Gates**: Human-in-the-loop with `approval_required: true`
|
|
123
|
+
- **Model Selection**: Use different AI models per step for cost optimization (v0.16.1)
|
|
124
|
+
- **Error Handling**: Continue on failure with `continue_on_error: true`
|
|
125
|
+
- **Three Step Types**: command (cdc), shell (bash/zsh), set (variables)
|
|
126
|
+
- **Cost Optimization**: Mix free local AI with paid cloud AI strategically
|
|
127
|
+
|
|
117
128
|
### 🎒 TOON Format Support (Optional)
|
|
118
129
|
- **Token Reduction**: 30-60% fewer tokens than JSON
|
|
119
130
|
- **Cost Savings**: Reduce API costs significantly
|
|
@@ -709,7 +720,208 @@ cdc history delete 20240109_143022
|
|
|
709
720
|
- Reduces API costs by ~30-50% in long conversations
|
|
710
721
|
- Shows token savings after summarization
|
|
711
722
|
|
|
712
|
-
### 7.
|
|
723
|
+
### 7. Workflows - AI-Powered Automation (v0.7.0+, Enhanced v0.16.1)
|
|
724
|
+
|
|
725
|
+
Chain multiple AI operations into automated sequences with YAML workflows.
|
|
726
|
+
|
|
727
|
+
#### Basic Workflow Usage
|
|
728
|
+
|
|
729
|
+
```bash
|
|
730
|
+
# Run a workflow
|
|
731
|
+
cdc workflow run my-workflow.yaml
|
|
732
|
+
|
|
733
|
+
# Pass variables
|
|
734
|
+
cdc workflow run workflow.yaml --var file=main.py --var api=local
|
|
735
|
+
|
|
736
|
+
# List available workflows
|
|
737
|
+
cdc workflow list
|
|
738
|
+
|
|
739
|
+
# Show workflow details
|
|
740
|
+
cdc workflow show workflow.yaml
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
#### Example: Simple Review & Test Workflow
|
|
744
|
+
|
|
745
|
+
```yaml
|
|
746
|
+
name: "Review and Test"
|
|
747
|
+
description: "Review code and generate tests"
|
|
748
|
+
|
|
749
|
+
steps:
|
|
750
|
+
- name: code-review
|
|
751
|
+
command: review
|
|
752
|
+
args:
|
|
753
|
+
file: "{{target_file}}"
|
|
754
|
+
api: "local" # Use FREE local AI
|
|
755
|
+
model: "smart-local"
|
|
756
|
+
output_var: review_result
|
|
757
|
+
|
|
758
|
+
- name: generate-tests
|
|
759
|
+
command: generate tests
|
|
760
|
+
args:
|
|
761
|
+
file: "{{target_file}}"
|
|
762
|
+
api: "local"
|
|
763
|
+
model: "code-local"
|
|
764
|
+
output_var: tests
|
|
765
|
+
|
|
766
|
+
- name: run-tests
|
|
767
|
+
shell: "pytest tests/"
|
|
768
|
+
continue_on_error: true
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
**Run it:**
|
|
772
|
+
```bash
|
|
773
|
+
cdc workflow run review-test.yaml --var target_file=app.py
|
|
774
|
+
```
|
|
775
|
+
|
|
776
|
+
#### Example: AI Decision Making (NEW in v0.16.1)
|
|
777
|
+
|
|
778
|
+
Use the `ask` command to make intelligent workflow decisions:
|
|
779
|
+
|
|
780
|
+
```yaml
|
|
781
|
+
name: "Adaptive Code Analysis"
|
|
782
|
+
description: "AI analyzes code complexity and adapts workflow"
|
|
783
|
+
|
|
784
|
+
steps:
|
|
785
|
+
# AI rates complexity
|
|
786
|
+
- name: check-complexity
|
|
787
|
+
command: ask
|
|
788
|
+
args:
|
|
789
|
+
prompt: "Rate this code complexity 1-10, respond with number only: {{code}}"
|
|
790
|
+
api: "local" # FREE
|
|
791
|
+
model: "fast-local"
|
|
792
|
+
output_var: complexity
|
|
793
|
+
|
|
794
|
+
# Conditional deep review for complex code
|
|
795
|
+
- name: deep-review
|
|
796
|
+
command: review
|
|
797
|
+
args:
|
|
798
|
+
file: "{{file}}"
|
|
799
|
+
api: "personal" # Use paid API for complex code
|
|
800
|
+
model: "powerful"
|
|
801
|
+
if: "{{complexity}} > 7"
|
|
802
|
+
approval_required: true # Ask before using paid API
|
|
803
|
+
|
|
804
|
+
# Simple refactor for medium complexity
|
|
805
|
+
- name: simple-refactor
|
|
806
|
+
command: refactor
|
|
807
|
+
args:
|
|
808
|
+
file: "{{file}}"
|
|
809
|
+
api: "local" # FREE
|
|
810
|
+
if: "{{complexity}} >= 5 and {{complexity}} <= 7"
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
**Key Features:**
|
|
814
|
+
- ✨ `ask` command for AI queries
|
|
815
|
+
- 💰 Mix free local and paid cloud AI
|
|
816
|
+
- 🎯 Conditional execution based on AI responses
|
|
817
|
+
- ✋ Approval gates before expensive operations
|
|
818
|
+
|
|
819
|
+
#### Example: Cost-Optimized Workflow
|
|
820
|
+
|
|
821
|
+
```yaml
|
|
822
|
+
name: "Smart Cost Optimization"
|
|
823
|
+
description: "Use local AI first, cloud only when critical"
|
|
824
|
+
|
|
825
|
+
steps:
|
|
826
|
+
# Quick scan with FREE local AI
|
|
827
|
+
- name: quick-scan
|
|
828
|
+
command: ask
|
|
829
|
+
args:
|
|
830
|
+
prompt: "Quick scan for obvious issues: {{code}}"
|
|
831
|
+
api: "local" # FREE
|
|
832
|
+
model: "fast-local"
|
|
833
|
+
output_var: issues
|
|
834
|
+
|
|
835
|
+
# Only use expensive cloud AI if critical issues found
|
|
836
|
+
- name: deep-security-analysis
|
|
837
|
+
command: ask
|
|
838
|
+
args:
|
|
839
|
+
prompt: "Deep security analysis: {{code}}"
|
|
840
|
+
api: "personal" # PAID
|
|
841
|
+
model: "powerful" # Claude Opus - expensive
|
|
842
|
+
system: "You are a security expert"
|
|
843
|
+
if: "{{issues}} contains 'critical' or {{issues}} contains 'security'"
|
|
844
|
+
approval_required: true
|
|
845
|
+
|
|
846
|
+
# Tests with local code-specialized model (FREE)
|
|
847
|
+
- name: generate-tests
|
|
848
|
+
command: generate tests
|
|
849
|
+
args:
|
|
850
|
+
file: "{{file}}"
|
|
851
|
+
api: "local" # FREE
|
|
852
|
+
model: "code-local"
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
**Cost Savings:**
|
|
856
|
+
- Local AI for initial scans: $0
|
|
857
|
+
- Cloud AI only when needed: saves 70-90%
|
|
858
|
+
- Approval gates prevent accidental costs
|
|
859
|
+
|
|
860
|
+
#### Workflow Step Types
|
|
861
|
+
|
|
862
|
+
**1. Command Steps (cdc commands)**
|
|
863
|
+
```yaml
|
|
864
|
+
- name: review-code
|
|
865
|
+
command: review # or: generate tests, debug, refactor, etc.
|
|
866
|
+
args:
|
|
867
|
+
file: "{{file}}"
|
|
868
|
+
api: "local"
|
|
869
|
+
model: "smart-local"
|
|
870
|
+
output_var: result
|
|
871
|
+
```
|
|
872
|
+
|
|
873
|
+
**Supported commands:** `review`, `generate tests`, `generate docs`, `refactor`, `debug`, `git commit`, `ask` (v0.16.1)
|
|
874
|
+
|
|
875
|
+
**2. Shell Steps (any command)**
|
|
876
|
+
```yaml
|
|
877
|
+
- name: run-tests
|
|
878
|
+
shell: "pytest tests/ -v"
|
|
879
|
+
output_var: test_output
|
|
880
|
+
continue_on_error: true
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
**3. Set Steps (variables)**
|
|
884
|
+
```yaml
|
|
885
|
+
- name: set-config
|
|
886
|
+
set: api_endpoint
|
|
887
|
+
value: "https://api.example.com"
|
|
888
|
+
```
|
|
889
|
+
|
|
890
|
+
#### Advanced Features
|
|
891
|
+
|
|
892
|
+
**Conditional Execution:**
|
|
893
|
+
```yaml
|
|
894
|
+
if: "{{score}} > 7" # Simple comparison
|
|
895
|
+
if: "{{result}} contains 'error'" # String matching
|
|
896
|
+
if: "{{tests.success}}" # Access step results
|
|
897
|
+
```
|
|
898
|
+
|
|
899
|
+
**Approval Gates:**
|
|
900
|
+
```yaml
|
|
901
|
+
approval_required: true # Pause for user confirmation
|
|
902
|
+
```
|
|
903
|
+
|
|
904
|
+
**Error Handling:**
|
|
905
|
+
```yaml
|
|
906
|
+
continue_on_error: true # Don't stop workflow on failure
|
|
907
|
+
```
|
|
908
|
+
|
|
909
|
+
**Variable Interpolation:**
|
|
910
|
+
```yaml
|
|
911
|
+
{{variable}} # Simple variable
|
|
912
|
+
{{step_name.output}} # Step output
|
|
913
|
+
{{step_name.success}} # Step success status
|
|
914
|
+
```
|
|
915
|
+
|
|
916
|
+
#### Example Workflows Included
|
|
917
|
+
|
|
918
|
+
**Location:** `examples/workflows/`
|
|
919
|
+
|
|
920
|
+
1. **review-and-refactor.yaml** - Basic review workflow
|
|
921
|
+
2. **ai-decision-workflow.yaml** - AI-powered decisions (v0.16.1)
|
|
922
|
+
3. **multi-model-workflow.yaml** - Cost optimization (v0.16.1)
|
|
923
|
+
|
|
924
|
+
### 8. Usage Tracking
|
|
713
925
|
|
|
714
926
|
```bash
|
|
715
927
|
# View all usage
|
|
@@ -722,7 +934,7 @@ cdc usage --days 7
|
|
|
722
934
|
cdc usage --api client
|
|
723
935
|
```
|
|
724
936
|
|
|
725
|
-
###
|
|
937
|
+
### 9. TOON Format (Optional - Reduces Tokens by 30-60%)
|
|
726
938
|
|
|
727
939
|
```bash
|
|
728
940
|
# Check if TOON is installed
|
|
@@ -891,6 +1103,31 @@ When using a client's Enterprise API:
|
|
|
891
1103
|
|---------|-------------|
|
|
892
1104
|
| `cdc git commit` | Generate commit message |
|
|
893
1105
|
|
|
1106
|
+
### Workflows (v0.7.0+)
|
|
1107
|
+
|
|
1108
|
+
| Command | Description |
|
|
1109
|
+
|---------|-------------|
|
|
1110
|
+
| `cdc workflow run <file>` | Execute workflow from YAML |
|
|
1111
|
+
| `cdc workflow list` | List available workflows |
|
|
1112
|
+
| `cdc workflow show <file>` | Show workflow details |
|
|
1113
|
+
|
|
1114
|
+
### Ollama (Local AI) (v0.16.0+)
|
|
1115
|
+
|
|
1116
|
+
| Command | Description |
|
|
1117
|
+
|---------|-------------|
|
|
1118
|
+
| `cdc ollama list` | List local models |
|
|
1119
|
+
| `cdc ollama pull <model>` | Download model |
|
|
1120
|
+
| `cdc ollama show <model>` | Show model details |
|
|
1121
|
+
|
|
1122
|
+
### Model Profiles (v0.10.0+)
|
|
1123
|
+
|
|
1124
|
+
| Command | Description |
|
|
1125
|
+
|---------|-------------|
|
|
1126
|
+
| `cdc model list` | List all model profiles |
|
|
1127
|
+
| `cdc model show <name>` | Show profile details |
|
|
1128
|
+
| `cdc model add <name> <model_id>` | Add custom profile |
|
|
1129
|
+
| `cdc model set-default <name>` | Set default profile |
|
|
1130
|
+
|
|
894
1131
|
## Options
|
|
895
1132
|
|
|
896
1133
|
### Common Options
|
|
@@ -901,11 +1138,33 @@ When using a client's Enterprise API:
|
|
|
901
1138
|
- `-f, --file <path>`: Include file in prompt
|
|
902
1139
|
- `-o, --output <path>`: Save output to file
|
|
903
1140
|
|
|
904
|
-
###
|
|
1141
|
+
### Model Profiles
|
|
1142
|
+
|
|
1143
|
+
**Anthropic (Claude):**
|
|
1144
|
+
- `fast` / `claude-3-5-haiku-20241022` - Fast & economical ($0.80/$4 per Mtok)
|
|
1145
|
+
- `smart` / `claude-sonnet-4-5-20250929` - Balanced (default) ($3/$15 per Mtok)
|
|
1146
|
+
- `powerful` / `claude-opus-4-20250514` - Most capable ($15/$75 per Mtok)
|
|
1147
|
+
|
|
1148
|
+
**OpenAI (GPT):** (requires `pip install 'claude-dev-cli[openai]'`)
|
|
1149
|
+
- `fast-openai` / `gpt-3.5-turbo` - Fast & cheap ($0.50/$1.50 per Mtok)
|
|
1150
|
+
- `smart-openai` / `gpt-4-turbo` - Balanced ($10/$30 per Mtok)
|
|
1151
|
+
- `powerful-openai` / `gpt-4` - High capability ($30/$60 per Mtok)
|
|
1152
|
+
|
|
1153
|
+
**Ollama (Local - FREE):** (requires `pip install 'claude-dev-cli[ollama]'`)
|
|
1154
|
+
- `fast-local` / `mistral` - Fast inference (8k context, FREE)
|
|
1155
|
+
- `smart-local` / `mixtral` - Powerful reasoning (32k context, FREE)
|
|
1156
|
+
- `code-local` / `codellama` - Code specialist (16k context, FREE)
|
|
905
1157
|
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
1158
|
+
**Usage:**
|
|
1159
|
+
```bash
|
|
1160
|
+
# Use model profile
|
|
1161
|
+
cdc ask -m fast "quick question" # Uses Haiku
|
|
1162
|
+
cdc ask -m fast-local "question" # Uses Mistral (FREE)
|
|
1163
|
+
|
|
1164
|
+
# Use specific model ID
|
|
1165
|
+
cdc ask -m claude-opus-4-20250514 "complex task"
|
|
1166
|
+
cdc ask -m gpt-4-turbo "openai task"
|
|
1167
|
+
```
|
|
909
1168
|
|
|
910
1169
|
## Examples
|
|
911
1170
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "claude-dev-cli"
|
|
7
|
-
version = "0.16.
|
|
7
|
+
version = "0.16.2"
|
|
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"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-dev-cli
|
|
3
|
-
Version: 0.16.
|
|
3
|
+
Version: 0.16.2
|
|
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
|
|
@@ -175,6 +175,17 @@ A powerful command-line tool for developers using Claude AI with multi-API routi
|
|
|
175
175
|
- **Project Memory**: Remember preferences per project
|
|
176
176
|
- **Global Config**: Set context defaults in `~/.claude-dev-cli/config.json`
|
|
177
177
|
|
|
178
|
+
### 🔄 Workflows (v0.7.0+, Enhanced v0.16.1)
|
|
179
|
+
- **Multi-Step Automation**: Chain AI operations and shell commands with YAML
|
|
180
|
+
- **AI Decision Making**: Use `ask` command to make intelligent workflow decisions (v0.16.1)
|
|
181
|
+
- **Variable Interpolation**: Pass data between steps with `{{variable}}` syntax
|
|
182
|
+
- **Conditional Execution**: Skip steps based on conditions with `if` clauses
|
|
183
|
+
- **Approval Gates**: Human-in-the-loop with `approval_required: true`
|
|
184
|
+
- **Model Selection**: Use different AI models per step for cost optimization (v0.16.1)
|
|
185
|
+
- **Error Handling**: Continue on failure with `continue_on_error: true`
|
|
186
|
+
- **Three Step Types**: command (cdc), shell (bash/zsh), set (variables)
|
|
187
|
+
- **Cost Optimization**: Mix free local AI with paid cloud AI strategically
|
|
188
|
+
|
|
178
189
|
### 🎒 TOON Format Support (Optional)
|
|
179
190
|
- **Token Reduction**: 30-60% fewer tokens than JSON
|
|
180
191
|
- **Cost Savings**: Reduce API costs significantly
|
|
@@ -770,7 +781,208 @@ cdc history delete 20240109_143022
|
|
|
770
781
|
- Reduces API costs by ~30-50% in long conversations
|
|
771
782
|
- Shows token savings after summarization
|
|
772
783
|
|
|
773
|
-
### 7.
|
|
784
|
+
### 7. Workflows - AI-Powered Automation (v0.7.0+, Enhanced v0.16.1)
|
|
785
|
+
|
|
786
|
+
Chain multiple AI operations into automated sequences with YAML workflows.
|
|
787
|
+
|
|
788
|
+
#### Basic Workflow Usage
|
|
789
|
+
|
|
790
|
+
```bash
|
|
791
|
+
# Run a workflow
|
|
792
|
+
cdc workflow run my-workflow.yaml
|
|
793
|
+
|
|
794
|
+
# Pass variables
|
|
795
|
+
cdc workflow run workflow.yaml --var file=main.py --var api=local
|
|
796
|
+
|
|
797
|
+
# List available workflows
|
|
798
|
+
cdc workflow list
|
|
799
|
+
|
|
800
|
+
# Show workflow details
|
|
801
|
+
cdc workflow show workflow.yaml
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
#### Example: Simple Review & Test Workflow
|
|
805
|
+
|
|
806
|
+
```yaml
|
|
807
|
+
name: "Review and Test"
|
|
808
|
+
description: "Review code and generate tests"
|
|
809
|
+
|
|
810
|
+
steps:
|
|
811
|
+
- name: code-review
|
|
812
|
+
command: review
|
|
813
|
+
args:
|
|
814
|
+
file: "{{target_file}}"
|
|
815
|
+
api: "local" # Use FREE local AI
|
|
816
|
+
model: "smart-local"
|
|
817
|
+
output_var: review_result
|
|
818
|
+
|
|
819
|
+
- name: generate-tests
|
|
820
|
+
command: generate tests
|
|
821
|
+
args:
|
|
822
|
+
file: "{{target_file}}"
|
|
823
|
+
api: "local"
|
|
824
|
+
model: "code-local"
|
|
825
|
+
output_var: tests
|
|
826
|
+
|
|
827
|
+
- name: run-tests
|
|
828
|
+
shell: "pytest tests/"
|
|
829
|
+
continue_on_error: true
|
|
830
|
+
```
|
|
831
|
+
|
|
832
|
+
**Run it:**
|
|
833
|
+
```bash
|
|
834
|
+
cdc workflow run review-test.yaml --var target_file=app.py
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
#### Example: AI Decision Making (NEW in v0.16.1)
|
|
838
|
+
|
|
839
|
+
Use the `ask` command to make intelligent workflow decisions:
|
|
840
|
+
|
|
841
|
+
```yaml
|
|
842
|
+
name: "Adaptive Code Analysis"
|
|
843
|
+
description: "AI analyzes code complexity and adapts workflow"
|
|
844
|
+
|
|
845
|
+
steps:
|
|
846
|
+
# AI rates complexity
|
|
847
|
+
- name: check-complexity
|
|
848
|
+
command: ask
|
|
849
|
+
args:
|
|
850
|
+
prompt: "Rate this code complexity 1-10, respond with number only: {{code}}"
|
|
851
|
+
api: "local" # FREE
|
|
852
|
+
model: "fast-local"
|
|
853
|
+
output_var: complexity
|
|
854
|
+
|
|
855
|
+
# Conditional deep review for complex code
|
|
856
|
+
- name: deep-review
|
|
857
|
+
command: review
|
|
858
|
+
args:
|
|
859
|
+
file: "{{file}}"
|
|
860
|
+
api: "personal" # Use paid API for complex code
|
|
861
|
+
model: "powerful"
|
|
862
|
+
if: "{{complexity}} > 7"
|
|
863
|
+
approval_required: true # Ask before using paid API
|
|
864
|
+
|
|
865
|
+
# Simple refactor for medium complexity
|
|
866
|
+
- name: simple-refactor
|
|
867
|
+
command: refactor
|
|
868
|
+
args:
|
|
869
|
+
file: "{{file}}"
|
|
870
|
+
api: "local" # FREE
|
|
871
|
+
if: "{{complexity}} >= 5 and {{complexity}} <= 7"
|
|
872
|
+
```
|
|
873
|
+
|
|
874
|
+
**Key Features:**
|
|
875
|
+
- ✨ `ask` command for AI queries
|
|
876
|
+
- 💰 Mix free local and paid cloud AI
|
|
877
|
+
- 🎯 Conditional execution based on AI responses
|
|
878
|
+
- ✋ Approval gates before expensive operations
|
|
879
|
+
|
|
880
|
+
#### Example: Cost-Optimized Workflow
|
|
881
|
+
|
|
882
|
+
```yaml
|
|
883
|
+
name: "Smart Cost Optimization"
|
|
884
|
+
description: "Use local AI first, cloud only when critical"
|
|
885
|
+
|
|
886
|
+
steps:
|
|
887
|
+
# Quick scan with FREE local AI
|
|
888
|
+
- name: quick-scan
|
|
889
|
+
command: ask
|
|
890
|
+
args:
|
|
891
|
+
prompt: "Quick scan for obvious issues: {{code}}"
|
|
892
|
+
api: "local" # FREE
|
|
893
|
+
model: "fast-local"
|
|
894
|
+
output_var: issues
|
|
895
|
+
|
|
896
|
+
# Only use expensive cloud AI if critical issues found
|
|
897
|
+
- name: deep-security-analysis
|
|
898
|
+
command: ask
|
|
899
|
+
args:
|
|
900
|
+
prompt: "Deep security analysis: {{code}}"
|
|
901
|
+
api: "personal" # PAID
|
|
902
|
+
model: "powerful" # Claude Opus - expensive
|
|
903
|
+
system: "You are a security expert"
|
|
904
|
+
if: "{{issues}} contains 'critical' or {{issues}} contains 'security'"
|
|
905
|
+
approval_required: true
|
|
906
|
+
|
|
907
|
+
# Tests with local code-specialized model (FREE)
|
|
908
|
+
- name: generate-tests
|
|
909
|
+
command: generate tests
|
|
910
|
+
args:
|
|
911
|
+
file: "{{file}}"
|
|
912
|
+
api: "local" # FREE
|
|
913
|
+
model: "code-local"
|
|
914
|
+
```
|
|
915
|
+
|
|
916
|
+
**Cost Savings:**
|
|
917
|
+
- Local AI for initial scans: $0
|
|
918
|
+
- Cloud AI only when needed: saves 70-90%
|
|
919
|
+
- Approval gates prevent accidental costs
|
|
920
|
+
|
|
921
|
+
#### Workflow Step Types
|
|
922
|
+
|
|
923
|
+
**1. Command Steps (cdc commands)**
|
|
924
|
+
```yaml
|
|
925
|
+
- name: review-code
|
|
926
|
+
command: review # or: generate tests, debug, refactor, etc.
|
|
927
|
+
args:
|
|
928
|
+
file: "{{file}}"
|
|
929
|
+
api: "local"
|
|
930
|
+
model: "smart-local"
|
|
931
|
+
output_var: result
|
|
932
|
+
```
|
|
933
|
+
|
|
934
|
+
**Supported commands:** `review`, `generate tests`, `generate docs`, `refactor`, `debug`, `git commit`, `ask` (v0.16.1)
|
|
935
|
+
|
|
936
|
+
**2. Shell Steps (any command)**
|
|
937
|
+
```yaml
|
|
938
|
+
- name: run-tests
|
|
939
|
+
shell: "pytest tests/ -v"
|
|
940
|
+
output_var: test_output
|
|
941
|
+
continue_on_error: true
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
**3. Set Steps (variables)**
|
|
945
|
+
```yaml
|
|
946
|
+
- name: set-config
|
|
947
|
+
set: api_endpoint
|
|
948
|
+
value: "https://api.example.com"
|
|
949
|
+
```
|
|
950
|
+
|
|
951
|
+
#### Advanced Features
|
|
952
|
+
|
|
953
|
+
**Conditional Execution:**
|
|
954
|
+
```yaml
|
|
955
|
+
if: "{{score}} > 7" # Simple comparison
|
|
956
|
+
if: "{{result}} contains 'error'" # String matching
|
|
957
|
+
if: "{{tests.success}}" # Access step results
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
**Approval Gates:**
|
|
961
|
+
```yaml
|
|
962
|
+
approval_required: true # Pause for user confirmation
|
|
963
|
+
```
|
|
964
|
+
|
|
965
|
+
**Error Handling:**
|
|
966
|
+
```yaml
|
|
967
|
+
continue_on_error: true # Don't stop workflow on failure
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
**Variable Interpolation:**
|
|
971
|
+
```yaml
|
|
972
|
+
{{variable}} # Simple variable
|
|
973
|
+
{{step_name.output}} # Step output
|
|
974
|
+
{{step_name.success}} # Step success status
|
|
975
|
+
```
|
|
976
|
+
|
|
977
|
+
#### Example Workflows Included
|
|
978
|
+
|
|
979
|
+
**Location:** `examples/workflows/`
|
|
980
|
+
|
|
981
|
+
1. **review-and-refactor.yaml** - Basic review workflow
|
|
982
|
+
2. **ai-decision-workflow.yaml** - AI-powered decisions (v0.16.1)
|
|
983
|
+
3. **multi-model-workflow.yaml** - Cost optimization (v0.16.1)
|
|
984
|
+
|
|
985
|
+
### 8. Usage Tracking
|
|
774
986
|
|
|
775
987
|
```bash
|
|
776
988
|
# View all usage
|
|
@@ -783,7 +995,7 @@ cdc usage --days 7
|
|
|
783
995
|
cdc usage --api client
|
|
784
996
|
```
|
|
785
997
|
|
|
786
|
-
###
|
|
998
|
+
### 9. TOON Format (Optional - Reduces Tokens by 30-60%)
|
|
787
999
|
|
|
788
1000
|
```bash
|
|
789
1001
|
# Check if TOON is installed
|
|
@@ -952,6 +1164,31 @@ When using a client's Enterprise API:
|
|
|
952
1164
|
|---------|-------------|
|
|
953
1165
|
| `cdc git commit` | Generate commit message |
|
|
954
1166
|
|
|
1167
|
+
### Workflows (v0.7.0+)
|
|
1168
|
+
|
|
1169
|
+
| Command | Description |
|
|
1170
|
+
|---------|-------------|
|
|
1171
|
+
| `cdc workflow run <file>` | Execute workflow from YAML |
|
|
1172
|
+
| `cdc workflow list` | List available workflows |
|
|
1173
|
+
| `cdc workflow show <file>` | Show workflow details |
|
|
1174
|
+
|
|
1175
|
+
### Ollama (Local AI) (v0.16.0+)
|
|
1176
|
+
|
|
1177
|
+
| Command | Description |
|
|
1178
|
+
|---------|-------------|
|
|
1179
|
+
| `cdc ollama list` | List local models |
|
|
1180
|
+
| `cdc ollama pull <model>` | Download model |
|
|
1181
|
+
| `cdc ollama show <model>` | Show model details |
|
|
1182
|
+
|
|
1183
|
+
### Model Profiles (v0.10.0+)
|
|
1184
|
+
|
|
1185
|
+
| Command | Description |
|
|
1186
|
+
|---------|-------------|
|
|
1187
|
+
| `cdc model list` | List all model profiles |
|
|
1188
|
+
| `cdc model show <name>` | Show profile details |
|
|
1189
|
+
| `cdc model add <name> <model_id>` | Add custom profile |
|
|
1190
|
+
| `cdc model set-default <name>` | Set default profile |
|
|
1191
|
+
|
|
955
1192
|
## Options
|
|
956
1193
|
|
|
957
1194
|
### Common Options
|
|
@@ -962,11 +1199,33 @@ When using a client's Enterprise API:
|
|
|
962
1199
|
- `-f, --file <path>`: Include file in prompt
|
|
963
1200
|
- `-o, --output <path>`: Save output to file
|
|
964
1201
|
|
|
965
|
-
###
|
|
1202
|
+
### Model Profiles
|
|
1203
|
+
|
|
1204
|
+
**Anthropic (Claude):**
|
|
1205
|
+
- `fast` / `claude-3-5-haiku-20241022` - Fast & economical ($0.80/$4 per Mtok)
|
|
1206
|
+
- `smart` / `claude-sonnet-4-5-20250929` - Balanced (default) ($3/$15 per Mtok)
|
|
1207
|
+
- `powerful` / `claude-opus-4-20250514` - Most capable ($15/$75 per Mtok)
|
|
1208
|
+
|
|
1209
|
+
**OpenAI (GPT):** (requires `pip install 'claude-dev-cli[openai]'`)
|
|
1210
|
+
- `fast-openai` / `gpt-3.5-turbo` - Fast & cheap ($0.50/$1.50 per Mtok)
|
|
1211
|
+
- `smart-openai` / `gpt-4-turbo` - Balanced ($10/$30 per Mtok)
|
|
1212
|
+
- `powerful-openai` / `gpt-4` - High capability ($30/$60 per Mtok)
|
|
1213
|
+
|
|
1214
|
+
**Ollama (Local - FREE):** (requires `pip install 'claude-dev-cli[ollama]'`)
|
|
1215
|
+
- `fast-local` / `mistral` - Fast inference (8k context, FREE)
|
|
1216
|
+
- `smart-local` / `mixtral` - Powerful reasoning (32k context, FREE)
|
|
1217
|
+
- `code-local` / `codellama` - Code specialist (16k context, FREE)
|
|
966
1218
|
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1219
|
+
**Usage:**
|
|
1220
|
+
```bash
|
|
1221
|
+
# Use model profile
|
|
1222
|
+
cdc ask -m fast "quick question" # Uses Haiku
|
|
1223
|
+
cdc ask -m fast-local "question" # Uses Mistral (FREE)
|
|
1224
|
+
|
|
1225
|
+
# Use specific model ID
|
|
1226
|
+
cdc ask -m claude-opus-4-20250514 "complex task"
|
|
1227
|
+
cdc ask -m gpt-4-turbo "openai task"
|
|
1228
|
+
```
|
|
970
1229
|
|
|
971
1230
|
## Examples
|
|
972
1231
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/plugins/diff_editor/__init__.py
RENAMED
|
File without changes
|
{claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/plugins/diff_editor/plugin.py
RENAMED
|
File without changes
|
{claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli/plugins/diff_editor/viewer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{claude_dev_cli-0.16.1 → claude_dev_cli-0.16.2}/src/claude_dev_cli.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|