claude-dev-cli 0.16.1__tar.gz → 0.18.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.
Files changed (71) hide show
  1. {claude_dev_cli-0.16.1/src/claude_dev_cli.egg-info → claude_dev_cli-0.18.0}/PKG-INFO +600 -10
  2. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/README.md +581 -8
  3. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/pyproject.toml +24 -2
  4. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/__init__.py +1 -1
  5. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/cli.py +424 -0
  6. claude_dev_cli-0.18.0/src/claude_dev_cli/logging/__init__.py +6 -0
  7. claude_dev_cli-0.18.0/src/claude_dev_cli/logging/logger.py +84 -0
  8. claude_dev_cli-0.18.0/src/claude_dev_cli/logging/markdown_logger.py +131 -0
  9. claude_dev_cli-0.18.0/src/claude_dev_cli/notifications/__init__.py +6 -0
  10. claude_dev_cli-0.18.0/src/claude_dev_cli/notifications/notifier.py +69 -0
  11. claude_dev_cli-0.18.0/src/claude_dev_cli/notifications/ntfy.py +87 -0
  12. claude_dev_cli-0.18.0/src/claude_dev_cli/project/__init__.py +10 -0
  13. claude_dev_cli-0.18.0/src/claude_dev_cli/project/bug_tracker.py +458 -0
  14. claude_dev_cli-0.18.0/src/claude_dev_cli/project/context_gatherer.py +535 -0
  15. claude_dev_cli-0.18.0/src/claude_dev_cli/project/executor.py +370 -0
  16. claude_dev_cli-0.18.0/src/claude_dev_cli/tickets/__init__.py +7 -0
  17. claude_dev_cli-0.18.0/src/claude_dev_cli/tickets/backend.py +229 -0
  18. claude_dev_cli-0.18.0/src/claude_dev_cli/tickets/markdown.py +309 -0
  19. claude_dev_cli-0.18.0/src/claude_dev_cli/tickets/repo_tickets.py +361 -0
  20. claude_dev_cli-0.18.0/src/claude_dev_cli/vcs/__init__.py +6 -0
  21. claude_dev_cli-0.18.0/src/claude_dev_cli/vcs/git.py +172 -0
  22. claude_dev_cli-0.18.0/src/claude_dev_cli/vcs/manager.py +90 -0
  23. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0/src/claude_dev_cli.egg-info}/PKG-INFO +600 -10
  24. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli.egg-info/SOURCES.txt +17 -0
  25. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli.egg-info/requires.txt +22 -0
  26. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/LICENSE +0 -0
  27. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/MANIFEST.in +0 -0
  28. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/setup.cfg +0 -0
  29. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/commands.py +0 -0
  30. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/config.py +0 -0
  31. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/context.py +0 -0
  32. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/core.py +0 -0
  33. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/history.py +0 -0
  34. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/input_sources.py +0 -0
  35. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/multi_file_handler.py +0 -0
  36. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/path_utils.py +0 -0
  37. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/plugins/__init__.py +0 -0
  38. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/plugins/base.py +0 -0
  39. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/plugins/diff_editor/__init__.py +0 -0
  40. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/plugins/diff_editor/plugin.py +0 -0
  41. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/plugins/diff_editor/viewer.py +0 -0
  42. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/providers/__init__.py +0 -0
  43. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/providers/anthropic.py +0 -0
  44. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/providers/base.py +0 -0
  45. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/providers/factory.py +0 -0
  46. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/providers/ollama.py +0 -0
  47. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/providers/openai.py +0 -0
  48. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/secure_storage.py +0 -0
  49. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/template_manager.py +0 -0
  50. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/templates.py +0 -0
  51. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/toon_utils.py +0 -0
  52. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/usage.py +0 -0
  53. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/warp_integration.py +0 -0
  54. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli/workflows.py +0 -0
  55. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli.egg-info/dependency_links.txt +0 -0
  56. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli.egg-info/entry_points.txt +0 -0
  57. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/src/claude_dev_cli.egg-info/top_level.txt +0 -0
  58. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_cli.py +0 -0
  59. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_commands.py +0 -0
  60. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_config.py +0 -0
  61. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_context.py +0 -0
  62. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_core.py +0 -0
  63. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_diff_editor.py +0 -0
  64. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_history.py +0 -0
  65. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_input_sources.py +0 -0
  66. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_multi_file_handler.py +0 -0
  67. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_path_utils.py +0 -0
  68. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_secure_storage.py +0 -0
  69. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_template_manager.py +0 -0
  70. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_toon_utils.py +0 -0
  71. {claude_dev_cli-0.16.1 → claude_dev_cli-0.18.0}/tests/test_usage.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-dev-cli
