devin-cli 1.2.2__tar.gz → 1.2.4__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.
- devin_cli-1.2.4/PKG-INFO +325 -0
- devin_cli-1.2.4/README.md +289 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/pyproject.toml +1 -1
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v1/knowledge.py +8 -6
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v3/knowledge.py +16 -5
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v3/sessions.py +2 -1
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/cli.py +14 -5
- {devin_cli-1.2.2 → devin_cli-1.2.4}/tests/test_api/test_knowledge.py +5 -3
- devin_cli-1.2.2/PKG-INFO +0 -231
- devin_cli-1.2.2/README.md +0 -195
- {devin_cli-1.2.2 → devin_cli-1.2.4}/.github/workflows/pypi-publish.yml +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/.gitignore +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/CHANGELOG.md +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/LICENSE +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/assets/logo.png +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/generate_facades.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/setup.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/__init__.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/__init__.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/attachments.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/client.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/consumption.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/knowledge.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/members.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/organizations.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/playbooks.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/repositories.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/schedules.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/secrets.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/sessions.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v1/__init__.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v1/attachments.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v1/playbooks.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v1/secrets.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v1/sessions.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v3/__init__.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v3/attachments.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v3/consumption.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v3/members.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v3/organizations.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v3/playbooks.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v3/repositories.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v3/schedules.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/api/v3/secrets.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/src/devin_cli/config.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/tests/__init__.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/tests/conftest.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/tests/test_api/test_attachments.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/tests/test_api/test_playbooks.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/tests/test_api/test_repositories.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/tests/test_api/test_schedules.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/tests/test_api/test_secrets.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/tests/test_api/test_sessions.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/tests/test_cli.py +0 -0
- {devin_cli-1.2.2 → devin_cli-1.2.4}/tests/test_config.py +0 -0
devin_cli-1.2.4/PKG-INFO
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devin-cli
|
|
3
|
+
Version: 1.2.4
|
|
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.
|
|
@@ -5,18 +5,19 @@ def list_knowledge():
|
|
|
5
5
|
return client.get("knowledge")
|
|
6
6
|
|
|
7
7
|
def create_knowledge(
|
|
8
|
-
name: str,
|
|
9
|
-
body: str,
|
|
10
|
-
trigger_description: str,
|
|
8
|
+
name: str = None,
|
|
9
|
+
body: str = None,
|
|
10
|
+
trigger_description: str = None,
|
|
11
11
|
parent_folder_id: str = None,
|
|
12
12
|
pinned_repo: str = None,
|
|
13
13
|
title: str = None, # v3 fallback
|
|
14
|
+
trigger: str = None, # v3 fallback
|
|
14
15
|
**kwargs
|
|
15
16
|
):
|
|
16
17
|
data = {
|
|
17
18
|
"name": name or title,
|
|
18
19
|
"body": body,
|
|
19
|
-
"trigger_description": trigger_description or ""
|
|
20
|
+
"trigger_description": trigger_description or trigger or ""
|
|
20
21
|
}
|
|
21
22
|
if parent_folder_id:
|
|
22
23
|
data["parent_folder_id"] = parent_folder_id
|
|
@@ -31,6 +32,7 @@ def update_knowledge(
|
|
|
31
32
|
body: str = None,
|
|
32
33
|
trigger_description: str = None,
|
|
33
34
|
title: str = None, # v3 fallback
|
|
35
|
+
trigger: str = None, # v3 fallback
|
|
34
36
|
**kwargs
|
|
35
37
|
):
|
|
36
38
|
data = {}
|
|
@@ -38,8 +40,8 @@ def update_knowledge(
|
|
|
38
40
|
data["name"] = name or title
|
|
39
41
|
if body:
|
|
40
42
|
data["body"] = body
|
|
41
|
-
if trigger_description:
|
|
42
|
-
data["trigger_description"] = trigger_description
|
|
43
|
+
if trigger_description or trigger:
|
|
44
|
+
data["trigger_description"] = trigger_description or trigger
|
|
43
45
|
|
|
44
46
|
return client.put(f"knowledge/{knowledge_id}", json=data)
|
|
45
47
|
|
|
@@ -5,12 +5,17 @@ def list_knowledge():
|
|
|
5
5
|
return client.get("knowledge/notes")
|
|
6
6
|
|
|
7
7
|
def create_knowledge(
|
|
8
|
-
title: str,
|
|
9
|
-
body: str,
|
|
8
|
+
title: str = None,
|
|
9
|
+
body: str = None,
|
|
10
|
+
name: str = None,
|
|
11
|
+
trigger: str = "",
|
|
12
|
+
trigger_description: str = "",
|
|
13
|
+
**kwargs
|
|
10
14
|
):
|
|
11
15
|
data = {
|
|
12
|
-
"
|
|
16
|
+
"name": name or title,
|
|
13
17
|
"body": body,
|
|
18
|
+
"trigger": trigger or trigger_description or ""
|
|
14
19
|
}
|
|
15
20
|
return client.post("knowledge/notes", json=data)
|
|
16
21
|
|
|
@@ -21,12 +26,18 @@ def update_knowledge(
|
|
|
21
26
|
note_id: str,
|
|
22
27
|
title: Optional[str] = None,
|
|
23
28
|
body: Optional[str] = None,
|
|
29
|
+
trigger: Optional[str] = None,
|
|
30
|
+
name: Optional[str] = None,
|
|
31
|
+
trigger_description: Optional[str] = None,
|
|
32
|
+
**kwargs
|
|
24
33
|
):
|
|
25
34
|
data = {}
|
|
26
|
-
if title:
|
|
27
|
-
data["
|
|
35
|
+
if title or name:
|
|
36
|
+
data["name"] = title or name
|
|
28
37
|
if body:
|
|
29
38
|
data["body"] = body
|
|
39
|
+
if trigger or trigger_description:
|
|
40
|
+
data["trigger"] = trigger or trigger_description
|
|
30
41
|
|
|
31
42
|
return client.put(f"knowledge/notes/{note_id}", json=data)
|
|
32
43
|
|