devin-cli 1.2.2__tar.gz → 1.2.3__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 (55) hide show
  1. devin_cli-1.2.3/PKG-INFO +325 -0
  2. devin_cli-1.2.3/README.md +289 -0
  3. {devin_cli-1.2.2 → devin_cli-1.2.3}/pyproject.toml +1 -1
  4. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/cli.py +1 -1
  5. devin_cli-1.2.2/PKG-INFO +0 -231
  6. devin_cli-1.2.2/README.md +0 -195
  7. {devin_cli-1.2.2 → devin_cli-1.2.3}/.github/workflows/pypi-publish.yml +0 -0
  8. {devin_cli-1.2.2 → devin_cli-1.2.3}/.gitignore +0 -0
  9. {devin_cli-1.2.2 → devin_cli-1.2.3}/CHANGELOG.md +0 -0
  10. {devin_cli-1.2.2 → devin_cli-1.2.3}/LICENSE +0 -0
  11. {devin_cli-1.2.2 → devin_cli-1.2.3}/assets/logo.png +0 -0
  12. {devin_cli-1.2.2 → devin_cli-1.2.3}/generate_facades.py +0 -0
  13. {devin_cli-1.2.2 → devin_cli-1.2.3}/setup.py +0 -0
  14. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/__init__.py +0 -0
  15. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/__init__.py +0 -0
  16. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/attachments.py +0 -0
  17. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/client.py +0 -0
  18. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/consumption.py +0 -0
  19. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/knowledge.py +0 -0
  20. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/members.py +0 -0
  21. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/organizations.py +0 -0
  22. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/playbooks.py +0 -0
  23. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/repositories.py +0 -0
  24. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/schedules.py +0 -0
  25. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/secrets.py +0 -0
  26. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/sessions.py +0 -0
  27. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v1/__init__.py +0 -0
  28. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v1/attachments.py +0 -0
  29. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v1/knowledge.py +0 -0
  30. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v1/playbooks.py +0 -0
  31. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v1/secrets.py +0 -0
  32. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v1/sessions.py +0 -0
  33. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v3/__init__.py +0 -0
  34. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v3/attachments.py +0 -0
  35. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v3/consumption.py +0 -0
  36. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v3/knowledge.py +0 -0
  37. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v3/members.py +0 -0
  38. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v3/organizations.py +0 -0
  39. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v3/playbooks.py +0 -0
  40. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v3/repositories.py +0 -0
  41. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v3/schedules.py +0 -0
  42. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v3/secrets.py +0 -0
  43. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/api/v3/sessions.py +0 -0
  44. {devin_cli-1.2.2 → devin_cli-1.2.3}/src/devin_cli/config.py +0 -0
  45. {devin_cli-1.2.2 → devin_cli-1.2.3}/tests/__init__.py +0 -0
  46. {devin_cli-1.2.2 → devin_cli-1.2.3}/tests/conftest.py +0 -0
  47. {devin_cli-1.2.2 → devin_cli-1.2.3}/tests/test_api/test_attachments.py +0 -0
  48. {devin_cli-1.2.2 → devin_cli-1.2.3}/tests/test_api/test_knowledge.py +0 -0
  49. {devin_cli-1.2.2 → devin_cli-1.2.3}/tests/test_api/test_playbooks.py +0 -0
  50. {devin_cli-1.2.2 → devin_cli-1.2.3}/tests/test_api/test_repositories.py +0 -0
  51. {devin_cli-1.2.2 → devin_cli-1.2.3}/tests/test_api/test_schedules.py +0 -0
  52. {devin_cli-1.2.2 → devin_cli-1.2.3}/tests/test_api/test_secrets.py +0 -0
  53. {devin_cli-1.2.2 → devin_cli-1.2.3}/tests/test_api/test_sessions.py +0 -0
  54. {devin_cli-1.2.2 → devin_cli-1.2.3}/tests/test_cli.py +0 -0
  55. {devin_cli-1.2.2 → devin_cli-1.2.3}/tests/test_config.py +0 -0