3
- Version: 0.16.1
4
- Summary: A powerful CLI tool for developers using Claude AI with multi-API routing, test generation, code review, and usage tracking
3
+ Version: 0.18.0
4
+ Summary: A powerful CLI tool for developers using Claude AI with multi-API routing, test generation, code review, usage tracking, and project management automation
5
5
  Author-email: Julio <thinmanj@users.noreply.github.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/thinmanj/claude-dev-cli
@@ -47,6 +47,23 @@ Requires-Dist: requests>=2.28.0; extra == "local"
47
47
  Provides-Extra: all-providers
48
48
  Requires-Dist: openai>=1.0.0; extra == "all-providers"
49
49
  Requires-Dist: requests>=2.28.0; extra == "all-providers"
50
+ Provides-Extra: project-mgmt
51
+ Requires-Dist: repo-tickets>=0.8.0; extra == "project-mgmt"
52
+ Requires-Dist: python-docx>=0.8.11; extra == "project-mgmt"
53
+ Provides-Extra: notifications
54
+ Requires-Dist: requests>=2.28.0; extra == "notifications"
55
+ Requires-Dist: python-telegram-bot>=20.0; extra == "notifications"
56
+ Provides-Extra: vcs
57
+ Requires-Dist: GitPython>=3.1.0; extra == "vcs"
58
+ Provides-Extra: environment
59
+ Requires-Dist: docker>=6.0.0; extra == "environment"
60
+ Provides-Extra: all-pm
61
+ Requires-Dist: repo-tickets>=0.8.0; extra == "all-pm"
62
+ Requires-Dist: python-docx>=0.8.11; extra == "all-pm"
63
+ Requires-Dist: requests>=2.28.0; extra == "all-pm"
64
+ Requires-Dist: python-telegram-bot>=20.0; extra == "all-pm"
65
+ Requires-Dist: GitPython>=3.1.0; extra == "all-pm"
66
+ Requires-Dist: docker>=6.0.0; extra == "all-pm"
50
67
  Provides-Extra: dev
51
68
  Requires-Dist: pytest>=7.0.0; extra == "dev"
52
69
  Requires-Dist: black>=23.0.0; extra == "dev"
