codedd-cli 0.1.0__tar.gz → 0.1.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.
Files changed (56) hide show
  1. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/PKG-INFO +70 -38
  2. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/README.md +64 -35
  3. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/__init__.py +1 -1
  4. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/api/client.py +8 -6
  5. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/api/endpoints.py +2 -0
  6. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/api/exceptions.py +0 -1
  7. codedd_cli-0.1.2/codedd_cli/auditor/architecture_analyzer.py +2189 -0
  8. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/auditor/architecture_prompts.py +72 -2
  9. codedd_cli-0.1.2/codedd_cli/auditor/commit_classifier.py +350 -0
  10. codedd_cli-0.1.2/codedd_cli/auditor/complexity_analyzer.py +2050 -0
  11. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/auditor/dependency_scanner.py +227 -134
  12. codedd_cli-0.1.2/codedd_cli/auditor/enhanced_architecture_detectors.py +381 -0
  13. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/auditor/file_auditor.py +36 -27
  14. codedd_cli-0.1.2/codedd_cli/auditor/git_stats_collector.py +711 -0
  15. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/auditor/response_parser.py +35 -38
  16. codedd_cli-0.1.2/codedd_cli/auditor/sub_audit_runner.py +601 -0
  17. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/auditor/vulnerability_validator.py +101 -43
  18. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/auth/session.py +2 -3
  19. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/auth/token_manager.py +1 -2
  20. codedd_cli-0.1.2/codedd_cli/commands/audit_cmd.py +1291 -0
  21. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/commands/audits_cmd.py +13 -10
  22. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/commands/auth_cmd.py +14 -9
  23. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/commands/config_cmd.py +25 -58
  24. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/commands/scope_cmd.py +346 -58
  25. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/config/__init__.py +1 -1
  26. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/config/constants.py +1 -1
  27. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/config/settings.py +38 -18
  28. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/llm/key_manager.py +3 -7
  29. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/models/audit.py +3 -4
  30. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/models/local_directory.py +0 -1
  31. codedd_cli-0.1.2/codedd_cli/scanner/file_classifier.py +752 -0
  32. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/scanner/file_walker.py +20 -14
  33. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/scanner/line_counter.py +13 -8
  34. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/utils/directory_validator.py +2 -3
  35. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/utils/display.py +313 -19
  36. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/utils/payload_inspector.py +4 -6
  37. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/utils/validators.py +1 -1
  38. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/pyproject.toml +12 -3
  39. codedd_cli-0.1.0/codedd_cli/auditor/architecture_analyzer.py +0 -1241
  40. codedd_cli-0.1.0/codedd_cli/auditor/complexity_analyzer.py +0 -942
  41. codedd_cli-0.1.0/codedd_cli/auditor/git_stats_collector.py +0 -332
  42. codedd_cli-0.1.0/codedd_cli/commands/audit_cmd.py +0 -1877
  43. codedd_cli-0.1.0/codedd_cli/scanner/file_classifier.py +0 -247
  44. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/LICENSE +0 -0
  45. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/__main__.py +0 -0
  46. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/api/__init__.py +0 -0
  47. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/auditor/__init__.py +0 -0
  48. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/auth/__init__.py +1 -1
  49. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/cli.py +2 -2
  50. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/commands/__init__.py +0 -0
  51. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/llm/__init__.py +0 -0
  52. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/models/__init__.py +1 -1
  53. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/models/account.py +0 -0
  54. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/scanner/__init__.py +1 -1
  55. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/utils/__init__.py +0 -0
  56. {codedd_cli-0.1.0 → codedd_cli-0.1.2}/codedd_cli/utils/security.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codedd-cli
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: CLI tool for CodeDD — run code audits from your terminal
5
5
  License: MIT
6
6
  License-File: LICENSE
7
7
  Keywords: code-audit,security,cli,codedd
8
8
  Author: CodeDD
9
- Author-email: support@codedd.ai
9
+ Author-email: info@codedd.ai
10
10
  Requires-Python: >=3.10,<4.0
11
11
  Classifier: Development Status :: 3 - Alpha
12
12
  Classifier: Environment :: Console
@@ -20,6 +20,9 @@ Classifier: Programming Language :: Python :: 3.13
20
20
  Classifier: Programming Language :: Python :: 3.14
