devin-cli 0.0.1__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-0.0.1/.github/workflows/pypi-publish.yml +31 -0
- devin_cli-0.0.1/.gitignore +46 -0
- devin_cli-0.0.1/CHANGELOG.md +12 -0
- devin_cli-0.0.1/LICENSE +21 -0
- devin_cli-0.0.1/PKG-INFO +255 -0
- devin_cli-0.0.1/README.md +219 -0
- devin_cli-0.0.1/assets/logo.png +0 -0
- devin_cli-0.0.1/pyproject.toml +55 -0
- devin_cli-0.0.1/setup.py +3 -0
- devin_cli-0.0.1/src/devin_cli/__init__.py +1 -0
- devin_cli-0.0.1/src/devin_cli/api/__init__.py +1 -0
- devin_cli-0.0.1/src/devin_cli/api/attachments.py +12 -0
- devin_cli-0.0.1/src/devin_cli/api/client.py +103 -0
- devin_cli-0.0.1/src/devin_cli/api/knowledge.py +46 -0
- devin_cli-0.0.1/src/devin_cli/api/playbooks.py +27 -0
- devin_cli-0.0.1/src/devin_cli/api/secrets.py +7 -0
- devin_cli-0.0.1/src/devin_cli/api/sessions.py +57 -0
- devin_cli-0.0.1/src/devin_cli/cli.py +565 -0
- devin_cli-0.0.1/src/devin_cli/config.py +63 -0
- devin_cli-0.0.1/tests/__init__.py +1 -0
- devin_cli-0.0.1/tests/test_api/test_attachments.py +47 -0
- devin_cli-0.0.1/tests/test_api/test_knowledge.py +49 -0
- devin_cli-0.0.1/tests/test_api/test_playbooks.py +53 -0
- devin_cli-0.0.1/tests/test_api/test_secrets.py +25 -0
- devin_cli-0.0.1/tests/test_api/test_sessions.py +59 -0
- devin_cli-0.0.1/tests/test_cli.py +28 -0
- devin_cli-0.0.1/tests/test_config.py +27 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-n-publish:
|
|
10
|
+
name: Build and publish to PyPI
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment:
|
|
13
|
+
name: release
|
|
14
|
+
url: https://pypi.org/p/devin-cli
|
|
15
|
+
permissions:
|
|
16
|
+
id-token: write # Mandatory for trusted publishing
|
|
17
|
+
contents: read
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.9"
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install build
|
|
28
|
+
- name: Build binary wheel and source tarball
|
|
29
|
+
run: python -m build
|
|
30
|
+
- name: Publish to PyPI
|
|
31
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
env/
|
|
8
|
+
build/
|
|
9
|
+
develop-eggs/
|
|
10
|
+
dist/
|
|
11
|
+
downloads/
|
|
12
|
+
eggs/
|
|
13
|
+
.eggs/
|
|
14
|
+
lib/
|
|
15
|
+
lib64/
|
|
16
|
+
parts/
|
|
17
|
+
sdist/
|
|
18
|
+
var/
|
|
19
|
+
wheels/
|
|
20
|
+
*.egg-info/
|
|
21
|
+
.installed.cfg
|
|
22
|
+
*.egg
|
|
23
|
+
|
|
24
|
+
# Virtual Environment
|
|
25
|
+
venv/
|
|
26
|
+
ENV/
|
|
27
|
+
|
|
28
|
+
# Testing
|
|
29
|
+
.tox/
|
|
30
|
+
.coverage
|
|
31
|
+
.cache
|
|
32
|
+
nosetests.xml
|
|
33
|
+
coverage.xml
|
|
34
|
+
*.cover
|
|
35
|
+
.pytest_cache/
|
|
36
|
+
|
|
37
|
+
# IDE
|
|
38
|
+
.vscode/
|
|
39
|
+
.idea/
|
|
40
|
+
*.swp
|
|
41
|
+
*.swo
|
|
42
|
+
|
|
43
|
+
# Config
|
|
44
|
+
.env
|
|
45
|
+
.devbox/
|
|
46
|
+
~/.config/devin/config.json
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.1.0] - 2024-05-23
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- Initial release
|
|
7
|
+
- Session management (create, list, get, terminate)
|
|
8
|
+
- Message sending and history viewing
|
|
9
|
+
- Watch command for live status polling
|
|
10
|
+
- File attachments
|
|
11
|
+
- Knowledge, Playbook, and Secret management commands
|
|
12
|
+
- Shell completion support
|
devin_cli-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Devin CLI Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
devin_cli-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devin-cli
|
|
3
|
+
Version: 0.0.1
|
|
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="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="LICENSE"><img src="https://img.shields.io/github/license/revanthpobala/devin-cli?style=for-the-badge&color=0294DE" alt="License"></a>
|
|
45
|
+
<a href="https://github.com/revanthpobala/devin-cli/stargazers"><img src="https://img.shields.io/github/stars/revanthpobala/devin-cli?style=for-the-badge&color=FAD000" alt="GitHub stars"></a>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
> **The first unofficial CLI for the world's first AI Software Engineer.**
|
|
49
|
+
|
|
50
|
+
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.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## โก Quick Start
|
|
55
|
+
|
|
56
|
+
### 1. Installation
|
|
57
|
+
```bash
|
|
58
|
+
# Recommended: Install via pipx for an isolated environment
|
|
59
|
+
pipx install devin-cli
|
|
60
|
+
|
|
61
|
+
# Or via standard pip
|
|
62
|
+
pip install devin-cli
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 2. Configuration
|
|
66
|
+
```bash
|
|
67
|
+
devin configure
|
|
68
|
+
# Paste your API token from https://preview.devin.ai/settings
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 3. Your First Session
|
|
72
|
+
```bash
|
|
73
|
+
devin create-session "Identify and fix the race condition in our Redis cache layer"
|
|
74
|
+
devin watch
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## ๐ Command Cheat Sheet
|
|
80
|
+
|
|
81
|
+
### Core Workflow
|
|
82
|
+
| Command | Example Usage |
|
|
83
|
+
| :--- | :--- |
|
|
84
|
+
| **`create-session`** | `devin create-session "Refactor the Auth module"` |
|
|
85
|
+
| **`list-sessions`** | `devin list-sessions --limit 10` |
|
|
86
|
+
| **`watch`** | `devin watch` (Live terminal monitoring) |
|
|
87
|
+
| **`message`** | `devin message "Actually, use the standard library instead of the third-party package"` |
|
|
88
|
+
| **`open`** | `devin open` (Jump to the web UI) |
|
|
89
|
+
| **`status`** | `devin status` (Quick pulse check) |
|
|
90
|
+
| **`terminate`** | `devin terminate` |
|
|
91
|
+
|
|
92
|
+
### Context & Assets
|
|
93
|
+
| Command | Example Usage |
|
|
94
|
+
| :--- | :--- |
|
|
95
|
+
| **`attach`** | `devin attach ./specs/v2.md "Implement the new billing logic"` |
|
|
96
|
+
| **`upload`** | `devin upload ./db_dump.sql` |
|
|
97
|
+
| **`list-knowledge`** | `devin list-knowledge` |
|
|
98
|
+
|
|
99
|
+
## ๐ Detailed Command Reference
|
|
100
|
+
|
|
101
|
+
Every command supports the `--help` flag for real-time documentation. Below is an exhaustive reference for the core engineering workflow.
|
|
102
|
+
|
|
103
|
+
<details>
|
|
104
|
+
<summary><b>๐ create-session</b> โ Start a new autonomous agent</summary>
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
Usage: devin create-session [OPTIONS] [PROMPT]
|
|
108
|
+
|
|
109
|
+
Options:
|
|
110
|
+
-t, --title TEXT Custom session title
|
|
111
|
+
-f, --file PATH Read prompt from file
|
|
112
|
+
-s, --secret KEY=VALUE Inject session-specific secrets
|
|
113
|
+
-k, --knowledge-id TEXT Knowledge IDs to include
|
|
114
|
+
--secret-id TEXT Stored secret IDs to include
|
|
115
|
+
--max-acu INTEGER Maximum ACU limit
|
|
116
|
+
--unlisted Create unlisted session
|
|
117
|
+
-i, --idempotent Idempotent creation
|
|
118
|
+
```
|
|
119
|
+
</details>
|
|
120
|
+
|
|
121
|
+
<details>
|
|
122
|
+
<summary><b>๐ chain</b> โ Orchestrate multi-step workflows (Beta)</summary>
|
|
123
|
+
|
|
124
|
+
```text
|
|
125
|
+
Usage: devin chain [OPTIONS] [PROMPT]
|
|
126
|
+
|
|
127
|
+
Options:
|
|
128
|
+
--playbooks TEXT Comma-separated playbook IDs
|
|
129
|
+
-f, --file PATH Workflow YAML file
|
|
130
|
+
```
|
|
131
|
+
</details>
|
|
132
|
+
|
|
133
|
+
<details>
|
|
134
|
+
<summary><b>๐ attach</b> โ Upload context and initiate task</summary>
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
Usage: devin attach [OPTIONS] FILE PROMPT
|
|
138
|
+
|
|
139
|
+
Arguments:
|
|
140
|
+
FILE File to upload and link (ZIP, PDF, Codebase) [required]
|
|
141
|
+
PROMPT Initial instruction for Devin [required]
|
|
142
|
+
```
|
|
143
|
+
</details>
|
|
144
|
+
|
|
145
|
+
<details>
|
|
146
|
+
<summary><b>๐ list-sessions</b> โ Manage your active agents</summary>
|
|
147
|
+
|
|
148
|
+
```text
|
|
149
|
+
Usage: devin list-sessions [OPTIONS]
|
|
150
|
+
|
|
151
|
+
Options:
|
|
152
|
+
--limit INTEGER Number of sessions to list [default: 10]
|
|
153
|
+
--json Output as machine-readable JSON
|
|
154
|
+
```
|
|
155
|
+
</details>
|
|
156
|
+
|
|
157
|
+
<details>
|
|
158
|
+
<summary><b>โ๏ธ configure</b> โ Setup your environment</summary>
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
Usage: devin configure [OPTIONS]
|
|
162
|
+
|
|
163
|
+
Initializes your local config with the DEVIN_API_TOKEN.
|
|
164
|
+
```
|
|
165
|
+
</details>
|
|
166
|
+
|
|
167
|
+
<details>
|
|
168
|
+
<summary><b>๐ watch</b> โ Terminal-native live monitoring</summary>
|
|
169
|
+
|
|
170
|
+
```text
|
|
171
|
+
Usage: devin watch [OPTIONS] [SESSION_ID]
|
|
172
|
+
|
|
173
|
+
Streams the live logs and terminal output from Devin directly to your console.
|
|
174
|
+
```
|
|
175
|
+
</details>
|
|
176
|
+
|
|
177
|
+
<details>
|
|
178
|
+
<summary><b>๐ terminate</b> โ Stop an active agent</summary>
|
|
179
|
+
|
|
180
|
+
```text
|
|
181
|
+
Usage: devin terminate [OPTIONS] [SESSION_ID]
|
|
182
|
+
|
|
183
|
+
Permanently stops a session and releases all associated resources.
|
|
184
|
+
```
|
|
185
|
+
</details>
|
|
186
|
+
|
|
187
|
+
<details>
|
|
188
|
+
<summary><b>๐ open</b> โ Jump to the Web UI</summary>
|
|
189
|
+
|
|
190
|
+
```text
|
|
191
|
+
Usage: devin open [OPTIONS] [SESSION_ID]
|
|
192
|
+
|
|
193
|
+
Instantly opens the specified session in your default web browser for visual debugging.
|
|
194
|
+
```
|
|
195
|
+
</details>
|
|
196
|
+
|
|
197
|
+
<details>
|
|
198
|
+
<summary><b>๐ง Knowledge & Playbooks</b> โ Advanced CRUD</summary>
|
|
199
|
+
|
|
200
|
+
| Command | Purpose |
|
|
201
|
+
| :--- | :--- |
|
|
202
|
+
| `list-knowledge` | View all shared organizational context. |
|
|
203
|
+
| `create-knowledge` | Add new documentation or code references. |
|
|
204
|
+
| `update-knowledge` | Refresh existing context. |
|
|
205
|
+
| `list-playbooks` | View all available team playbooks. |
|
|
206
|
+
| `create-playbook` | Design a new standardized workflow. |
|
|
207
|
+
|
|
208
|
+
</details>
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## ๐ Integration & Automation
|
|
213
|
+
|
|
214
|
+
### GitHub Actions Integration
|
|
215
|
+
Devin CLI is designed for CI/CD. Use environment variables to bypass the `configure` step.
|
|
216
|
+
```bash
|
|
217
|
+
# Example GitHub Action Step
|
|
218
|
+
env:
|
|
219
|
+
DEVIN_API_TOKEN: ${{ secrets.DEVIN_API_TOKEN }}
|
|
220
|
+
run: |
|
|
221
|
+
devin create-session "Review PR #${{ github.event.pull_request.number }}" --unlisted
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Advanced Scripting
|
|
225
|
+
Pipe Devin's intelligence into your existing toolchain.
|
|
226
|
+
```bash
|
|
227
|
+
# Close all blocked sessions
|
|
228
|
+
devin list-sessions --json | jq -r '.[] | select(.status_enum=="blocked") | .session_id' | xargs -I {} devin terminate {}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## โ๏ธ Engineering Specs
|
|
234
|
+
- **Config Storage**: `~/.config/devin/config.json`
|
|
235
|
+
- **Environment Variables**: `DEVIN_API_TOKEN`, `DEVIN_BASE_URL`
|
|
236
|
+
- **Platform Support**: Linux, macOS, WSL2
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## ๐งช Developer Hub
|
|
241
|
+
```bash
|
|
242
|
+
# Setup
|
|
243
|
+
pip install -e ".[dev]"
|
|
244
|
+
|
|
245
|
+
# Test Suite (100% path coverage)
|
|
246
|
+
PYTHONPATH=src pytest
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## ๐ License
|
|
252
|
+
MIT. **Devin CLI** is an unofficial community project and is not affiliated with Cognition AI.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
<!-- SEO Keywords: Devin AI, AI Software Engineer, Autonomous AI Agent, Devin CLI, Terminal AI, Coding Agent, AI Orchestration, Software Engineering Automation, GitHub Actions AI, Cognition AI, Devin API -->
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="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="LICENSE"><img src="https://img.shields.io/github/license/revanthpobala/devin-cli?style=for-the-badge&color=0294DE" alt="License"></a>
|
|
9
|
+
<a href="https://github.com/revanthpobala/devin-cli/stargazers"><img src="https://img.shields.io/github/stars/revanthpobala/devin-cli?style=for-the-badge&color=FAD000" alt="GitHub stars"></a>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
> **The first unofficial CLI for the world's first AI Software Engineer.**
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## โก Quick Start
|
|
19
|
+
|
|
20
|
+
### 1. Installation
|
|
21
|
+
```bash
|
|
22
|
+
# Recommended: Install via pipx for an isolated environment
|
|
23
|
+
pipx install devin-cli
|
|
24
|
+
|
|
25
|
+
# Or via standard pip
|
|
26
|
+
pip install devin-cli
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 2. Configuration
|
|
30
|
+
```bash
|
|
31
|
+
devin configure
|
|
32
|
+
# Paste your API token from https://preview.devin.ai/settings
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 3. Your First Session
|
|
36
|
+
```bash
|
|
37
|
+
devin create-session "Identify and fix the race condition in our Redis cache layer"
|
|
38
|
+
devin watch
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## ๐ Command Cheat Sheet
|
|
44
|
+
|
|
45
|
+
### Core Workflow
|
|
46
|
+
| Command | Example Usage |
|
|
47
|
+
| :--- | :--- |
|
|
48
|
+
| **`create-session`** | `devin create-session "Refactor the Auth module"` |
|
|
49
|
+
| **`list-sessions`** | `devin list-sessions --limit 10` |
|
|
50
|
+
| **`watch`** | `devin watch` (Live terminal monitoring) |
|
|
51
|
+
| **`message`** | `devin message "Actually, use the standard library instead of the third-party package"` |
|
|
52
|
+
| **`open`** | `devin open` (Jump to the web UI) |
|
|
53
|
+
| **`status`** | `devin status` (Quick pulse check) |
|
|
54
|
+
| **`terminate`** | `devin terminate` |
|
|
55
|
+
|
|
56
|
+
### Context & Assets
|
|
57
|
+
| Command | Example Usage |
|
|
58
|
+
| :--- | :--- |
|
|
59
|
+
| **`attach`** | `devin attach ./specs/v2.md "Implement the new billing logic"` |
|
|
60
|
+
| **`upload`** | `devin upload ./db_dump.sql` |
|
|
61
|
+
| **`list-knowledge`** | `devin list-knowledge` |
|
|
62
|
+
|
|
63
|
+
## ๐ Detailed Command Reference
|
|
64
|
+
|
|
65
|
+
Every command supports the `--help` flag for real-time documentation. Below is an exhaustive reference for the core engineering workflow.
|
|
66
|
+
|
|
67
|
+
<details>
|
|
68
|
+
<summary><b>๐ create-session</b> โ Start a new autonomous agent</summary>
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
Usage: devin create-session [OPTIONS] [PROMPT]
|
|
72
|
+
|
|
73
|
+
Options:
|
|
74
|
+
-t, --title TEXT Custom session title
|
|
75
|
+
-f, --file PATH Read prompt from file
|
|
76
|
+
-s, --secret KEY=VALUE Inject session-specific secrets
|
|
77
|
+
-k, --knowledge-id TEXT Knowledge IDs to include
|
|
78
|
+
--secret-id TEXT Stored secret IDs to include
|
|
79
|
+
--max-acu INTEGER Maximum ACU limit
|
|
80
|
+
--unlisted Create unlisted session
|
|
81
|
+
-i, --idempotent Idempotent creation
|
|
82
|
+
```
|
|
83
|
+
</details>
|
|
84
|
+
|
|
85
|
+
<details>
|
|
86
|
+
<summary><b>๐ chain</b> โ Orchestrate multi-step workflows (Beta)</summary>
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
Usage: devin chain [OPTIONS] [PROMPT]
|
|
90
|
+
|
|
91
|
+
Options:
|
|
92
|
+
--playbooks TEXT Comma-separated playbook IDs
|
|
93
|
+
-f, --file PATH Workflow YAML file
|
|
94
|
+
```
|
|
95
|
+
</details>
|
|
96
|
+
|
|
97
|
+
<details>
|
|
98
|
+
<summary><b>๐ attach</b> โ Upload context and initiate task</summary>
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
Usage: devin attach [OPTIONS] FILE PROMPT
|
|
102
|
+
|
|
103
|
+
Arguments:
|
|
104
|
+
FILE File to upload and link (ZIP, PDF, Codebase) [required]
|
|
105
|
+
PROMPT Initial instruction for Devin [required]
|
|
106
|
+
```
|
|
107
|
+
</details>
|
|
108
|
+
|
|
109
|
+
<details>
|
|
110
|
+
<summary><b>๐ list-sessions</b> โ Manage your active agents</summary>
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
Usage: devin list-sessions [OPTIONS]
|
|
114
|
+
|
|
115
|
+
Options:
|
|
116
|
+
--limit INTEGER Number of sessions to list [default: 10]
|
|
117
|
+
--json Output as machine-readable JSON
|
|
118
|
+
```
|
|
119
|
+
</details>
|
|
120
|
+
|
|
121
|
+
<details>
|
|
122
|
+
<summary><b>โ๏ธ configure</b> โ Setup your environment</summary>
|
|
123
|
+
|
|
124
|
+
```text
|
|
125
|
+
Usage: devin configure [OPTIONS]
|
|
126
|
+
|
|
127
|
+
Initializes your local config with the DEVIN_API_TOKEN.
|
|
128
|
+
```
|
|
129
|
+
</details>
|
|
130
|
+
|
|
131
|
+
<details>
|
|
132
|
+
<summary><b>๐ watch</b> โ Terminal-native live monitoring</summary>
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
Usage: devin watch [OPTIONS] [SESSION_ID]
|
|
136
|
+
|
|
137
|
+
Streams the live logs and terminal output from Devin directly to your console.
|
|
138
|
+
```
|
|
139
|
+
</details>
|
|
140
|
+
|
|
141
|
+
<details>
|
|
142
|
+
<summary><b>๐ terminate</b> โ Stop an active agent</summary>
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
Usage: devin terminate [OPTIONS] [SESSION_ID]
|
|
146
|
+
|
|
147
|
+
Permanently stops a session and releases all associated resources.
|
|
148
|
+
```
|
|
149
|
+
</details>
|
|
150
|
+
|
|
151
|
+
<details>
|
|
152
|
+
<summary><b>๐ open</b> โ Jump to the Web UI</summary>
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
Usage: devin open [OPTIONS] [SESSION_ID]
|
|
156
|
+
|
|
157
|
+
Instantly opens the specified session in your default web browser for visual debugging.
|
|
158
|
+
```
|
|
159
|
+
</details>
|
|
160
|
+
|
|
161
|
+
<details>
|
|
162
|
+
<summary><b>๐ง Knowledge & Playbooks</b> โ Advanced CRUD</summary>
|
|
163
|
+
|
|
164
|
+
| Command | Purpose |
|
|
165
|
+
| :--- | :--- |
|
|
166
|
+
| `list-knowledge` | View all shared organizational context. |
|
|
167
|
+
| `create-knowledge` | Add new documentation or code references. |
|
|
168
|
+
| `update-knowledge` | Refresh existing context. |
|
|
169
|
+
| `list-playbooks` | View all available team playbooks. |
|
|
170
|
+
| `create-playbook` | Design a new standardized workflow. |
|
|
171
|
+
|
|
172
|
+
</details>
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## ๐ Integration & Automation
|
|
177
|
+
|
|
178
|
+
### GitHub Actions Integration
|
|
179
|
+
Devin CLI is designed for CI/CD. Use environment variables to bypass the `configure` step.
|
|
180
|
+
```bash
|
|
181
|
+
# Example GitHub Action Step
|
|
182
|
+
env:
|
|
183
|
+
DEVIN_API_TOKEN: ${{ secrets.DEVIN_API_TOKEN }}
|
|
184
|
+
run: |
|
|
185
|
+
devin create-session "Review PR #${{ github.event.pull_request.number }}" --unlisted
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Advanced Scripting
|
|
189
|
+
Pipe Devin's intelligence into your existing toolchain.
|
|
190
|
+
```bash
|
|
191
|
+
# Close all blocked sessions
|
|
192
|
+
devin list-sessions --json | jq -r '.[] | select(.status_enum=="blocked") | .session_id' | xargs -I {} devin terminate {}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## โ๏ธ Engineering Specs
|
|
198
|
+
- **Config Storage**: `~/.config/devin/config.json`
|
|
199
|
+
- **Environment Variables**: `DEVIN_API_TOKEN`, `DEVIN_BASE_URL`
|
|
200
|
+
- **Platform Support**: Linux, macOS, WSL2
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## ๐งช Developer Hub
|
|
205
|
+
```bash
|
|
206
|
+
# Setup
|
|
207
|
+
pip install -e ".[dev]"
|
|
208
|
+
|
|
209
|
+
# Test Suite (100% path coverage)
|
|
210
|
+
PYTHONPATH=src pytest
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## ๐ License
|
|
216
|
+
MIT. **Devin CLI** is an unofficial community project and is not affiliated with Cognition AI.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
<!-- SEO Keywords: Devin AI, AI Software Engineer, Autonomous AI Agent, Devin CLI, Terminal AI, Coding Agent, AI Orchestration, Software Engineering Automation, GitHub Actions AI, Cognition AI, Devin API -->
|
|
Binary file
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "devin-cli"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "Unofficial CLI for Devin AI - The first AI Software Engineer"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "revanth", email = "revanth@example.com" },
|
|
8
|
+
]
|
|
9
|
+
license = "MIT"
|
|
10
|
+
keywords = ["devin", "ai", "agent", "software-engineer", "autonomous", "cli", "terminal", "cognition", "automation"]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Development Status :: 4 - Beta",
|
|
13
|
+
"Environment :: Console",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3.9",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Topic :: Software Development :: Build Tools",
|
|
23
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
24
|
+
]
|
|
25
|
+
requires-python = ">=3.9"
|
|
26
|
+
dependencies = [
|
|
27
|
+
"typer[all]>=0.9.0",
|
|
28
|
+
"httpx>=0.27.0",
|
|
29
|
+
"rich>=13.0.0",
|
|
30
|
+
"pyyaml>=6.0",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.optional-dependencies]
|
|
34
|
+
dev = [
|
|
35
|
+
"pytest>=7.0",
|
|
36
|
+
"respx>=0.20.0",
|
|
37
|
+
"pytest-cov>=4.0.0",
|
|
38
|
+
"build",
|
|
39
|
+
"twine",
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
[project.scripts]
|
|
43
|
+
devin = "devin_cli.cli:app"
|
|
44
|
+
|
|
45
|
+
[project.urls]
|
|
46
|
+
Homepage = "https://github.com/revanthpobala/devin-cli"
|
|
47
|
+
Repository = "https://github.com/revanthpobala/devin-cli.git"
|
|
48
|
+
Issues = "https://github.com/revanthpobala/devin-cli/issues"
|
|
49
|
+
|
|
50
|
+
[build-system]
|
|
51
|
+
requires = ["hatchling"]
|
|
52
|
+
build-backend = "hatchling.build"
|
|
53
|
+
|
|
54
|
+
[tool.hatch.build.targets.wheel]
|
|
55
|
+
packages = ["src/devin_cli"]
|
devin_cli-0.0.1/setup.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# API package initialization
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from devin_cli.api.client import client
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
def upload_file(file_path: str):
|
|
5
|
+
path = Path(file_path)
|
|
6
|
+
if not path.exists():
|
|
7
|
+
raise FileNotFoundError(f"File not found: {file_path}")
|
|
8
|
+
|
|
9
|
+
with open(path, "rb") as f:
|
|
10
|
+
files = {"file": f}
|
|
11
|
+
# client.post handles Content-Type removal for files
|
|
12
|
+
return client.post("attachments", files=files)
|