@@ -68,10 +85,113 @@ Dynamic: license-file
68
85
  [![Homebrew](https://img.shields.io/badge/homebrew-available-orange.svg)](https://github.com/thinmanj/homebrew-tap)
69
86
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
70
87
 
71
- A powerful command-line tool for developers using Claude AI with multi-API routing, test generation, code review, and comprehensive usage tracking.
88
+ A powerful command-line tool for developers using Claude AI with multi-API routing, test generation, code review, comprehensive usage tracking, and **AI-powered project automation**.
72
89
 
73
90
  ## Features
74
91
 
92
+ ### 🧠 Intelligent Context Gathering (v0.18.0+) ✨ **NEW**
93
+
94
+ **AI learns your codebase patterns before generating code:**
95
+
96
+ ```bash
97
+ # Automatically gathers context (language, framework, conventions, similar code)
98
+ cdc ticket execute TASK-123 --commit --notify
99
+
100
+ # Skip context gathering for faster execution
101
+ cdc ticket execute TASK-456 --no-context
102
+ ```
103
+
104
+ **What context is gathered:**
105
+ - 🗂️ Language & Framework (Python/Django, JS/React, Go, etc.)
106
+ - 📦 Dependencies (requirements.txt, package.json, go.mod)
107
+ - 📁 Directory Structure (models/, views/, controllers/, tests/)
108
+ - 📝 Naming Conventions (snake_case, camelCase, PascalCase)
109
+ - 🔍 Similar Existing Code (based on ticket keywords)
110
+ - ⚙️ Common Imports & Patterns
111
+
112
+ **Result:** AI generates code that follows YOUR project's patterns, not generic templates!
113
+
114
+ See [CONTEXT_INTELLIGENCE.md](CONTEXT_INTELLIGENCE.md) for full details.
115
+
116
+ ### 🤖 AI-Powered Project Automation (v0.17.0+)
117
+
118
+ **Transform tickets into working code automatically:**
119
+
120
+ ```bash
121
+ # Execute a ticket end-to-end: fetch → analyze → generate code → tests → commit
122
+ cdc ticket execute TASK-123 --commit --notify
123
+ ```
124
+
125
+ **What happens:**
126
+ 1. 📥 Fetches ticket from backend (repo-tickets, Jira, Linear, GitHub Issues)
127
+ 2. 🧠 AI analyzes requirements and acceptance criteria
128
+ 3. 💻 Generates production-ready implementation code
129
+ 4. ✅ Generates comprehensive tests
130
+ 5. 📝 Commits to git with conventional format + co-author
131
+ 6. 🎫 Updates ticket status to "completed"
132
+ 7. 📊 Logs all progress to `.cdc-logs/progress.md`
133
+ 8. 🔔 Sends push notifications (FREE via ntfy.sh)
134
+
135
+ **Ticket Management:**
136
+ ```bash
137
+ # Create tickets
138
+ cdc tickets create "Add user authentication" --priority high --type feature
139
+
140
+ # List tickets
141
+ cdc tickets list --status open
142
+
143
+ # Multi-backend support
144
+ cdc ticket execute TASK-456 --backend repo-tickets
145
+ ```
146
+
147
+ **AI-Powered Bug Triage:**
148
+ ```bash
149
+ # Report bugs with automatic severity/category classification
150
+ cdc bug report \
151
+ --title "App crashes on startup" \
152
+ --description "Application fails to launch" \
153
+ --expected "App should start normally" \
154
+ --actual "App crashes immediately" \
155
+ --steps "Open app" --steps "Wait 2 seconds" \
156
+ --environment production
157
+
158
+ # AI automatically assigns:
159
+ # ✅ Severity: CRITICAL (crash detected)
160
+ # ✅ Category: CRASH
161
+ # ✅ Priority: critical
162
+ # ✅ Sends urgent notification
163
+ # ✅ Detects duplicates
164
+ ```
165
+
166
+ **Progress Tracking:**
167
+ ```bash
168
+ # Initialize logging
169
+ cdc log init "My Project"
170
+
171
+ # Add entries
172
+ cdc log entry "Completed auth module" --ticket TASK-123 --level success
173
+
174
+ # Generate reports
175
+ cdc log report # Beautiful markdown summary with stats
176
+ ```
177
+
178
+ **Features:**
179
+ - 🎫 **Ticket Backends**: repo-tickets, Jira, Linear, GitHub Issues, Markdown (fallback)
180
+ - 🤖 **Full AI Automation**: Requirements → Code → Tests → Commit → Deploy
181
+ - 🐛 **Smart Bug Triage**: AI classifies severity, category, priority
182
+ - 📊 **Progress Logging**: Markdown-based tracking with artifact linking
183
+ - 🔔 **Notifications**: FREE push notifications via ntfy.sh (no signup!)
184
+ - 🔄 **VCS Integration**: Git commits with co-author attribution
185
+ - 📝 **Structured Data**: BDD scenarios, acceptance criteria, stack traces
186
+ - 🔍 **Duplicate Detection**: Find similar bugs automatically
187
+ - ⚡ **Cost Optimization**: Use FREE local AI (Ollama) for code generation
188
+
189
+ **Install with project management:**
190
+ ```bash
191
+ pip install 'claude-dev-cli[all-pm]' # All project management features
192
+ pip install 'claude-dev-cli[project-mgmt]' # Ticket management only
193
+ ```
194
+
75
195
  ### 🌐 Multi-Provider AI Support (v0.14.0+)
76
196
  - **Anthropic (Claude)**: GPT-4 class models with 200k context
77
197
  - Haiku, Sonnet, Opus - full model family
@@ -175,6 +295,17 @@ A powerful command-line tool for developers using Claude AI with multi-API routi
175
295
  - **Project Memory**: Remember preferences per project
176
296
  - **Global Config**: Set context defaults in `~/.claude-dev-cli/config.json`
177
297
 
298
+ ### 🔄 Workflows (v0.7.0+, Enhanced v0.16.1)
299
+ - **Multi-Step Automation**: Chain AI operations and shell commands with YAML
300
+ - **AI Decision Making**: Use `ask` command to make intelligent workflow decisions (v0.16.1)
301
+ - **Variable Interpolation**: Pass data between steps with `{{variable}}` syntax
302
+ - **Conditional Execution**: Skip steps based on conditions with `if` clauses
303
+ - **Approval Gates**: Human-in-the-loop with `approval_required: true`
304
+ - **Model Selection**: Use different AI models per step for cost optimization (v0.16.1)
305
+ - **Error Handling**: Continue on failure with `continue_on_error: true`
306
+ - **Three Step Types**: command (cdc), shell (bash/zsh), set (variables)
307
+ - **Cost Optimization**: Mix free local AI with paid cloud AI strategically
308
+
178
309
  ### 🎒 TOON Format Support (Optional)
179
310
  - **Token Reduction**: 30-60% fewer tokens than JSON
180
311
  - **Cost Savings**: Reduce API costs significantly
@@ -251,6 +382,30 @@ pip install 'claude-dev-cli[toon]'
251
382
  Adds:
252
383
  - `toon-format>=0.1.0` - TOON encoding/decoding
253
384
 
385
+ **Project Management** (v0.17.0+ - ticket automation, bug triage):
386
+
387
+ ```bash
388
+ # Core project management (tickets, logging)
389
+ pip install 'claude-dev-cli[project-mgmt]'
390
+
391
+ # With notifications
392
+ pip install 'claude-dev-cli[notifications]'
393
+
394
+ # With VCS integration
395
+ pip install 'claude-dev-cli[vcs]'
396
+
397
+ # All project management features
398
+ pip install 'claude-dev-cli[all-pm]'
399
+ ```
400
+
401
+ Adds:
402
+ - `repo-tickets>=0.8.0` - Ticket management backend
403
+ - `python-docx>=0.8.11` - Document processing
404
+ - `requests>=2.28.0` - HTTP client for notifications
405
+ - `python-telegram-bot>=20.0` - Telegram notifications (optional)
406
+ - `GitPython>=3.1.0` - Git integration
407
+ - `docker>=6.0.0` - Docker environment support
408
+
254
409
  **Syntax Highlighting** (enhanced diff display):
255
410
 
256
411
  ```bash
@@ -263,7 +418,7 @@ Adds:
263
418
  **All Optional Features**:
264
419
 
265
420
  ```bash
266
- pip install 'claude-dev-cli[generation,toon,plugins]'
421
+ pip install 'claude-dev-cli[generation,toon,plugins,all-pm]'
267
422
  ```
268
423
 
269
424
  **Development Installation** (for contributors):
@@ -770,7 +925,208 @@ cdc history delete 20240109_143022
770
925
  - Reduces API costs by ~30-50% in long conversations
771
926
  - Shows token savings after summarization
772
927
 
773
- ### 7. Usage Tracking
928
+ ### 7. Workflows - AI-Powered Automation (v0.7.0+, Enhanced v0.16.1)
929
+
930
+ Chain multiple AI operations into automated sequences with YAML workflows.
931
+
932
+ #### Basic Workflow Usage
933
+
934
+ ```bash
935
+ # Run a workflow
936
+ cdc workflow run my-workflow.yaml
937
+
938
+ # Pass variables
939
+ cdc workflow run workflow.yaml --var file=main.py --var api=local
940
+
941
+ # List available workflows
942
+ cdc workflow list
943
+
944
+ # Show workflow details
945
+ cdc workflow show workflow.yaml
946
+ ```
947
+
948
+ #### Example: Simple Review & Test Workflow
949
+
950
+ ```yaml
951
+ name: "Review and Test"
952
+ description: "Review code and generate tests"
953
+
954
+ steps:
955
+ - name: code-review
956
+ command: review
957
+ args:
958
+ file: "{{target_file}}"
959
+ api: "local" # Use FREE local AI
960
+ model: "smart-local"
961
+ output_var: review_result
962
+
963
+ - name: generate-tests
964
+ command: generate tests
965
+ args:
966
+ file: "{{target_file}}"
967
+ api: "local"
968
+ model: "code-local"
969
+ output_var: tests
970
+
971
+ - name: run-tests
972
+ shell: "pytest tests/"
973
+ continue_on_error: true
974
+ ```
975
+
976
+ **Run it:**
977
+ ```bash
978
+ cdc workflow run review-test.yaml --var target_file=app.py
979
+ ```
980
+
981
+ #### Example: AI Decision Making (NEW in v0.16.1)
982
+
983
+ Use the `ask` command to make intelligent workflow decisions:
984
+
985
+ ```yaml
986
+ name: "Adaptive Code Analysis"
987
+ description: "AI analyzes code complexity and adapts workflow"
988
+
989
+ steps:
990
+ # AI rates complexity
991
+ - name: check-complexity
992
+ command: ask
993
+ args:
994
+ prompt: "Rate this code complexity 1-10, respond with number only: {{code}}"
995
+ api: "local" # FREE
996
+ model: "fast-local"
997
+ output_var: complexity
998
+
999
+ # Conditional deep review for complex code
1000
+ - name: deep-review
1001
+ command: review
1002
+ args:
1003
+ file: "{{file}}"
1004
+ api: "personal" # Use paid API for complex code
1005
+ model: "powerful"
1006
+ if: "{{complexity}} > 7"
1007
+ approval_required: true # Ask before using paid API
1008
+
1009
+ # Simple refactor for medium complexity
1010
+ - name: simple-refactor
1011
+ command: refactor
1012
+ args:
1013
+ file: "{{file}}"
1014
+ api: "local" # FREE
1015
+ if: "{{complexity}} >= 5 and {{complexity}} <= 7"
1016
+ ```
1017
+
1018
+ **Key Features:**
1019
+ - ✨ `ask` command for AI queries
1020
+ - 💰 Mix free local and paid cloud AI
1021
+ - 🎯 Conditional execution based on AI responses
1022
+ - ✋ Approval gates before expensive operations
1023
+
1024
+ #### Example: Cost-Optimized Workflow
1025
+
1026
+ ```yaml
1027
+ name: "Smart Cost Optimization"
1028
+ description: "Use local AI first, cloud only when critical"
1029
+
1030
+ steps:
1031
+ # Quick scan with FREE local AI
1032
+ - name: quick-scan
1033
+ command: ask
1034
+ args:
1035
+ prompt: "Quick scan for obvious issues: {{code}}"
1036
+ api: "local" # FREE
1037
+ model: "fast-local"
1038
+ output_var: issues
1039
+
1040
+ # Only use expensive cloud AI if critical issues found
1041
+ - name: deep-security-analysis
1042
+ command: ask
1043
+ args:
1044
+ prompt: "Deep security analysis: {{code}}"
1045
+ api: "personal" # PAID
1046
+ model: "powerful" # Claude Opus - expensive
1047
+ system: "You are a security expert"
1048
+ if: "{{issues}} contains 'critical' or {{issues}} contains 'security'"
1049
+ approval_required: true
1050
+
1051
+ # Tests with local code-specialized model (FREE)
1052
+ - name: generate-tests
1053
+ command: generate tests
1054
+ args:
1055
+ file: "{{file}}"
1056
+ api: "local" # FREE
1057
+ model: "code-local"
1058
+ ```
1059
+
1060
+ **Cost Savings:**
1061
+ - Local AI for initial scans: $0
1062
+ - Cloud AI only when needed: saves 70-90%
1063
+ - Approval gates prevent accidental costs
1064
+
1065
+ #### Workflow Step Types
1066
+
1067
+ **1. Command Steps (cdc commands)**
1068
+ ```yaml
1069
+ - name: review-code
1070
+ command: review # or: generate tests, debug, refactor, etc.
1071
+ args:
1072
+ file: "{{file}}"
1073
+ api: "local"
1074
+ model: "smart-local"
1075
+ output_var: result
1076
+ ```
1077
+
1078
+ **Supported commands:** `review`, `generate tests`, `generate docs`, `refactor`, `debug`, `git commit`, `ask` (v0.16.1)
1079
+
1080
+ **2. Shell Steps (any command)**
1081
+ ```yaml
1082
+ - name: run-tests
1083
+ shell: "pytest tests/ -v"
1084
+ output_var: test_output
1085
+ continue_on_error: true
1086
+ ```
1087
+
1088
+ **3. Set Steps (variables)**
1089
+ ```yaml
1090
+ - name: set-config
1091
+ set: api_endpoint
1092
+ value: "https://api.example.com"
1093
+ ```
1094
+
1095
+ #### Advanced Features
1096
+
1097
+ **Conditional Execution:**
1098
+ ```yaml
1099
+ if: "{{score}} > 7" # Simple comparison
1100
+ if: "{{result}} contains 'error'" # String matching
1101
+ if: "{{tests.success}}" # Access step results
1102
+ ```
1103
+
1104
+ **Approval Gates:**
1105
+ ```yaml
1106
+ approval_required: true # Pause for user confirmation
1107
+ ```
1108
+
1109
+ **Error Handling:**
1110
+ ```yaml
1111
+ continue_on_error: true # Don't stop workflow on failure
1112
+ ```
1113
+
1114
+ **Variable Interpolation:**
1115
+ ```yaml
1116
+ {{variable}} # Simple variable
1117
+ {{step_name.output}} # Step output
1118
+ {{step_name.success}} # Step success status
1119
+ ```
1120
+
1121
+ #### Example Workflows Included
1122
+
1123
+ **Location:** `examples/workflows/`
1124
+
1125
+ 1. **review-and-refactor.yaml** - Basic review workflow
1126
+ 2. **ai-decision-workflow.yaml** - AI-powered decisions (v0.16.1)
1127
+ 3. **multi-model-workflow.yaml** - Cost optimization (v0.16.1)
1128
+
1129
+ ### 8. Usage Tracking
774
1130
 
775
1131
  ```bash
776
1132
  # View all usage
@@ -783,7 +1139,7 @@ cdc usage --days 7
783
1139
  cdc usage --api client
784
1140
  ```
785
1141
 
786
- ### 7. TOON Format (Optional - Reduces Tokens by 30-60%)
1142
+ ### 9. TOON Format (Optional - Reduces Tokens by 30-60%)
787
1143
 
788
1144
  ```bash
789
1145
  # Check if TOON is installed
@@ -952,6 +1308,31 @@ When using a client's Enterprise API:
952
1308
  |---------|-------------|
953
1309
  | `cdc git commit` | Generate commit message |
954
1310
 
1311
+ ### Workflows (v0.7.0+)
1312
+
1313
+ | Command | Description |
1314
+ |---------|-------------|
1315
+ | `cdc workflow run <file>` | Execute workflow from YAML |
1316
+ | `cdc workflow list` | List available workflows |
1317
+ | `cdc workflow show <file>` | Show workflow details |
1318
+
1319
+ ### Ollama (Local AI) (v0.16.0+)
1320
+
1321
+ | Command | Description |
1322
+ |---------|-------------|
1323
+ | `cdc ollama list` | List local models |
1324
+ | `cdc ollama pull <model>` | Download model |
1325
+ | `cdc ollama show <model>` | Show model details |
1326
+
1327
+ ### Model Profiles (v0.10.0+)
1328
+
1329
+ | Command | Description |
1330
+ |---------|-------------|
1331
+ | `cdc model list` | List all model profiles |
1332
+ | `cdc model show <name>` | Show profile details |
1333
+ | `cdc model add <name> <model_id>` | Add custom profile |
1334
+ | `cdc model set-default <name>` | Set default profile |
1335
+
955
1336
  ## Options
956
1337
 
957
1338
  ### Common Options
@@ -962,11 +1343,33 @@ When using a client's Enterprise API:
962
1343
  - `-f, --file <path>`: Include file in prompt
963
1344
  - `-o, --output <path>`: Save output to file
964
1345
 
965
- ### Models
1346
+ ### Model Profiles
1347
+
1348
+ **Anthropic (Claude):**
1349
+ - `fast` / `claude-3-5-haiku-20241022` - Fast & economical ($0.80/$4 per Mtok)
1350
+ - `smart` / `claude-sonnet-4-5-20250929` - Balanced (default) ($3/$15 per Mtok)
1351
+ - `powerful` / `claude-opus-4-20250514` - Most capable ($15/$75 per Mtok)
1352
+
1353
+ **OpenAI (GPT):** (requires `pip install 'claude-dev-cli[openai]'`)
1354
+ - `fast-openai` / `gpt-3.5-turbo` - Fast & cheap ($0.50/$1.50 per Mtok)
1355
+ - `smart-openai` / `gpt-4-turbo` - Balanced ($10/$30 per Mtok)
1356
+ - `powerful-openai` / `gpt-4` - High capability ($30/$60 per Mtok)
966
1357
 
967
- - `claude-3-5-sonnet-20241022` (default)
968
- - `claude-3-opus-20240229`
969
- - `claude-3-haiku-20240307`
1358
+ **Ollama (Local - FREE):** (requires `pip install 'claude-dev-cli[ollama]'`)
1359
+ - `fast-local` / `mistral` - Fast inference (8k context, FREE)
1360
+ - `smart-local` / `mixtral` - Powerful reasoning (32k context, FREE)
1361
+ - `code-local` / `codellama` - Code specialist (16k context, FREE)
1362
+
1363
+ **Usage:**
1364
+ ```bash
1365
+ # Use model profile
1366
+ cdc ask -m fast "quick question" # Uses Haiku
1367
+ cdc ask -m fast-local "question" # Uses Mistral (FREE)
1368
+
1369
+ # Use specific model ID
1370
+ cdc ask -m claude-opus-4-20250514 "complex task"
1371
+ cdc ask -m gpt-4-turbo "openai task"
1372
+ ```
970
1373
 
971
1374
  ## Examples
972
1375
 
@@ -1015,6 +1418,193 @@ cdc usage --api personal
1015
1418
  cdc usage --api client
1016
1419
  ```
1017
1420
 
1421
+ ### Project Management & Automation (v0.17.0+)
1422
+
1423
+ #### Automated Ticket Execution
1424
+
1425
+ ```bash
1426
+ # Create a ticket
1427
+ cdc tickets create "Implement user authentication API" \
1428
+ --description "JWT-based auth with email/password" \
1429
+ --priority high \
1430
+ --type feature
1431
+
1432
+ # Output: Created ticket: TASK-A1B2C3D4
1433
+
1434
+ # Execute the ticket with full AI automation
1435
+ cdc ticket execute TASK-A1B2C3D4 --commit --notify
1436
+
1437
+ # What happens:
1438
+ # 1. 📥 Fetches ticket and analyzes requirements
1439
+ # 2. 🧠 AI generates implementation plan
1440
+ # 3. 💻 Generates api/auth.py with login endpoint
1441
+ # 4. ✅ Generates tests/test_auth.py with all acceptance criteria
1442
+ # 5. 📝 Commits: "feat(TASK-A1B2C3D4): Implement user authentication API"
1443
+ # 6. 🎫 Updates ticket status to "completed"
1444
+ # 7. 📊 Logs to .cdc-logs/progress.md
1445
+ # 8. 🔔 Sends push notification
1446
+
1447
+ # Review progress
1448
+ cdc log report
1449
+ ```
1450
+
1451
+ #### Bug Reporting with AI Triage
1452
+
1453
+ ```bash
1454
+ # Report a bug - AI automatically classifies it
1455
+ cdc bug report \
1456
+ --title "App crashes when email contains + character" \
1457
+ --description "Users with + in email address cannot login" \
1458
+ --expected "All valid email addresses should work" \
1459
+ --actual "Server returns 500 error for emails with +" \
1460
+ --steps "Enter email test+user@example.com" \
1461
+ --steps "Click login" \
1462
+ --steps "App crashes" \
1463
+ --environment production
1464
+
1465
+ # AI automatically:
1466
+ # ✅ Severity: HIGH (functionality broken)
1467
+ # ✅ Category: FUNCTIONALITY
1468
+ # ✅ Priority: high
1469
+ # ✅ Creates ticket: BUG-XYZ123
1470
+ # ✅ Checks for duplicates
1471
+ # ✅ Sends notification if critical
1472
+
1473
+ # List all bugs
1474
+ cdc tickets list --status open
1475
+
1476
+ # Execute bug fix
1477
+ cdc ticket execute BUG-XYZ123 --commit
1478
+ ```
1479
+
1480
+ #### Progress Tracking
1481
+
1482
+ ```bash
1483
+ # Initialize logging for a project
1484
+ cdc log init "E-Commerce Platform"
1485
+
1486
+ # Add manual log entries
1487
+ cdc log entry "Started authentication module" --level info
1488
+ cdc log entry "Completed user registration" --ticket TASK-123 --level success
1489
+ cdc log entry "Found issue with password validation" --level warning
1490
+
1491
+ # Generate full progress report
1492
+ cdc log report
1493
+
1494
+ # Output:
1495
+ # # Progress Summary
1496
+ #
1497
+ # **Total Entries:** 15
1498
+ # **Successes:** ✅ 8
1499
+ # **Errors:** ❌ 1
1500
+ #
1501
+ # ## ✅ 2026-02-01 02:30:15
1502
+ # **Ticket:** TASK-123
1503
+ # Completed user registration
1504
+ # ...
1505
+ ```
1506
+
1507
+ #### Using with repo-tickets Backend
1508
+
1509
+ ```bash
1510
+ # Install repo-tickets integration
1511
+ pip install 'claude-dev-cli[all-pm]'
1512
+
1513
+ # Navigate to your project with repo-tickets
1514
+ cd my-project
1515
+ tickets init # Initialize repo-tickets if needed
1516
+
1517
+ # Create a ticket in repo-tickets
1518
+ tickets create "Add payment gateway integration"
1519
+ # Output: Created TICKET-456
1520
+
1521
+ # Execute it with AI
1522
+ cdc ticket execute TICKET-456 --backend repo-tickets --commit --notify
1523
+
1524
+ # AI will:
1525
+ # - Fetch ticket from repo-tickets
1526
+ # - Generate payment gateway code
1527
+ # - Generate tests
1528
+ # - Update repo-tickets status
1529
+ # - Commit to your repo
1530
+ ```
1531
+
1532
+ #### Cost Optimization with Local AI
1533
+
1534
+ ```bash
1535
+ # Use FREE local AI (Ollama) for code generation
1536
+ # Install Ollama first: https://ollama.ai
1537
+
1538
+ # Pull a code model
1539
+ cdc ollama pull codellama
1540
+
1541
+ # Execute ticket with local AI (zero cost!)
1542
+ cdc ticket execute TASK-789 --api local --commit
1543
+
1544
+ # Result: Code generated with $0.00 cost!
1545
+ ```
1546
+
1547
+ #### Notifications Setup
1548
+
1549
+ ```bash
1550
+ # Test notifications (uses ntfy.sh - FREE, no signup!)
1551
+ cdc notify test --topic my-project
1552
+
1553
+ # Check your phone or browser at: https://ntfy.sh/my-project
1554
+ # You'll see: "✅ claude-dev-cli notifications are working!"
1555
+
1556
+ # All ticket executions can send notifications:
1557
+ cdc ticket execute TASK-999 --commit --notify
1558
+
1559
+ # Critical bugs auto-notify:
1560
+ cdc bug report --title "Database connection fails" \
1561
+ --description "Cannot connect to production DB" \
1562
+ --expected "Should connect" \
1563
+ --actual "Connection timeout" \
1564
+ --environment production
1565
+ # 🚨 Sends URGENT notification automatically
1566
+ ```
1567
+
1568
+ #### Complete Workflow Example
1569
+
1570
+ ```bash
1571
+ # 1. Setup
1572
+ pip install 'claude-dev-cli[all-pm]'
1573
+ cdc log init "My Awesome Project"
1574
+
1575
+ # 2. Create tickets for your sprint
1576
+ cdc tickets create "User registration" --priority high
1577
+ cdc tickets create "User login" --priority high
1578
+ cdc tickets create "Password reset" --priority medium
1579
+ cdc tickets create "Email verification" --priority low
1580
+
1581
+ # 3. Execute tickets one by one
1582
+ cdc ticket execute TASK-001 --commit --notify
1583
+ cdc ticket execute TASK-002 --commit --notify
1584
+
1585
+ # 4. Bug is reported
1586
+ cdc bug report \
1587
+ --title "Registration fails for Gmail users" \
1588
+ --description "Gmail addresses rejected" \
1589
+ --expected "Should accept all emails" \
1590
+ --actual "Validation error"
1591
+
1592
+ # 5. Fix the bug
1593
+ cdc ticket execute BUG-001 --commit --notify
1594
+
1595
+ # 6. Review progress
1596
+ cdc log report
1597
+ cdc tickets list
1598
+
1599
+ # 7. All done! 🎉
1600
+ # - Code generated
1601
+ # - Tests written
1602
+ # - Tickets updated
1603
+ # - Commits made
1604
+ # - Team notified
1605
+ # - Progress logged
1606
+ ```
1607
+
1018
1608
  ## Environment Variables
1019
1609
 
1020
1610
  | Variable | Description |