21
21
  Classifier: Topic :: Security
22
22
  Classifier: Topic :: Software Development :: Quality Assurance
23
+ Provides-Extra: esprima
24
+ Requires-Dist: defusedxml (>=0.7.1)
25
+ Requires-Dist: esprima (>=4.0.0) ; extra == "esprima"
23
26
  Requires-Dist: httpx (>=0.27.0)
24
27
  Requires-Dist: keyring (>=25.0.0)
25
28
  Requires-Dist: lizard (>=1.17.0)
@@ -29,7 +32,7 @@ Requires-Dist: tomli (>=2.0.0) ; python_version < "3.11"
29
32
  Requires-Dist: tomli-w (>=1.0.0)
30
33
  Requires-Dist: typer[all] (>=0.9.0)
31
34
  Project-URL: Homepage, https://codedd.ai
32
- Project-URL: Repository, https://github.com/codedd/codedd-cli
35
+ Project-URL: Repository, https://gitlab.com/codedd1/codedd-cli
33
36
  Description-Content-Type: text/markdown
34
37
 
35
38
  # CodeDD CLI
@@ -66,18 +69,18 @@ Ideal for teams who want to keep source code local while still using CodeDD’s
66
69
 
67
70
  ### Requirements
68
71
 
69
- - **Python 3.10+**
72
+ - **Python 3.11+**
70
73
  - A [CodeDD](https://codedd.ai) account and a CLI token (Account → CLI Access → Generate Token)
71
74
 
72
75
  ### From source (development)
73
76
 
74
77
  ```bash
75
- git clone https://github.com/codedd/codedd-cli.git
78
+ git clone https://gitlab.com/codedd1/codedd-cli
76
79
  cd codedd-cli
77
80
  pip install -e .
78
81
  ```
79
82
 
80
- ### From PyPI (when available)
83
+ ### From PyPI
81
84
 
82
85
  ```bash
83
86
  pip install codedd-cli
@@ -91,11 +94,11 @@ codedd --version
91
94
 
92
95
  ---
93
96
 
94
- ## Quick start
97
+ ## Quick start (recommended workflow)
95
98
 
96
- ### 1. Authenticate
99
+ ### 1. Authenticate once
97
100
 
98
- Generate a CLI token at [codedd.ai](https://codedd.ai) (Account CLI Access), then:
101
+ Generate a CLI token at [codedd.ai](https://codedd.ai) (Account -> CLI Access), then:
99
102
 
100
103
  ```bash
101
104
  codedd auth login --token <your_token>
@@ -103,18 +106,24 @@ codedd auth login --token <your_token>
103
106
 
104
107
  Or run `codedd auth login` and paste the token when prompted.
105
108
 
106
- ### 2. Select an audit
109
+ Optional sanity check:
110
+
111
+ ```bash
112
+ codedd auth status
113
+ ```
114
+
115
+ ### 2. Select the active audit context
107
116
 
108
117
  ```bash
109
118
  codedd audits list
110
119
  codedd audits select
111
120
  ```
112
121
 
113
- Choose a **group audit** (multiple repos) or a **single audit** (one repo). The selected audit becomes the active context for scope and audit commands.
122
+ Choose a **group audit** (multiple repos) or a **single audit** (one repo). The selected audit becomes the active context used by all `scope` and `audit` commands.
114
123
 
115
- ### 3. Define scope
124
+ ### 3. Define local scope
116
125
 
117
- Add the local paths that correspond to the audit’s repositories (each must be a Git repo root):
126
+ Add local paths that correspond to the repositories in that audit (each path must be a Git repository root with commits):
118
127
 
119
128
  ```bash
120
129
  codedd scope add /path/to/my-repo
@@ -122,18 +131,25 @@ codedd scope list
122
131
  codedd scope confirm
123
132
  ```
124
133
 
125
- `scope confirm` scans the directories, shows a preview (files, LoC), and registers scope with CodeDD. If you change files later, run `codedd audit start` — it will offer to re-sync scope (delta update) before starting.
134
+ `scope confirm` performs a metadata scan (paths, file types, LoC) and registers scope with CodeDD.
135
+ If files change later, `codedd audit start` auto-checks sync and prompts for re-confirmation when needed.
126
136
 
127
- ### 4. Run an audit
137
+ ### 4. Configure LLM key(s)
128
138
 
129
- Configure at least one LLM API key (used for file-level auditing):
139
+ Configure at least one provider key (used for local file-level auditing):
130
140
 
131
141
  ```bash
132
142
  codedd config set-key anthropic
133
143
  # or: codedd config set-key openai
134
144
  ```
135
145
 
136
- Then start the audit:
146
+ Optional (recommended if both are configured):
147
+
148
+ ```bash
149
+ codedd config provider both
150
+ ```
151
+
152
+ ### 5. Start the audit
137
153
 
138
154
  ```bash
139
155
  codedd audit start
@@ -144,7 +160,7 @@ The CLI will:
144
160
  - Sync scope with CodeDD (and prompt to re-confirm if local files changed).
145
161
  - Run pre-flight checks (payment, LoC budget).
146
162
  - Optionally open payment in the browser or deduct from budget.
147
- - Fetch the audit plan, run file auditing and complexity analysis locally, submit results, submit dependencies, submit architecture, and trigger server-side post-processing (consolidation, recommendations, completion email).
163
+ - Fetch the plan, run local analysis, submit structured results, and trigger server-side post-processing.
148
164
 
149
165
  Results and recommendations are available in the CodeDD dashboard; you can also run `codedd audits list` to see status.
150
166
 
@@ -152,22 +168,35 @@ Results and recommendations are available in the CodeDD dashboard; you can also
152
168
 
153
169
  ## Workflow overview
154
170
 
155
- High-level flow:
171
+ Use this exact order for a predictable run:
156
172
 
173
+ ```text
174
+ 1. codedd auth login
175
+ 2. codedd audits select
176
+ 3. codedd scope add <repo-path> [more paths...]
177
+ 4. codedd scope confirm
178
+ 5. codedd config set-key <anthropic|openai> # at least one
179
+ 6. codedd audit start
157
180
  ```
158
- ┌─────────────────────────────────────────────────────────────────────────────┐
159
- │ LOCAL │
160
- │ 1. codedd audits select → Pick audit (group or single) │
161
- │ 2. codedd scope add <path> → Add repo root(s) │
162
- │ 3. codedd scope confirm → Scan & register scope with CodeDD │
163
- │ 4. codedd audit start → Sync (if needed) → Pre-flight → Pay/budget
164
- │ └─ File audit (LLM) → Local │
165
- │ └─ Complexity → Local │
166
- │ └─ Submit results → CodeDD
167
- │ └─ Dependencies → Local scan Submit → CodeDD │
168
- │ └─ Architecture → Local phases → Submit → CodeDD │
169
- │ └─ Complete → CodeDD runs consolidation & recommendations │
170
- └─────────────────────────────────────────────────────────────────────────────┘
181
+
182
+ What `codedd audit start` does, in order:
183
+
184
+ ```text
185
+ A. Auto-sync scope -> if changed, asks to re-confirm
186
+ B. Pre-flight on CodeDD -> checks status/payment/budget
187
+ C. Payment path -> budget deduction OR checkout flow
188
+ D. Local execution -> file audit (LLM), complexity, dependencies, git stats, architecture
189
+ E. Submission -> sends structured outputs to CodeDD
190
+ F. Completion -> triggers server-side consolidation/recommendations
191
+ ```
192
+
193
+ If you update files after confirming scope:
194
+
195
+ ```text
196
+ Run: codedd audit start
197
+ -> CLI detects drift
198
+ -> Re-confirm prompt appears
199
+ -> Continue with updated scope
171
200
  ```
172
201
 
173
202
  | Step | Where it runs | What happens |
@@ -176,8 +205,9 @@ High-level flow:
176
205
  | Pre-flight | CodeDD | Check payment, budget, status. |
177
206
  | File audit | Local | LLM (Anthropic/OpenAI) analyses each file; results sent to CodeDD. |
178
207
  | Complexity | Local | Radon/Lizard; metrics sent to CodeDD. |
179
- | Dependencies | Local + CodeDD| Lockfiles/imports sent; CodeDD does metadata, vulns, licenses. |
180
- | Architecture | Local + CodeDD| Components/relations sent; CodeDD does Phase 3 and storage. |
208
+ | Dependencies | Local + CodeDD| Lockfiles/imports scanned locally; package/vuln data stored and enriched on CodeDD. |
209
+ | Git statistics | Local + CodeDD| Commit/churn/collaboration metrics collected locally, then submitted. |
210
+ | Architecture | Local + CodeDD| Components/relations extracted locally; persisted and processed on CodeDD. |
181
211
  | Recommendations | CodeDD | Consolidation, technical debt, security, licenses, etc. |
182
212
 
183
213
  ---
@@ -215,7 +245,7 @@ High-level flow:
215
245
 
216
246
  | Command | Description |
217
247
  |--------|-------------|
218
- | `codedd audit start` | Sync scope (if needed), pre-flight, pay/budget, then run full local audit and submit to CodeDD. Use `--skip-sync` to skip scope sync; `--yes` to auto-confirm; `--debug-llm` for LLM debug output. |
248
+ | `codedd audit start` | Sync scope (if needed), pre-flight, pay/budget, then run full local audit and submit to CodeDD. Use `--skip-sync` to skip scope sync; `--yes` to auto-confirm; `--show` for one-shot transparency summary; `--show-interactive` for per-request confirmations (debug); `--show-force-interactive` to override large-audit guardrails; `--debug-llm` for LLM debug output. |
219
249
 
220
250
  ### Configuration
221
251
 
@@ -225,6 +255,7 @@ High-level flow:
225
255
  | `codedd config set <key> <value>` | Set a config value |
226
256
  | `codedd config set-key [anthropic\|openai]` | Store an LLM API key in the OS keychain |
227
257
  | `codedd config show-keys` | List which providers have keys configured (not the keys themselves) |
258
+ | `codedd config remove-key <anthropic\|openai>` | Remove a stored LLM API key from keychain |
228
259
  | `codedd config provider [anthropic\|openai\|both]` | Set preferred LLM provider |
229
260
  | `codedd config concurrency <n>` | Set max concurrent LLM requests (default 6) |
230
261
 
@@ -240,7 +271,7 @@ High-level flow:
240
271
  | Variable | Purpose |
241
272
  |---------|---------|
242
273
  | `CODEDD_API_TOKEN` | Override the stored CLI token (e.g. for CI) |
243
- | `CODEDD_API_URL` | Override API base URL (default from config) |
274
+
244
275
 
245
276
  ---
246
277
 
@@ -256,7 +287,8 @@ High-level flow:
256
287
  ## Development
257
288
 
258
289
  ```bash
259
- pip install -e ".[dev]"
290
+ pip install -e .
291
+ pip install pytest pytest-httpx pytest-mock ruff
260
292
  pytest
261
293
  ruff check .
262
294
  ```
@@ -271,6 +303,6 @@ MIT License — see [LICENSE](LICENSE).
271
303
 
272
304
  ## Support
273
305
 
274
- - **Issues:** [GitHub Issues](https://github.com/codedd/codedd-cli/issues)
306
+ - **Issues:** [GitLab Issues](https://gitlab.com/codedd1/codedd-cli/-/work_items)
275
307
  - **Product:** [CodeDD](https://codedd.ai)
276
308
 
@@ -32,18 +32,18 @@ Ideal for teams who want to keep source code local while still using CodeDD’s
32
32
 
33
33
  ### Requirements
34
34
 
35
- - **Python 3.10+**
35
+ - **Python 3.11+**
36
36
  - A [CodeDD](https://codedd.ai) account and a CLI token (Account → CLI Access → Generate Token)
37
37
 
38
38
  ### From source (development)
39
39
 
40
40
  ```bash
41
- git clone https://github.com/codedd/codedd-cli.git
41
+ git clone https://gitlab.com/codedd1/codedd-cli
42
42
  cd codedd-cli
43
43
  pip install -e .
44
44
  ```
45
45
 
46
- ### From PyPI (when available)
46
+ ### From PyPI
47
47
 
48
48
  ```bash
49
49
  pip install codedd-cli
@@ -57,11 +57,11 @@ codedd --version
57
57
 
58
58
  ---
59
59
 
60
- ## Quick start
60
+ ## Quick start (recommended workflow)
61
61
 
62
- ### 1. Authenticate
62
+ ### 1. Authenticate once
63
63
 
64
- Generate a CLI token at [codedd.ai](https://codedd.ai) (Account CLI Access), then:
64
+ Generate a CLI token at [codedd.ai](https://codedd.ai) (Account -> CLI Access), then:
65
65
 
66
66
  ```bash
67
67
  codedd auth login --token <your_token>
@@ -69,18 +69,24 @@ codedd auth login --token <your_token>
69
69
 
70
70
  Or run `codedd auth login` and paste the token when prompted.
71
71
 
72
- ### 2. Select an audit
72
+ Optional sanity check:
73
+
74
+ ```bash
75
+ codedd auth status
76
+ ```
77
+
78
+ ### 2. Select the active audit context
73
79
 
74
80
  ```bash
75
81
  codedd audits list
76
82
  codedd audits select
77
83
  ```
78
84
 
79
- Choose a **group audit** (multiple repos) or a **single audit** (one repo). The selected audit becomes the active context for scope and audit commands.
85
+ Choose a **group audit** (multiple repos) or a **single audit** (one repo). The selected audit becomes the active context used by all `scope` and `audit` commands.
80
86
 
81
- ### 3. Define scope
87
+ ### 3. Define local scope
82
88
 
83
- Add the local paths that correspond to the audit’s repositories (each must be a Git repo root):
89
+ Add local paths that correspond to the repositories in that audit (each path must be a Git repository root with commits):
84
90
 
85
91
  ```bash
86
92
  codedd scope add /path/to/my-repo
@@ -88,18 +94,25 @@ codedd scope list
88
94
  codedd scope confirm
89
95
  ```
90
96
 
91
- `scope confirm` scans the directories, shows a preview (files, LoC), and registers scope with CodeDD. If you change files later, run `codedd audit start` — it will offer to re-sync scope (delta update) before starting.
97
+ `scope confirm` performs a metadata scan (paths, file types, LoC) and registers scope with CodeDD.
98
+ If files change later, `codedd audit start` auto-checks sync and prompts for re-confirmation when needed.
92
99
 
93
- ### 4. Run an audit
100
+ ### 4. Configure LLM key(s)
94
101
 
95
- Configure at least one LLM API key (used for file-level auditing):
102
+ Configure at least one provider key (used for local file-level auditing):
96
103
 
97
104
  ```bash
98
105
  codedd config set-key anthropic
99
106
  # or: codedd config set-key openai
100
107
  ```
101
108
 
102
- Then start the audit:
109
+ Optional (recommended if both are configured):
110
+
111
+ ```bash
112
+ codedd config provider both
113
+ ```
114
+
115
+ ### 5. Start the audit
103
116
 
104
117
  ```bash
105
118
  codedd audit start
@@ -110,7 +123,7 @@ The CLI will:
110
123
  - Sync scope with CodeDD (and prompt to re-confirm if local files changed).
111
124
  - Run pre-flight checks (payment, LoC budget).
112
125
  - Optionally open payment in the browser or deduct from budget.
113
- - Fetch the audit plan, run file auditing and complexity analysis locally, submit results, submit dependencies, submit architecture, and trigger server-side post-processing (consolidation, recommendations, completion email).
126
+ - Fetch the plan, run local analysis, submit structured results, and trigger server-side post-processing.
114
127
 
115
128
  Results and recommendations are available in the CodeDD dashboard; you can also run `codedd audits list` to see status.
116
129
 
@@ -118,22 +131,35 @@ Results and recommendations are available in the CodeDD dashboard; you can also
118
131
 
119
132
  ## Workflow overview
120
133
 
121
- High-level flow:
134
+ Use this exact order for a predictable run:
122
135
 
136
+ ```text
137
+ 1. codedd auth login
138
+ 2. codedd audits select
139
+ 3. codedd scope add <repo-path> [more paths...]
140
+ 4. codedd scope confirm
141
+ 5. codedd config set-key <anthropic|openai> # at least one
142
+ 6. codedd audit start
123
143
  ```
124
- ┌─────────────────────────────────────────────────────────────────────────────┐
125
- │ LOCAL │
126
- │ 1. codedd audits select → Pick audit (group or single) │
127
- │ 2. codedd scope add <path> → Add repo root(s) │
128
- │ 3. codedd scope confirm → Scan & register scope with CodeDD │
129
- │ 4. codedd audit start → Sync (if needed) → Pre-flight → Pay/budget
130
- │ └─ File audit (LLM) → Local │
131
- │ └─ Complexity → Local │
132
- │ └─ Submit results → CodeDD
133
- │ └─ Dependencies → Local scan Submit → CodeDD │
134
- │ └─ Architecture → Local phases → Submit → CodeDD │
135
- │ └─ Complete → CodeDD runs consolidation & recommendations │
136
- └─────────────────────────────────────────────────────────────────────────────┘
144
+
145
+ What `codedd audit start` does, in order:
146
+
147
+ ```text
148
+ A. Auto-sync scope -> if changed, asks to re-confirm
149
+ B. Pre-flight on CodeDD -> checks status/payment/budget
150
+ C. Payment path -> budget deduction OR checkout flow
151
+ D. Local execution -> file audit (LLM), complexity, dependencies, git stats, architecture
152
+ E. Submission -> sends structured outputs to CodeDD
153
+ F. Completion -> triggers server-side consolidation/recommendations
154
+ ```
155
+
156
+ If you update files after confirming scope:
157
+
158
+ ```text
159
+ Run: codedd audit start
160
+ -> CLI detects drift
161
+ -> Re-confirm prompt appears
162
+ -> Continue with updated scope
137
163
  ```
138
164
 
139
165
  | Step | Where it runs | What happens |
@@ -142,8 +168,9 @@ High-level flow:
142
168
  | Pre-flight | CodeDD | Check payment, budget, status. |
143
169
  | File audit | Local | LLM (Anthropic/OpenAI) analyses each file; results sent to CodeDD. |
144
170
  | Complexity | Local | Radon/Lizard; metrics sent to CodeDD. |
145
- | Dependencies | Local + CodeDD| Lockfiles/imports sent; CodeDD does metadata, vulns, licenses. |
146
- | Architecture | Local + CodeDD| Components/relations sent; CodeDD does Phase 3 and storage. |
171
+ | Dependencies | Local + CodeDD| Lockfiles/imports scanned locally; package/vuln data stored and enriched on CodeDD. |
172
+ | Git statistics | Local + CodeDD| Commit/churn/collaboration metrics collected locally, then submitted. |
173
+ | Architecture | Local + CodeDD| Components/relations extracted locally; persisted and processed on CodeDD. |
147
174
  | Recommendations | CodeDD | Consolidation, technical debt, security, licenses, etc. |
148
175
 
149
176
  ---
@@ -181,7 +208,7 @@ High-level flow:
181
208
 
182
209
  | Command | Description |
183
210
  |--------|-------------|
184
- | `codedd audit start` | Sync scope (if needed), pre-flight, pay/budget, then run full local audit and submit to CodeDD. Use `--skip-sync` to skip scope sync; `--yes` to auto-confirm; `--debug-llm` for LLM debug output. |
211
+ | `codedd audit start` | Sync scope (if needed), pre-flight, pay/budget, then run full local audit and submit to CodeDD. Use `--skip-sync` to skip scope sync; `--yes` to auto-confirm; `--show` for one-shot transparency summary; `--show-interactive` for per-request confirmations (debug); `--show-force-interactive` to override large-audit guardrails; `--debug-llm` for LLM debug output. |
185
212
 
186
213
  ### Configuration
187
214
 
@@ -191,6 +218,7 @@ High-level flow:
191
218
  | `codedd config set <key> <value>` | Set a config value |
192
219
  | `codedd config set-key [anthropic\|openai]` | Store an LLM API key in the OS keychain |
193
220
  | `codedd config show-keys` | List which providers have keys configured (not the keys themselves) |
221
+ | `codedd config remove-key <anthropic\|openai>` | Remove a stored LLM API key from keychain |
194
222
  | `codedd config provider [anthropic\|openai\|both]` | Set preferred LLM provider |
195
223
  | `codedd config concurrency <n>` | Set max concurrent LLM requests (default 6) |
196
224
 
@@ -206,7 +234,7 @@ High-level flow:
206
234
  | Variable | Purpose |
207
235
  |---------|---------|
208
236
  | `CODEDD_API_TOKEN` | Override the stored CLI token (e.g. for CI) |
209
- | `CODEDD_API_URL` | Override API base URL (default from config) |
237
+
210
238
 
211
239
  ---
212
240
 
@@ -222,7 +250,8 @@ High-level flow:
222
250
  ## Development
223
251
 
224
252
  ```bash
225
- pip install -e ".[dev]"
253
+ pip install -e .
254
+ pip install pytest pytest-httpx pytest-mock ruff
226
255
  pytest
227
256
  ruff check .
228
257
  ```
@@ -237,5 +266,5 @@ MIT License — see [LICENSE](LICENSE).
237
266
 
238
267
  ## Support
239
268
 
240
- - **Issues:** [GitHub Issues](https://github.com/codedd/codedd-cli/issues)
269
+ - **Issues:** [GitLab Issues](https://gitlab.com/codedd1/codedd-cli/-/work_items)
241
270
  - **Product:** [CodeDD](https://codedd.ai)
@@ -1,3 +1,3 @@
1
1
  """CodeDD CLI — run code audits from your terminal."""
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "0.1.2"
@@ -10,7 +10,7 @@ Wraps ``httpx`` with:
10
10
  """
11
11
 
12
12
  import time
13
- from typing import Any, Optional
13
+ from typing import Any
14
14
 
15
15
  import httpx
16
16
 
@@ -36,15 +36,17 @@ class CodeDDClient:
36
36
  data = resp.json()
37
37
  """
38
38
 
39
- def __init__(self, config: Optional[ConfigManager] = None) -> None:
39
+ def __init__(self, config: ConfigManager | None = None) -> None:
40
40
  self._config = config or ConfigManager()
41
41
  self._base_url = self._config.api_url.rstrip("/")
42
42
  self._token = TokenManager.retrieve()
43
-
43
+
44
44
  # For localhost HTTP, disable TLS verification (not applicable anyway)
45
45
  # For HTTPS, always verify certificates
46
- verify_tls = not self._base_url.startswith("http://localhost") and not self._base_url.startswith("http://127.0.0.1")
47
-
46
+ verify_tls = not self._base_url.startswith("http://localhost") and not self._base_url.startswith(
47
+ "http://127.0.0.1"
48
+ )
49
+
48
50
  self._client = httpx.Client(
49
51
  base_url=self._base_url,
50
52
  headers=self._build_headers(),
@@ -79,7 +81,7 @@ class CodeDDClient:
79
81
  Retries on 5xx responses and connection errors using exponential
80
82
  back-off (1s, 2s, 4s …).
81
83
  """
82
- last_exc: Optional[Exception] = None
84
+ last_exc: Exception | None = None
83
85
 
84
86
  for attempt in range(1, MAX_RETRIES + 1):
85
87
  try:
@@ -17,6 +17,7 @@ class Endpoints:
17
17
  # Scope
18
18
  REGISTER_SCOPE = "/api/cli/scope/register/"
19
19
  SCOPE_FILES = "/api/cli/scope/files/"
20
+ DELETE_REPO_FROM_SCOPE = "/delete_repo_from_scope/"
20
21
 
21
22
  # Audit lifecycle
22
23
  AUDIT_CAN_START = "/api/cli/audit/can-start/"
@@ -38,6 +39,7 @@ class Endpoints:
38
39
 
39
40
  # Local git statistics (for CLI-driven audits; enables dashboards)
40
41
  AUDIT_GIT_STATISTICS = "/api/cli/audit/git-statistics/"
42
+ AUDIT_GIT_DEVELOPMENT_ANALYSIS = "/api/cli/audit/git-development-analysis/"
41
43
  AUDIT_VULNERABILITY_VALIDATION = "/api/cli/audit/vulnerability-validation/"
42
44
 
43
45
  # Architecture analysis (Phase 1+2 run locally; server runs Phase 3 + storage)
@@ -6,7 +6,6 @@ timeout, server disconnected, etc.). Handled at the CLI entry point to
6
6
  display a single, clear message instead of a full traceback.
7
7
  """
8
8
 
9
-
10
9
  # Pre-defined message shown when the remote is not responding.
11
10
  CONNECTION_ERROR_MESSAGE = (
12
11
  "Unable to reach CodeDD. "