@@ -0,0 +1,325 @@
1
+ Metadata-Version: 2.4
2
+ Name: devin-cli
3
+ Version: 1.2.3
4
+ Summary: Unofficial CLI for Devin AI - The first AI Software Engineer
5
+ Project-URL: Homepage, https://github.com/revanthpobala/devin-cli
6
+ Project-URL: Repository, https://github.com/revanthpobala/devin-cli.git
7
+ Project-URL: Issues, https://github.com/revanthpobala/devin-cli/issues
8
+ Author-email: revanth <revanth@example.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: agent,ai,automation,autonomous,cli,cognition,devin,software-engineer,terminal
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Classifier: Topic :: Software Development :: Build Tools
24
+ Requires-Python: >=3.9
25
+ Requires-Dist: httpx>=0.27.0
26
+ Requires-Dist: pyyaml>=6.0
27
+ Requires-Dist: rich>=13.0.0
28
+ Requires-Dist: typer[all]>=0.9.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: build; extra == 'dev'
31
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
32
+ Requires-Dist: pytest>=7.0; extra == 'dev'
33
+ Requires-Dist: respx>=0.20.0; extra == 'dev'
34
+ Requires-Dist: twine; extra == 'dev'
35
+ Description-Content-Type: text/markdown
36
+
37
+ <p align="center">
38
+ <img src="https://raw.githubusercontent.com/revanthpobala/devin-cli/main/assets/logo.png" alt="Devin CLI Logo" width="300">
39
+ </p>
40
+
41
+ # Devin CLI (Unofficial) — The Professional Terminal Interface for Devin AI
42
+
43
+ <p align="center">
44
+ <a href="https://pypi.org/project/devin-cli/"><img src="https://img.shields.io/pypi/v/devin-cli.svg?style=for-the-badge&color=0294DE" alt="PyPI version"></a>
45
+ <a href="https://github.com/revanthpobala/homebrew-tap"><img src="https://img.shields.io/badge/Homebrew-Tap-orange?style=for-the-badge&logo=homebrew" alt="Homebrew Tap"></a>
46
+ <a href="https://github.com/revanthpobala/devin-cli/actions/workflows/pypi-publish.yml"><img src="https://github.com/revanthpobala/devin-cli/actions/workflows/pypi-publish.yml/badge.svg" alt="Build Status"></a>
47
+ </p>
48
+
49
+ > **The first unofficial CLI for the world's first AI Software Engineer. Supports both the modern v3 API and the legacy v1 API with full multi-profile management.**
50
+
51
+ Devin CLI is designed for high-velocity engineering teams. It strips away the friction of the web UI, allowing you to orchestrate autonomous agents, manage complex contexts, and automate multi-step development workflows through a robust, terminal-first interface.
52
+
53
+ ---
54
+
55
+ ## ⚡ Quick Start
56
+
57
+ ### 1. Installation
58
+
59
+ **Recommended: Via Homebrew (macOS)**
60
+ ```bash
61
+ brew tap revanthpobala/tap
62
+ brew install devin-cli
63
+ ```
64
+
65
+ **Via pipx (Isolated environment)**
66
+ ```bash
67
+ pipx install devin-cli
68
+ ```
69
+
70
+ **Via pip**
71
+ ```bash
72
+ pip install devin-cli
73
+ ```
74
+
75
+ ### 2. Configuration
76
+ ```bash
77
+ devin configure
78
+ # Paste your API token (apk_... or cog_...) from https://preview.devin.ai/settings
79
+ # Select API version: v3 (default) or v1 (legacy)
80
+ ```
81
+
82
+ ### 3. Your First Session
83
+ ```bash
84
+ devin create-session "Identify and fix the race condition in our Redis cache layer"
85
+ devin watch
86
+ ```
87
+
88
+ ---
89
+
90
+ ## 🔑 Multi-Profile Support
91
+
92
+ ```bash
93
+ devin configure --profile personal
94
+ devin configure --profile service
95
+ devin --profile service sessions list
96
+ devin --profile personal sessions create "Fix the failing tests"
97
+ ```
98
+
99
+ Profiles are stored in `~/.config/devin/config.json` — fully isolated including session caches and active session IDs.
100
+
101
+ ---
102
+
103
+ ## 🤖 All Commands
104
+
105
+ ### Flat Commands (0.1.x style — quick access)
106
+
107
+ | Command | Description |
108
+ | :--- | :--- |
109
+ | `devin create-session "<prompt>"` | Create a new session |
110
+ | `devin watch` | Live-watch the active session |
111
+ | `devin status` | One-liner status of active session |
112
+ | `devin open` | Open active session URL in browser |
113
+ | `devin message "<text>"` | Send a message to active session |
114
+ | `devin message --file prompt.txt` | Send a message from file |
115
+ | `devin terminate` | Terminate active session |
116
+ | `devin list-sessions` | List recent sessions |
117
+ | `devin upload <file>` | Upload a file to Devin |
118
+ | `devin attach <file> "<prompt>"` | Upload file + start session with it |
119
+ | `devin list-knowledge` | List knowledge notes |
120
+ | `devin update-knowledge <id>` | Update a knowledge entry |
121
+ | `devin update-tags` | Update tags on a session |
122
+ | `devin history` | Show locally cached session ID |
123
+ | `devin messages` | Show conversation history |
124
+ | `devin get-session` | Show session details + structured output |
125
+ | `devin update-playbook <id>` | Update a playbook |
126
+ | `devin delete-playbook <id>` | Delete a playbook |
127
+ | `devin list-secrets` | List organization secrets |
128
+ | `devin delete-secret <id>` | Delete a secret |
129
+ | `devin chain` | Sequential playbook orchestration |
130
+ | `devin use <session_id>` | Switch active session |
131
+ | `devin configure` | Configure API token and profile |
132
+
133
+ ### Sessions (`devin sessions <cmd>`)
134
+
135
+ | Command | Key Flags | Description |
136
+ | :--- | :--- | :--- |
137
+ | `create` | see below | Create a session |
138
+ | `list` | `--limit`, `--json` | List sessions |
139
+ | `get` | `[session_id]` | Get session details |
140
+ | `watch` | `--interval` | Live-watch with exponential backoff |
141
+ | `message` | `[text]`, `--file` | Send message or file to session |
142
+ | `messages` | `[session_id]` | Full conversation history |
143
+ | `terminate` | `[session_id]` | Terminate a session |
144
+ | `insights` | `[session_id]` | ACU / performance insights (v3) |
145
+ | `cost` | `[session_id]` | ACU consumption |
146
+
147
+ #### `sessions create` / `create-session` — Full Flag Reference
148
+
149
+ | Flag | Type | Description |
150
+ | :--- | :--- | :--- |
151
+ | `[prompt]` | arg | Task prompt |
152
+ | `--file`, `-f` | path | Read prompt from file |
153
+ | `--title`, `-t` | str | Session title |
154
+ | `--wait`, `-w` | flag | Block until session finishes |
155
+ | `--interval` | int | Polling interval for `--wait` (default: 5s) |
156
+ | `--max-acu` | int | ACU spend cap |
157
+ | `--force` | flag | Skip duplicate detection |
158
+ | `--advanced-mode` | str | `analyze` \| `create_playbook` \| `improve_playbook` \| `batch` \| `manage_knowledge` |
159
+ | `--playbook-id` | str | Playbook to apply (v3) |
160
+ | `--child-playbook-id` | str | Playbook for each sub-session in `batch` mode (v3) |
161
+ | `--bypass-approval` | flag | Skip UI approval — child sessions start immediately (v3) |
162
+ | `--tag` | str (repeatable) | Session tags |
163
+ | `--repo` | str (repeatable) | Repo URLs to attach (v3) |
164
+ | `--knowledge-id` | str (repeatable) | Knowledge IDs to inject |
165
+ | `--secret-id` | str (repeatable) | Secret IDs to inject (v3) |
166
+ | `--session-link` | str (repeatable) | Session URLs as context (v3) |
167
+ | `--attachment-url` | str (repeatable) | Attachment URLs (v3) |
168
+ | `--structured-output-schema` | str | JSON schema for structured response (v3) |
169
+ | `--create-as-user-id` | str | Enterprise: impersonate a user (v3) |
170
+ | `--org` | str | Override org ID |
171
+
172
+ #### Full Batch Automation Example
173
+ ```bash
174
+ # No browser interaction required
175
+ devin sessions create \
176
+ --advanced-mode batch \
177
+ --playbook-id <orchestrator-id> \
178
+ --child-playbook-id <worker-id> \
179
+ --bypass-approval \
180
+ "Process each file in the attached CSV"
181
+ ```
182
+
183
+ ### Knowledge (`devin knowledge <cmd>`)
184
+
185
+ | Command | Description |
186
+ | :--- | :--- |
187
+ | `list` | List all knowledge notes |
188
+ | `create` | Create a knowledge note |
189
+ | `delete <id>` | Delete a knowledge note |
190
+
191
+ ### Playbooks (`devin playbooks <cmd>`)
192
+
193
+ | Command | Description |
194
+ | :--- | :--- |
195
+ | `list` | List all playbooks |
196
+ | `create` | Create a playbook |
197
+ | `update <id>` | Update a playbook |
198
+ | `delete <id>` | Delete a playbook |
199
+
200
+ ### Secrets (`devin secrets <cmd>`)
201
+
202
+ | Command | Description |
203
+ | :--- | :--- |
204
+ | `list` | List organization secrets |
205
+ | `create` | Create a secret |
206
+ | `delete <id>` | Delete a secret |
207
+
208
+ ### Schedules (`devin schedules <cmd>`)
209
+
210
+ | Command | Description |
211
+ | :--- | :--- |
212
+ | `list` | List schedules |
213
+ | `create` | Create a CRON schedule |
214
+
215
+ ### Repositories (`devin repos <cmd>`)
216
+
217
+ | Command | Description |
218
+ | :--- | :--- |
219
+ | `list` | List indexed repositories |
220
+ | `index` | Force-index a repository |
221
+
222
+ ### Attachments (`devin attachments <cmd>`)
223
+
224
+ | Command | Description |
225
+ | :--- | :--- |
226
+ | `upload <file>` | Upload a file |
227
+ | `download <id>` | Download an attachment |
228
+
229
+ ### Enterprise (`devin enterprise <cmd>`)
230
+
231
+ | Command | Description |
232
+ | :--- | :--- |
233
+ | `whoami` | Show current identity |
234
+ | `list-orgs` | List accessible organizations |
235
+
236
+ ### Chain (`devin chain`)
237
+
238
+ Orchestrate a sequential pipeline of playbooks:
239
+
240
+ ```bash
241
+ # Inline
242
+ devin chain "Refactor utils.py" --playbooks "lint_check,unit_tests"
243
+
244
+ # YAML workflow file
245
+ devin chain --file workflow.yml
246
+ ```
247
+
248
+ ---
249
+
250
+ ## 🛡 Session Deduplication
251
+
252
+ The CLI caches a SHA-256 hash of your last 50 prompts per profile. Duplicate prompts are caught before wasting ACUs:
253
+
254
+ ```
255
+ Duplicate Detected: You recently created a session with this exact prompt.
256
+ Existing Session ID: abc123...
257
+ Are you sure you want to create a duplicate session? [y/N]
258
+ ```
259
+
260
+ Use `--force` to bypass.
261
+
262
+ ---
263
+
264
+ ## 📟 CI/CD Integration
265
+
266
+ ```yaml
267
+ env:
268
+ DEVIN_API_TOKEN: ${{ secrets.DEVIN_API_TOKEN }}
269
+ DEVIN_ORG_ID: ${{ secrets.DEVIN_ORG_ID }}
270
+ run: |
271
+ devin create-session "Review PR #${{ github.event.pull_request.number }}" --wait
272
+ ```
273
+
274
+ **Environment variables:**
275
+
276
+ | Variable | Description |
277
+ | :--- | :--- |
278
+ | `DEVIN_API_TOKEN` | API token (overrides config) |
279
+ | `DEVIN_ORG_ID` | Organization ID |
280
+ | `DEVIN_BASE_URL` | Override base URL |
281
+ | `DEVIN_API_VERSION` | Set `v1` or `v3` without configuring |
282
+
283
+ ---
284
+
285
+ ## 🕹 v1 / v3 Profile Compatibility
286
+
287
+ | Feature | v1 | v3 |
288
+ | :--- | :---: | :---: |
289
+ | Sessions (create, list, get, terminate) | ✅ | ✅ |
290
+ | Knowledge (create, update, delete) | ✅ | ✅ |
291
+ | Playbooks (create, update, delete) | ✅ | ✅ |
292
+ | Secrets (list, create, delete) | ✅ | ✅ |
293
+ | Attachments (upload, download) | ✅ | ✅ |
294
+ | Advanced Mode (`--advanced-mode`) | ⚠️ warned | ✅ |
295
+ | Batch sessions (`--bypass-approval`) | ⚠️ warned | ✅ |
296
+ | Session Insights | ❌ | ✅ |
297
+ | Schedules | ❌ | ✅ |
298
+ | Repositories | ❌ | ✅ |
299
+ | Enterprise endpoints | ❌ | ✅ |
300
+
301
+ > v3-only flags are accepted but ignored on v1 profiles — the CLI prints a clear warning listing exactly which flags were dropped.
302
+
303
+ ---
304
+
305
+ ## ⚙️ Engineering Specs
306
+
307
+ - **Architecture**: Full v3 API support (`v3beta1` + `enterprise`) + v1 legacy proxy
308
+ - **Config**: `~/.config/devin/config.json`
309
+ - **Platform**: Linux, macOS, WSL2
310
+ - **Python**: 3.9+
311
+
312
+ ---
313
+
314
+ ## 🧪 Developer Hub
315
+
316
+ ```bash
317
+ pip install -e ".[dev]"
318
+ PYTHONPATH=src python3 -m pytest
319
+ ```
320
+
321
+ ---
322
+
323
+ ## 📄 License
324
+
325
+ MIT. **Devin CLI** is an unofficial community project and is not affiliated with Cognition AI.
@@ -0,0 +1,289 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/revanthpobala/devin-cli/main/assets/logo.png" alt="Devin CLI Logo" width="300">
3
+ </p>
4
+
5
+ # Devin CLI (Unofficial) — The Professional Terminal Interface for Devin AI
6
+
7
+ <p align="center">
8
+ <a href="https://pypi.org/project/devin-cli/"><img src="https://img.shields.io/pypi/v/devin-cli.svg?style=for-the-badge&color=0294DE" alt="PyPI version"></a>
9
+ <a href="https://github.com/revanthpobala/homebrew-tap"><img src="https://img.shields.io/badge/Homebrew-Tap-orange?style=for-the-badge&logo=homebrew" alt="Homebrew Tap"></a>
10
+ <a href="https://github.com/revanthpobala/devin-cli/actions/workflows/pypi-publish.yml"><img src="https://github.com/revanthpobala/devin-cli/actions/workflows/pypi-publish.yml/badge.svg" alt="Build Status"></a>
11
+ </p>
12
+
13
+ > **The first unofficial CLI for the world's first AI Software Engineer. Supports both the modern v3 API and the legacy v1 API with full multi-profile management.**
14
+
15
+ Devin CLI is designed for high-velocity engineering teams. It strips away the friction of the web UI, allowing you to orchestrate autonomous agents, manage complex contexts, and automate multi-step development workflows through a robust, terminal-first interface.
16
+
17
+ ---
18
+
19
+ ## ⚡ Quick Start
20
+
21
+ ### 1. Installation
22
+
23
+ **Recommended: Via Homebrew (macOS)**
24
+ ```bash
25
+ brew tap revanthpobala/tap
26
+ brew install devin-cli
27
+ ```
28
+
29
+ **Via pipx (Isolated environment)**
30
+ ```bash
31
+ pipx install devin-cli
32
+ ```
33
+
34
+ **Via pip**
35
+ ```bash
36
+ pip install devin-cli
37
+ ```
38
+
39
+ ### 2. Configuration
40
+ ```bash
41
+ devin configure
42
+ # Paste your API token (apk_... or cog_...) from https://preview.devin.ai/settings
43
+ # Select API version: v3 (default) or v1 (legacy)
44
+ ```
45
+
46
+ ### 3. Your First Session
47
+ ```bash
48
+ devin create-session "Identify and fix the race condition in our Redis cache layer"
49
+ devin watch
50
+ ```
51
+
52
+ ---
53
+
54
+ ## 🔑 Multi-Profile Support
55
+
56
+ ```bash
57
+ devin configure --profile personal
58
+ devin configure --profile service
59
+ devin --profile service sessions list
60
+ devin --profile personal sessions create "Fix the failing tests"
61
+ ```
62
+
63
+ Profiles are stored in `~/.config/devin/config.json` — fully isolated including session caches and active session IDs.
64
+
65
+ ---
66
+
67
+ ## 🤖 All Commands
68
+
69
+ ### Flat Commands (0.1.x style — quick access)
70
+
71
+ | Command | Description |
72
+ | :--- | :--- |
73
+ | `devin create-session "<prompt>"` | Create a new session |
74
+ | `devin watch` | Live-watch the active session |
75
+ | `devin status` | One-liner status of active session |
76
+ | `devin open` | Open active session URL in browser |
77
+ | `devin message "<text>"` | Send a message to active session |
78
+ | `devin message --file prompt.txt` | Send a message from file |
79
+ | `devin terminate` | Terminate active session |
80
+ | `devin list-sessions` | List recent sessions |
81
+ | `devin upload <file>` | Upload a file to Devin |
82
+ | `devin attach <file> "<prompt>"` | Upload file + start session with it |
83
+ | `devin list-knowledge` | List knowledge notes |
84
+ | `devin update-knowledge <id>` | Update a knowledge entry |
85
+ | `devin update-tags` | Update tags on a session |
86
+ | `devin history` | Show locally cached session ID |
87
+ | `devin messages` | Show conversation history |
88
+ | `devin get-session` | Show session details + structured output |
89
+ | `devin update-playbook <id>` | Update a playbook |
90
+ | `devin delete-playbook <id>` | Delete a playbook |
91
+ | `devin list-secrets` | List organization secrets |
92
+ | `devin delete-secret <id>` | Delete a secret |
93
+ | `devin chain` | Sequential playbook orchestration |
94
+ | `devin use <session_id>` | Switch active session |
95
+ | `devin configure` | Configure API token and profile |
96
+
97
+ ### Sessions (`devin sessions <cmd>`)
98
+
99
+ | Command | Key Flags | Description |
100
+ | :--- | :--- | :--- |
101
+ | `create` | see below | Create a session |
102
+ | `list` | `--limit`, `--json` | List sessions |
103
+ | `get` | `[session_id]` | Get session details |
104
+ | `watch` | `--interval` | Live-watch with exponential backoff |
105
+ | `message` | `[text]`, `--file` | Send message or file to session |
106
+ | `messages` | `[session_id]` | Full conversation history |
107
+ | `terminate` | `[session_id]` | Terminate a session |
108
+ | `insights` | `[session_id]` | ACU / performance insights (v3) |
109
+ | `cost` | `[session_id]` | ACU consumption |
110
+
111
+ #### `sessions create` / `create-session` — Full Flag Reference
112
+
113
+ | Flag | Type | Description |
114
+ | :--- | :--- | :--- |
115
+ | `[prompt]` | arg | Task prompt |
116
+ | `--file`, `-f` | path | Read prompt from file |
117
+ | `--title`, `-t` | str | Session title |
118
+ | `--wait`, `-w` | flag | Block until session finishes |
119
+ | `--interval` | int | Polling interval for `--wait` (default: 5s) |
120
+ | `--max-acu` | int | ACU spend cap |
121
+ | `--force` | flag | Skip duplicate detection |
122
+ | `--advanced-mode` | str | `analyze` \| `create_playbook` \| `improve_playbook` \| `batch` \| `manage_knowledge` |
123
+ | `--playbook-id` | str | Playbook to apply (v3) |
124
+ | `--child-playbook-id` | str | Playbook for each sub-session in `batch` mode (v3) |
125
+ | `--bypass-approval` | flag | Skip UI approval — child sessions start immediately (v3) |
126
+ | `--tag` | str (repeatable) | Session tags |
127
+ | `--repo` | str (repeatable) | Repo URLs to attach (v3) |
128
+ | `--knowledge-id` | str (repeatable) | Knowledge IDs to inject |
129
+ | `--secret-id` | str (repeatable) | Secret IDs to inject (v3) |
130
+ | `--session-link` | str (repeatable) | Session URLs as context (v3) |
131
+ | `--attachment-url` | str (repeatable) | Attachment URLs (v3) |
132
+ | `--structured-output-schema` | str | JSON schema for structured response (v3) |
133
+ | `--create-as-user-id` | str | Enterprise: impersonate a user (v3) |
134
+ | `--org` | str | Override org ID |
135
+
136
+ #### Full Batch Automation Example
137
+ ```bash
138
+ # No browser interaction required
139
+ devin sessions create \
140
+ --advanced-mode batch \
141
+ --playbook-id <orchestrator-id> \
142
+ --child-playbook-id <worker-id> \
143
+ --bypass-approval \
144
+ "Process each file in the attached CSV"
145
+ ```
146
+
147
+ ### Knowledge (`devin knowledge <cmd>`)
148
+
149
+ | Command | Description |
150
+ | :--- | :--- |
151
+ | `list` | List all knowledge notes |
152
+ | `create` | Create a knowledge note |
153
+ | `delete <id>` | Delete a knowledge note |
154
+
155
+ ### Playbooks (`devin playbooks <cmd>`)
156
+
157
+ | Command | Description |
158
+ | :--- | :--- |
159
+ | `list` | List all playbooks |
160
+ | `create` | Create a playbook |
161
+ | `update <id>` | Update a playbook |
162
+ | `delete <id>` | Delete a playbook |
163
+
164
+ ### Secrets (`devin secrets <cmd>`)
165
+
166
+ | Command | Description |
167
+ | :--- | :--- |
168
+ | `list` | List organization secrets |
169
+ | `create` | Create a secret |
170
+ | `delete <id>` | Delete a secret |
171
+
172
+ ### Schedules (`devin schedules <cmd>`)
173
+
174
+ | Command | Description |
175
+ | :--- | :--- |
176
+ | `list` | List schedules |
177
+ | `create` | Create a CRON schedule |
178
+
179
+ ### Repositories (`devin repos <cmd>`)
180
+
181
+ | Command | Description |
182
+ | :--- | :--- |
183
+ | `list` | List indexed repositories |
184
+ | `index` | Force-index a repository |
185
+
186
+ ### Attachments (`devin attachments <cmd>`)
187
+
188
+ | Command | Description |
189
+ | :--- | :--- |
190
+ | `upload <file>` | Upload a file |
191
+ | `download <id>` | Download an attachment |
192
+
193
+ ### Enterprise (`devin enterprise <cmd>`)
194
+
195
+ | Command | Description |
196
+ | :--- | :--- |
197
+ | `whoami` | Show current identity |
198
+ | `list-orgs` | List accessible organizations |
199
+
200
+ ### Chain (`devin chain`)
201
+
202
+ Orchestrate a sequential pipeline of playbooks:
203
+
204
+ ```bash
205
+ # Inline
206
+ devin chain "Refactor utils.py" --playbooks "lint_check,unit_tests"
207
+
208
+ # YAML workflow file
209
+ devin chain --file workflow.yml
210
+ ```
211
+
212
+ ---
213
+
214
+ ## 🛡 Session Deduplication
215
+
216
+ The CLI caches a SHA-256 hash of your last 50 prompts per profile. Duplicate prompts are caught before wasting ACUs:
217
+
218
+ ```
219
+ Duplicate Detected: You recently created a session with this exact prompt.
220
+ Existing Session ID: abc123...
221
+ Are you sure you want to create a duplicate session? [y/N]
222
+ ```
223
+
224
+ Use `--force` to bypass.
225
+
226
+ ---
227
+
228
+ ## 📟 CI/CD Integration
229
+
230
+ ```yaml
231
+ env:
232
+ DEVIN_API_TOKEN: ${{ secrets.DEVIN_API_TOKEN }}
233
+ DEVIN_ORG_ID: ${{ secrets.DEVIN_ORG_ID }}
234
+ run: |
235
+ devin create-session "Review PR #${{ github.event.pull_request.number }}" --wait
236
+ ```
237
+
238
+ **Environment variables:**
239
+
240
+ | Variable | Description |
241
+ | :--- | :--- |
242
+ | `DEVIN_API_TOKEN` | API token (overrides config) |
243
+ | `DEVIN_ORG_ID` | Organization ID |
244
+ | `DEVIN_BASE_URL` | Override base URL |
245
+ | `DEVIN_API_VERSION` | Set `v1` or `v3` without configuring |
246
+
247
+ ---
248
+
249
+ ## 🕹 v1 / v3 Profile Compatibility
250
+
251
+ | Feature | v1 | v3 |
252
+ | :--- | :---: | :---: |
253
+ | Sessions (create, list, get, terminate) | ✅ | ✅ |
254
+ | Knowledge (create, update, delete) | ✅ | ✅ |
255
+ | Playbooks (create, update, delete) | ✅ | ✅ |
256
+ | Secrets (list, create, delete) | ✅ | ✅ |
257
+ | Attachments (upload, download) | ✅ | ✅ |
258
+ | Advanced Mode (`--advanced-mode`) | ⚠️ warned | ✅ |
259
+ | Batch sessions (`--bypass-approval`) | ⚠️ warned | ✅ |
260
+ | Session Insights | ❌ | ✅ |
261
+ | Schedules | ❌ | ✅ |
262
+ | Repositories | ❌ | ✅ |
263
+ | Enterprise endpoints | ❌ | ✅ |
264
+
265
+ > v3-only flags are accepted but ignored on v1 profiles — the CLI prints a clear warning listing exactly which flags were dropped.
266
+
267
+ ---
268
+
269
+ ## ⚙️ Engineering Specs
270
+
271
+ - **Architecture**: Full v3 API support (`v3beta1` + `enterprise`) + v1 legacy proxy
272
+ - **Config**: `~/.config/devin/config.json`
273
+ - **Platform**: Linux, macOS, WSL2
274
+ - **Python**: 3.9+
275
+
276
+ ---
277
+
278
+ ## 🧪 Developer Hub
279
+
280
+ ```bash
281
+ pip install -e ".[dev]"
282
+ PYTHONPATH=src python3 -m pytest
283
+ ```
284
+
285
+ ---
286
+
287
+ ## 📄 License
288
+
289
+ MIT. **Devin CLI** is an unofficial community project and is not affiliated with Cognition AI.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "devin-cli"
3
- version = "1.2.2"
3
+ version = "1.2.3"
4
4
  description = "Unofficial CLI for Devin AI - The first AI Software Engineer"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -728,7 +728,7 @@ def watch_session_cmd(
728
728
  if org: config.temporary_org_id = org
729
729
  sid = session_id or get_current_session_id()
730
730
 
731
- terminal_statuses = {"stopped", "finished", "error", "cancelled", "failed", "blocked"}
731
+ terminal_statuses = {"stopped", "finished", "error", "cancelled", "failed"}
732
732
  backoff = interval
733
733
 
734
734
  def build_status_panel(resp: dict) -> Panel:
devin_cli-1.2.2/PKG-INFO DELETED
@@ -1,231 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: devin-cli
3
- Version: 1.2.2
4
- Summary: Unofficial CLI for Devin AI - The first AI Software Engineer
5
- Project-URL: Homepage, https://github.com/revanthpobala/devin-cli
6
- Project-URL: Repository, https://github.com/revanthpobala/devin-cli.git
7
- Project-URL: Issues, https://github.com/revanthpobala/devin-cli/issues
8
- Author-email: revanth <revanth@example.com>
9
- License-Expression: MIT
10
- License-File: LICENSE
11
- Keywords: agent,ai,automation,autonomous,cli,cognition,devin,software-engineer,terminal
12
- Classifier: Development Status :: 4 - Beta
13
- Classifier: Environment :: Console
14
- Classifier: Intended Audience :: Developers
15
- Classifier: License :: OSI Approved :: MIT License
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.9
19
- Classifier: Programming Language :: Python :: 3.10
20
- Classifier: Programming Language :: Python :: 3.11
21
- Classifier: Programming Language :: Python :: 3.12
22
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
- Classifier: Topic :: Software Development :: Build Tools
24
- Requires-Python: >=3.9
25
- Requires-Dist: httpx>=0.27.0
26
- Requires-Dist: pyyaml>=6.0
27
- Requires-Dist: rich>=13.0.0
28
- Requires-Dist: typer[all]>=0.9.0
29
- Provides-Extra: dev
30
- Requires-Dist: build; extra == 'dev'
31
- Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
32
- Requires-Dist: pytest>=7.0; extra == 'dev'
33
- Requires-Dist: respx>=0.20.0; extra == 'dev'
34
- Requires-Dist: twine; extra == 'dev'
35
- Description-Content-Type: text/markdown
36
-
37
- <p align="center">
38
- <img src="https://raw.githubusercontent.com/revanthpobala/devin-cli/main/assets/logo.png" alt="Devin CLI Logo" width="300">
39
- </p>
40
-
41
- # Devin CLI (Unofficial) — The Professional Terminal Interface for Devin AI
42
-
43
- <p align="center">
44
- <a href="https://pypi.org/project/devin-cli/"><img src="https://img.shields.io/pypi/v/devin-cli.svg?style=for-the-badge&color=0294DE" alt="PyPI version"></a>
45
- <a href="https://github.com/revanthpobala/homebrew-tap"><img src="https://img.shields.io/badge/Homebrew-Tap-orange?style=for-the-badge&logo=homebrew" alt="Homebrew Tap"></a>
46
- <a href="https://github.com/revanthpobala/devin-cli/actions/workflows/pypi-publish.yml"><img src="https://github.com/revanthpobala/devin-cli/actions/workflows/pypi-publish.yml/badge.svg" alt="Build Status"></a>
47
- </p>
48
-
49
- > **The first unofficial CLI for the world's first AI Software Engineer. Supports both the modern v3 API and the legacy v1 API with full multi-profile management.**
50
-
51
- Devin CLI is designed for high-velocity engineering teams. It strips away the friction of the web UI, allowing you to orchestrate autonomous agents, manage complex contexts, and automate multi-step development workflows through a robust, terminal-first interface.
52
-
53
- ---
54
-
55
- ## ⚡ Quick Start
56
-
57
- ### 1. Installation
58
-
59
- **Recommended: Via Homebrew (macOS)**
60
- ```bash
61
- brew tap revanthpobala/tap
62
- brew install devin-cli
63
- ```
64
-
65
- **Via pipx (Isolated environment)**
66
- ```bash
67
- pipx install devin-cli
68
- ```
69
-
70
- **Via pip**
71
- ```bash
72
- pip install devin-cli
73
- ```
74
-
75
- ### 2. Configuration
76
- ```bash
77
- devin configure
78
- # Paste your API token (apk_... or cog_...) from https://preview.devin.ai/settings
79
- # Select API version: v3 (default) or v1 (legacy)
80
- ```
81
-
82
- ### 3. Your First Session
83
- ```bash
84
- devin sessions create "Identify and fix the race condition in our Redis cache layer"
85
- ```
86
-
87
- ---
88
-
89
- ## 🔑 Multi-Profile Support
90
-
91
- The CLI supports multiple named profiles, letting you manage separate tokens, organizations, and API versions from a single install.
92
-
93
- ```bash
94
- # Configure your personal v3 profile
95
- devin configure --profile personal
96
-
97
- # Configure a service account profile
98
- devin configure --profile service
99
-
100
- # Switch profiles at runtime
101
- devin --profile service sessions list
102
- devin --profile personal sessions create "Fix the failing tests"
103
- ```
104
-
105
- Profiles are stored in `~/.config/devin/config.json` and are fully isolated — including their session deduplication caches and active session IDs.
106
-
107
- ---
108
-
109
- ## 🕹 Legacy v1 API Support
110
-
111
- If you are running an older integration against the original Devin API v1 endpoints, the CLI acts as a transparent proxy and routes calls to the correct v1 URLs without breaking your v3 integrations.
112
-
113
- **To configure a v1 profile:**
114
- ```bash
115
- devin configure --profile legacy
116
- # When prompted for API Version, enter: v1
117
- # Set Base URL to: https://api.devin.ai/v1
118
- ```
119
-
120
- **To use the v1 profile:**
121
- ```bash
122
- devin --profile legacy sessions create "Run the migration script"
123
- devin --profile legacy sessions list
124
- ```
125
-
126
- **What works in v1:**
127
-
128
- | Feature | v1 | v3 |
129
- | :--- | :---: | :---: |
130
- | Sessions (create, list, get, terminate) | ✅ | ✅ |
131
- | Knowledge (create, update, delete) | ✅ | ✅ |
132
- | Playbooks (create, update, delete) | ✅ | ✅ |
133
- | Secrets (list, create, delete) | ✅ | ✅ |
134
- | Attachments (upload, download) | ✅ | ✅ |
135
- | Session Insights | ❌ | ✅ |
136
- | Schedules | ❌ | ✅ |
137
- | Repositories | ❌ | ✅ |
138
- | Enterprise endpoints | ❌ | ✅ |
139
-
140
- > The help menu will show `(Legacy v1 API)` and `(v3 Only)` tags next to commands when a v1 profile is active.
141
-
142
- ---
143
-
144
- ## 🛠 Command Reference
145
-
146
- Every sub-command supports the `--org` flag to override your active organization on the fly.
147
-
148
- | Category | Commands | Description |
149
- | :--- | :--- | :--- |
150
- | **Sessions** | `create`, `list`, `get`, `insights`, `cost`, `messages`, `message`, `terminate` | Core agent lifecycle and analytics. |
151
- | **Knowledge** | `list`, `create`, `delete` | Manage organizational context and AI memory. |
152
- | **Playbooks** | `list`, `create`, `update`, `delete` | Automate complex, multi-step agent workflows. |
153
- | **Secrets** | `list`, `create`, `delete` | Pass API keys and credentials to Devin sessions. |
154
- | **Schedules** | `list`, `create` | Schedule recurring autonomous tasks via CRON. |
155
- | **Repositories** | `list`, `index` | Force indexing of Git repositories for Devin context. |
156
- | **Attachments** | `upload`, `download` | Transfer context files seamlessly. |
157
- | **Enterprise** | `whoami`, `list-orgs` | Administrative identity discovery. |
158
- | **Global** | `configure`, `use` | CLI setup and active session management. |
159
-
160
- ### Key Flags
161
-
162
- | Flag | Description |
163
- | :--- | :--- |
164
- | `--profile <name>` | Select a named configuration profile |
165
- | `--org <id>` | Override the active organization for a single command |
166
- | `--json` | Output raw JSON (available on `sessions list`, `repos list`, `secrets list`) |
167
- | `--force` | Skip duplicate session detection and create anyway |
168
- | `--advanced-mode` | Request an advanced mode session requiring browser auth |
169
-
170
- ---
171
-
172
- ## 🛡 Session Deduplication
173
-
174
- The CLI caches a SHA-256 hash of your last 50 prompts per profile. If you attempt to launch a session with an identical prompt, the CLI halts and alerts you before wasting ACUs:
175
-
176
- ```
177
- Duplicate Detected: You recently created a session with this exact prompt.
178
- Existing Session ID: abc123...
179
- Are you sure you want to create a duplicate session? [y/N]
180
- ```
181
-
182
- Use `--force` to bypass this check.
183
-
184
- ---
185
-
186
- ## 📟 CI/CD Integration
187
-
188
- ```yaml
189
- # Example GitHub Action Step
190
- env:
191
- DEVIN_API_TOKEN: ${{ secrets.DEVIN_API_TOKEN }}
192
- DEVIN_ORG_ID: ${{ secrets.DEVIN_ORG_ID }}
193
- run: |
194
- devin sessions create "Review PR #${{ github.event.pull_request.number }}"
195
- ```
196
-
197
- **Supported environment variables:**
198
-
199
- | Variable | Description |
200
- | :--- | :--- |
201
- | `DEVIN_API_TOKEN` | Your API token (overrides config file) |
202
- | `DEVIN_ORG_ID` | Your organization ID |
203
- | `DEVIN_BASE_URL` | Override the default base URL |
204
- | `DEVIN_API_VERSION` | Set `v1` or `v3` without configuring |
205
-
206
- ---
207
-
208
- ## ⚙️ Engineering Specs
209
-
210
- - **Architecture**: Full v3 API support (including `v3beta1` and `enterprise` endpoints) + v1 legacy proxy
211
- - **Config Storage**: `~/.config/devin/config.json`
212
- - **Platform Support**: Linux, macOS, WSL2
213
- - **Python**: 3.9+
214
-
215
- ---
216
-
217
- ## 🧪 Developer Hub
218
-
219
- ```bash
220
- # Setup
221
- pip install -e ".[dev]"
222
-
223
- # Test Suite
224
- PYTHONPATH=src python3 -m pytest
225
- ```
226
-
227
- ---
228
-
229
- ## 📄 License
230
-
231
- MIT. **Devin CLI** is an unofficial community project and is not affiliated with Cognition AI.
devin_cli-1.2.2/README.md DELETED
@@ -1,195 +0,0 @@
1
- <p align="center">
2
- <img src="https://raw.githubusercontent.com/revanthpobala/devin-cli/main/assets/logo.png" alt="Devin CLI Logo" width="300">
3
- </p>
4
-
5
- # Devin CLI (Unofficial) — The Professional Terminal Interface for Devin AI
6
-
7
- <p align="center">
8
- <a href="https://pypi.org/project/devin-cli/"><img src="https://img.shields.io/pypi/v/devin-cli.svg?style=for-the-badge&color=0294DE" alt="PyPI version"></a>
9
- <a href="https://github.com/revanthpobala/homebrew-tap"><img src="https://img.shields.io/badge/Homebrew-Tap-orange?style=for-the-badge&logo=homebrew" alt="Homebrew Tap"></a>
10
- <a href="https://github.com/revanthpobala/devin-cli/actions/workflows/pypi-publish.yml"><img src="https://github.com/revanthpobala/devin-cli/actions/workflows/pypi-publish.yml/badge.svg" alt="Build Status"></a>
11
- </p>
12
-
13
- > **The first unofficial CLI for the world's first AI Software Engineer. Supports both the modern v3 API and the legacy v1 API with full multi-profile management.**
14
-
15
- Devin CLI is designed for high-velocity engineering teams. It strips away the friction of the web UI, allowing you to orchestrate autonomous agents, manage complex contexts, and automate multi-step development workflows through a robust, terminal-first interface.
16
-
17
- ---
18
-
19
- ## ⚡ Quick Start
20
-
21
- ### 1. Installation
22
-
23
- **Recommended: Via Homebrew (macOS)**
24
- ```bash
25
- brew tap revanthpobala/tap
26
- brew install devin-cli
27
- ```
28
-
29
- **Via pipx (Isolated environment)**
30
- ```bash
31
- pipx install devin-cli
32
- ```
33
-
34
- **Via pip**
35
- ```bash
36
- pip install devin-cli
37
- ```
38
-
39
- ### 2. Configuration
40
- ```bash
41
- devin configure
42
- # Paste your API token (apk_... or cog_...) from https://preview.devin.ai/settings
43
- # Select API version: v3 (default) or v1 (legacy)
44
- ```
45
-
46
- ### 3. Your First Session
47
- ```bash
48
- devin sessions create "Identify and fix the race condition in our Redis cache layer"
49
- ```
50
-
51
- ---
52
-
53
- ## 🔑 Multi-Profile Support
54
-
55
- The CLI supports multiple named profiles, letting you manage separate tokens, organizations, and API versions from a single install.
56
-
57
- ```bash
58
- # Configure your personal v3 profile
59
- devin configure --profile personal
60
-
61
- # Configure a service account profile
62
- devin configure --profile service
63
-
64
- # Switch profiles at runtime
65
- devin --profile service sessions list
66
- devin --profile personal sessions create "Fix the failing tests"
67
- ```
68
-
69
- Profiles are stored in `~/.config/devin/config.json` and are fully isolated — including their session deduplication caches and active session IDs.
70
-
71
- ---
72
-
73
- ## 🕹 Legacy v1 API Support
74
-
75
- If you are running an older integration against the original Devin API v1 endpoints, the CLI acts as a transparent proxy and routes calls to the correct v1 URLs without breaking your v3 integrations.
76
-
77
- **To configure a v1 profile:**
78
- ```bash
79
- devin configure --profile legacy
80
- # When prompted for API Version, enter: v1
81
- # Set Base URL to: https://api.devin.ai/v1
82
- ```
83
-
84
- **To use the v1 profile:**
85
- ```bash
86
- devin --profile legacy sessions create "Run the migration script"
87
- devin --profile legacy sessions list
88
- ```
89
-
90
- **What works in v1:**
91
-
92
- | Feature | v1 | v3 |
93
- | :--- | :---: | :---: |
94
- | Sessions (create, list, get, terminate) | ✅ | ✅ |
95
- | Knowledge (create, update, delete) | ✅ | ✅ |
96
- | Playbooks (create, update, delete) | ✅ | ✅ |
97
- | Secrets (list, create, delete) | ✅ | ✅ |
98
- | Attachments (upload, download) | ✅ | ✅ |
99
- | Session Insights | ❌ | ✅ |
100
- | Schedules | ❌ | ✅ |
101
- | Repositories | ❌ | ✅ |
102
- | Enterprise endpoints | ❌ | ✅ |
103
-
104
- > The help menu will show `(Legacy v1 API)` and `(v3 Only)` tags next to commands when a v1 profile is active.
105
-
106
- ---
107
-
108
- ## 🛠 Command Reference
109
-
110
- Every sub-command supports the `--org` flag to override your active organization on the fly.
111
-
112
- | Category | Commands | Description |
113
- | :--- | :--- | :--- |
114
- | **Sessions** | `create`, `list`, `get`, `insights`, `cost`, `messages`, `message`, `terminate` | Core agent lifecycle and analytics. |
115
- | **Knowledge** | `list`, `create`, `delete` | Manage organizational context and AI memory. |
116
- | **Playbooks** | `list`, `create`, `update`, `delete` | Automate complex, multi-step agent workflows. |
117
- | **Secrets** | `list`, `create`, `delete` | Pass API keys and credentials to Devin sessions. |
118
- | **Schedules** | `list`, `create` | Schedule recurring autonomous tasks via CRON. |
119
- | **Repositories** | `list`, `index` | Force indexing of Git repositories for Devin context. |
120
- | **Attachments** | `upload`, `download` | Transfer context files seamlessly. |
121
- | **Enterprise** | `whoami`, `list-orgs` | Administrative identity discovery. |
122
- | **Global** | `configure`, `use` | CLI setup and active session management. |
123
-
124
- ### Key Flags
125
-
126
- | Flag | Description |
127
- | :--- | :--- |
128
- | `--profile <name>` | Select a named configuration profile |
129
- | `--org <id>` | Override the active organization for a single command |
130
- | `--json` | Output raw JSON (available on `sessions list`, `repos list`, `secrets list`) |
131
- | `--force` | Skip duplicate session detection and create anyway |
132
- | `--advanced-mode` | Request an advanced mode session requiring browser auth |
133
-
134
- ---
135
-
136
- ## 🛡 Session Deduplication
137
-
138
- The CLI caches a SHA-256 hash of your last 50 prompts per profile. If you attempt to launch a session with an identical prompt, the CLI halts and alerts you before wasting ACUs:
139
-
140
- ```
141
- Duplicate Detected: You recently created a session with this exact prompt.
142
- Existing Session ID: abc123...
143
- Are you sure you want to create a duplicate session? [y/N]
144
- ```
145
-
146
- Use `--force` to bypass this check.
147
-
148
- ---
149
-
150
- ## 📟 CI/CD Integration
151
-
152
- ```yaml
153
- # Example GitHub Action Step
154
- env:
155
- DEVIN_API_TOKEN: ${{ secrets.DEVIN_API_TOKEN }}
156
- DEVIN_ORG_ID: ${{ secrets.DEVIN_ORG_ID }}
157
- run: |
158
- devin sessions create "Review PR #${{ github.event.pull_request.number }}"
159
- ```
160
-
161
- **Supported environment variables:**
162
-
163
- | Variable | Description |
164
- | :--- | :--- |
165
- | `DEVIN_API_TOKEN` | Your API token (overrides config file) |
166
- | `DEVIN_ORG_ID` | Your organization ID |
167
- | `DEVIN_BASE_URL` | Override the default base URL |
168
- | `DEVIN_API_VERSION` | Set `v1` or `v3` without configuring |
169
-
170
- ---
171
-
172
- ## ⚙️ Engineering Specs
173
-
174
- - **Architecture**: Full v3 API support (including `v3beta1` and `enterprise` endpoints) + v1 legacy proxy
175
- - **Config Storage**: `~/.config/devin/config.json`
176
- - **Platform Support**: Linux, macOS, WSL2
177
- - **Python**: 3.9+
178
-
179
- ---
180
-
181
- ## 🧪 Developer Hub
182
-
183
- ```bash
184
- # Setup
185
- pip install -e ".[dev]"
186
-
187
- # Test Suite
188
- PYTHONPATH=src python3 -m pytest
189
- ```
190
-
191
- ---
192
-
193
- ## 📄 License
194
-
195
- MIT. **Devin CLI** is an unofficial community project and is not affiliated with Cognition AI.
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