devduck 0.2.0__py3-none-any.whl → 0.4.0__py3-none-any.whl
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.
Potentially problematic release.
This version of devduck might be problematic. Click here for more details.
- devduck/__init__.py +325 -99
- devduck/_version.py +2 -2
- devduck/tools/create_subagent.py +659 -0
- devduck/tools/mcp_server.py +34 -6
- devduck/tools/store_in_kb.py +187 -0
- devduck/tools/tcp.py +0 -3
- devduck/tools/use_github.py +438 -0
- devduck/tools/websocket.py +1 -1
- devduck-0.4.0.dist-info/METADATA +260 -0
- devduck-0.4.0.dist-info/RECORD +18 -0
- devduck/install.sh +0 -42
- devduck-0.2.0.dist-info/METADATA +0 -143
- devduck-0.2.0.dist-info/RECORD +0 -16
- {devduck-0.2.0.dist-info → devduck-0.4.0.dist-info}/WHEEL +0 -0
- {devduck-0.2.0.dist-info → devduck-0.4.0.dist-info}/entry_points.txt +0 -0
- {devduck-0.2.0.dist-info → devduck-0.4.0.dist-info}/licenses/LICENSE +0 -0
- {devduck-0.2.0.dist-info → devduck-0.4.0.dist-info}/top_level.txt +0 -0
devduck/tools/websocket.py
CHANGED
|
@@ -261,7 +261,7 @@ async def handle_websocket_client(websocket, system_prompt: str):
|
|
|
261
261
|
# Send welcome message
|
|
262
262
|
welcome = {
|
|
263
263
|
"type": "connected",
|
|
264
|
-
"data": "🦆 Welcome to DevDuck
|
|
264
|
+
"data": "🦆 Welcome to DevDuck!",
|
|
265
265
|
"timestamp": time.time(),
|
|
266
266
|
}
|
|
267
267
|
await websocket.send(json.dumps(welcome))
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devduck
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: 🦆 Extreme minimalist self-adapting AI agent - one file, self-healing, runtime dependencies
|
|
5
|
+
Author-email: duck <hey@devduck.dev>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/cagataycali/devduck
|
|
8
|
+
Project-URL: Repository, https://github.com/cagataycali/devduck.git
|
|
9
|
+
Project-URL: Documentation, https://github.com/cagataycali/devduck#readme
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/cagataycali/devduck/issues
|
|
11
|
+
Keywords: ai,agent,minimalist,self-healing,ollama,strands-agents
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: System Administrators
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Classifier: Topic :: System :: Systems Administration
|
|
25
|
+
Classifier: Topic :: Utilities
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: strands-agents
|
|
30
|
+
Requires-Dist: prompt_toolkit
|
|
31
|
+
Requires-Dist: strands-agents[ollama]
|
|
32
|
+
Requires-Dist: strands-agents-tools
|
|
33
|
+
Requires-Dist: strands-agentcore-tools
|
|
34
|
+
Requires-Dist: beautifulsoup4
|
|
35
|
+
Requires-Dist: colorama
|
|
36
|
+
Requires-Dist: websockets
|
|
37
|
+
Requires-Dist: strands-mcp-server
|
|
38
|
+
Provides-Extra: all
|
|
39
|
+
Requires-Dist: strands-agents[openai]; extra == "all"
|
|
40
|
+
Requires-Dist: strands-agents[anthropic]; extra == "all"
|
|
41
|
+
Requires-Dist: strands-fun-tools[audio]; extra == "all"
|
|
42
|
+
Requires-Dist: strands-fun-tools[vision]; extra == "all"
|
|
43
|
+
Requires-Dist: strands-fun-tools[all]; extra == "all"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
# 🦆 DevDuck
|
|
47
|
+
|
|
48
|
+
**Self-healing agent. One file. Zero config.**
|
|
49
|
+
|
|
50
|
+
Minimalist AI that adapts to your environment and fixes itself when things break.
|
|
51
|
+
|
|
52
|
+
## Install
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pipx install "devduck[all]" # Full install (recommended)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Requires: Python 3.10+, Ollama (or set `MODEL_PROVIDER`)
|
|
59
|
+
|
|
60
|
+
## Quick Start
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
devduck # Interactive mode (auto-starts servers)
|
|
64
|
+
devduck "analyze this code" # CLI mode
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
import devduck
|
|
69
|
+
devduck("calculate 2+2") # Python API
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Core Features
|
|
73
|
+
|
|
74
|
+
- **🔧 Self-healing** - Auto-fixes dependencies, models, errors
|
|
75
|
+
- **🔥 Hot-reload** - Save `.py` files in `./tools/`, use instantly (no restart)
|
|
76
|
+
- **🧠 RAG memory** - Set `STRANDS_KNOWLEDGE_BASE_ID` for automatic context retrieval/storage
|
|
77
|
+
- **🌍 Multi-protocol** - TCP (9999), WebSocket (8080), MCP (8000), CLI, Python
|
|
78
|
+
- **📚 19+ tools** - shell, editor, calculator, python, GitHub, subagents, and more
|
|
79
|
+
- **🎯 Adaptive** - Auto-selects model by OS (macOS: 1.7b, Linux: 30b)
|
|
80
|
+
|
|
81
|
+
## Auto-Started Servers
|
|
82
|
+
|
|
83
|
+
When you run `devduck`, 3 servers start automatically:
|
|
84
|
+
|
|
85
|
+
| Server | Endpoint | Usage |
|
|
86
|
+
|--------|----------|-------|
|
|
87
|
+
| 🌐 **Web UI** | [cagataycali.github.io/devduck](http://cagataycali.github.io/devduck) | Browser interface |
|
|
88
|
+
| 🔌 **TCP** | `localhost:9999` | `nc localhost 9999` |
|
|
89
|
+
| 🌊 **WebSocket** | `ws://localhost:8080` | Structured JSON messages |
|
|
90
|
+
| 🔗 **MCP** | `http://localhost:8000/mcp` | Model Context Protocol |
|
|
91
|
+
|
|
92
|
+
**Customize ports:**
|
|
93
|
+
```bash
|
|
94
|
+
devduck --tcp-port 9000 --ws-port 8001 --mcp-port 3000
|
|
95
|
+
devduck --no-tcp --no-ws # Disable specific servers
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Connect Options
|
|
99
|
+
|
|
100
|
+
### MCP Client (Claude Desktop)
|
|
101
|
+
|
|
102
|
+
**Simple stdio mode (recommended):**
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"mcpServers": {
|
|
106
|
+
"devduck": {
|
|
107
|
+
"command": "uvx",
|
|
108
|
+
"args": ["devduck", "--mcp"]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Proxy mode (if devduck already running):**
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"mcpServers": {
|
|
118
|
+
"devduck": {
|
|
119
|
+
"command": "uvx",
|
|
120
|
+
"args": ["strands-mcp-server", "--upstream-url", "http://localhost:8000/mcp/"]
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Terminal (TCP)
|
|
127
|
+
```bash
|
|
128
|
+
nc localhost 9999
|
|
129
|
+
> analyze logs
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Shell Prefix
|
|
133
|
+
```bash
|
|
134
|
+
devduck
|
|
135
|
+
🦆 ! git status # Run shell commands with !
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Hot-Reload Tool Creation
|
|
139
|
+
|
|
140
|
+
Create tools instantly—no restart needed:
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
# ./tools/tip_calc.py
|
|
144
|
+
from strands import tool
|
|
145
|
+
|
|
146
|
+
@tool
|
|
147
|
+
def calculate_tip(amount: float, percent: float = 15.0) -> str:
|
|
148
|
+
"""Calculate restaurant tip."""
|
|
149
|
+
tip = amount * (percent / 100)
|
|
150
|
+
return f"Tip: ${tip:.2f} | Total: ${amount + tip:.2f}"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Save → Available instantly → Use: `devduck "calculate tip for $42"`
|
|
154
|
+
|
|
155
|
+
## Built-in Tools (19+)
|
|
156
|
+
|
|
157
|
+
| Category | Tools |
|
|
158
|
+
|----------|-------|
|
|
159
|
+
| **Development** | shell, editor, python_repl, load_tool, environment |
|
|
160
|
+
| **GitHub** | use_github, create_subagent, gist, add_comment, list_issues |
|
|
161
|
+
| **Network** | tcp, websocket, mcp_server, mcp_client, http_request |
|
|
162
|
+
| **AI** | use_agent, install_tools, retrieve, store_in_kb |
|
|
163
|
+
| **Utilities** | calculator, image_reader, scraper, system_prompt, view_logs |
|
|
164
|
+
|
|
165
|
+
## Multi-Model Support
|
|
166
|
+
|
|
167
|
+
Switch models via environment variables:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# Bedrock (Claude)
|
|
171
|
+
export MODEL_PROVIDER="bedrock"
|
|
172
|
+
export STRANDS_MODEL_ID="us.anthropic.claude-sonnet-4-5-20250929-v1:0"
|
|
173
|
+
export STRANDS_MAX_TOKENS="64000"
|
|
174
|
+
|
|
175
|
+
# Anthropic API
|
|
176
|
+
export MODEL_PROVIDER="anthropic"
|
|
177
|
+
export STRANDS_MODEL_ID="claude-sonnet-4-20250514"
|
|
178
|
+
|
|
179
|
+
# Ollama (default)
|
|
180
|
+
export MODEL_PROVIDER="ollama"
|
|
181
|
+
export OLLAMA_HOST="http://localhost:11434"
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Knowledge Base (RAG)
|
|
185
|
+
|
|
186
|
+
Enable automatic memory across sessions:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
export STRANDS_KNOWLEDGE_BASE_ID="your-kb-id"
|
|
190
|
+
devduck # Auto-retrieves context before queries, stores after responses
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Works with AWS Bedrock Knowledge Bases.
|
|
194
|
+
|
|
195
|
+
## Environment Variables
|
|
196
|
+
|
|
197
|
+
| Variable | Default | Description |
|
|
198
|
+
|----------|---------|-------------|
|
|
199
|
+
| `MODEL_PROVIDER` | `ollama` | Model provider (bedrock, anthropic, ollama) |
|
|
200
|
+
| `STRANDS_KNOWLEDGE_BASE_ID` | - | Enable auto-RAG with KB ID |
|
|
201
|
+
| `DEVDUCK_TCP_PORT` | `9999` | TCP server port |
|
|
202
|
+
| `DEVDUCK_WS_PORT` | `8080` | WebSocket port |
|
|
203
|
+
| `DEVDUCK_MCP_PORT` | `8000` | MCP server port |
|
|
204
|
+
| `DEVDUCK_ENABLE_TCP` | `true` | Enable TCP server |
|
|
205
|
+
| `DEVDUCK_ENABLE_WS` | `true` | Enable WebSocket |
|
|
206
|
+
| `DEVDUCK_ENABLE_MCP` | `true` | Enable MCP server |
|
|
207
|
+
| `DEVDUCK_LOG_LINE_COUNT` | `50` | Log lines in context |
|
|
208
|
+
| `SYSTEM_PROMPT` | - | Custom system prompt |
|
|
209
|
+
|
|
210
|
+
## Dynamic Tool Loading
|
|
211
|
+
|
|
212
|
+
Load tools from any Python package at runtime:
|
|
213
|
+
|
|
214
|
+
```python
|
|
215
|
+
devduck
|
|
216
|
+
🦆 install_tools(action="install_and_load",
|
|
217
|
+
package="strands-fun-tools",
|
|
218
|
+
module="strands_fun_tools")
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
No restart required—tools available immediately.
|
|
222
|
+
|
|
223
|
+
## System Prompt Management
|
|
224
|
+
|
|
225
|
+
Modify agent behavior dynamically:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
devduck
|
|
229
|
+
🦆 system_prompt(action="update", prompt="You are a senior Python expert.")
|
|
230
|
+
🦆 system_prompt(action="view") # See current prompt
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Logs
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
devduck
|
|
237
|
+
🦆 view_logs(action="view", lines=100)
|
|
238
|
+
🦆 view_logs(action="search", pattern="error")
|
|
239
|
+
🦆 view_logs(action="stats")
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Log location: `/tmp/devduck/logs/devduck.log`
|
|
243
|
+
|
|
244
|
+
## GitHub Actions
|
|
245
|
+
|
|
246
|
+
Run DevDuck in CI/CD:
|
|
247
|
+
|
|
248
|
+
```yaml
|
|
249
|
+
- name: DevDuck Analysis
|
|
250
|
+
uses: cagataycali/devduck@main
|
|
251
|
+
with:
|
|
252
|
+
query: "analyze test coverage"
|
|
253
|
+
model: "us.anthropic.claude-sonnet-4-20250514-v1:0"
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
**One file. 19+ tools. Self-healing. Hot-reload. RAG memory.**
|
|
259
|
+
|
|
260
|
+
*Built with [Strands Agents SDK](https://github.com/strands-agents/sdk-python)*
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
devduck/__init__.py,sha256=3Iks5DQyjZgf7Y3AE3SO5Cv3XRKasVDhvs_xr9aU9QA,60387
|
|
2
|
+
devduck/__main__.py,sha256=aeF2RR4k7lzSR2X1QKV9XQPCKhtsH0JYUv2etBBqmL0,145
|
|
3
|
+
devduck/_version.py,sha256=2_0GUP7yBCXRus-qiJKxQD62z172WSs1sQ6DVpPsbmM,704
|
|
4
|
+
devduck/test_redduck.py,sha256=nqRchR7d54jWGx7JN5tji2ZV4Ek4L9s-P7hp0mKjA0Y,1773
|
|
5
|
+
devduck/tools/__init__.py,sha256=mu3V4jL2ACN4f-pnUID_A2p6o3Yc_-V_y9071PduCR0,177
|
|
6
|
+
devduck/tools/create_subagent.py,sha256=UzRz9BmU4PbTveZROEpZ311aH-u-i6x89gttu-CniAE,24687
|
|
7
|
+
devduck/tools/install_tools.py,sha256=wm_67b9IfY-2wRuWgxuEKhaSIV5vNfbGmZL3G9dGi2A,10348
|
|
8
|
+
devduck/tools/mcp_server.py,sha256=Ybp0PcJKW2TOvghsRL-i8Guqc9WokPwOD2bhVgzoj6Q,21490
|
|
9
|
+
devduck/tools/store_in_kb.py,sha256=-JM-oRQKR3FBubKHFHmXRnZSvi9dVgHxG0lismMgG2k,6861
|
|
10
|
+
devduck/tools/tcp.py,sha256=HkJ_j1t7hsPMxNL51bYHvPkHoTfro9Nov6vClwvwkEk,21943
|
|
11
|
+
devduck/tools/use_github.py,sha256=nr3JSGk48mKUobpgW__2gu6lFyUj93a1XRs3I6vH8W4,13682
|
|
12
|
+
devduck/tools/websocket.py,sha256=lRJZt813iHorVr5UI66Lq-lmaFuLYAfpodeV2gtda7k,16635
|
|
13
|
+
devduck-0.4.0.dist-info/licenses/LICENSE,sha256=CVGEiNh6cW1mgAKW83Q0P4xrQEXvqc6W-rb789W_IHM,1060
|
|
14
|
+
devduck-0.4.0.dist-info/METADATA,sha256=YIeou0tJig_jTk0xc03I_cy7KL-4zpsvQDtcWORN7Vo,7363
|
|
15
|
+
devduck-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
+
devduck-0.4.0.dist-info/entry_points.txt,sha256=BAMQaIg_BLZQOTk12bT7hy1dE9oGPLt-_dTbI4cnBnQ,40
|
|
17
|
+
devduck-0.4.0.dist-info/top_level.txt,sha256=ySXWlVronp8xHYfQ_Hdfr463e0EnbWuqyuxs94EU7yk,8
|
|
18
|
+
devduck-0.4.0.dist-info/RECORD,,
|
devduck/install.sh
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# 🦆 DevDuck installer - Extreme minimalist agent
|
|
3
|
-
|
|
4
|
-
echo "🦆 Installing Devduck..."
|
|
5
|
-
|
|
6
|
-
# Check Python
|
|
7
|
-
if ! command -v python3 &> /dev/null; then
|
|
8
|
-
echo "❌ Python 3 not found. Please install Python 3.8+"
|
|
9
|
-
exit 1
|
|
10
|
-
fi
|
|
11
|
-
|
|
12
|
-
# Check Ollama
|
|
13
|
-
if ! command -v ollama &> /dev/null; then
|
|
14
|
-
echo "⚠️ Ollama not found. Installing..."
|
|
15
|
-
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
16
|
-
# macOS
|
|
17
|
-
if command -v brew &> /dev/null; then
|
|
18
|
-
brew install ollama
|
|
19
|
-
else
|
|
20
|
-
curl -fsSL https://ollama.ai/install.sh | sh
|
|
21
|
-
fi
|
|
22
|
-
else
|
|
23
|
-
# Linux
|
|
24
|
-
curl -fsSL https://ollama.ai/install.sh | sh
|
|
25
|
-
fi
|
|
26
|
-
fi
|
|
27
|
-
|
|
28
|
-
# Start ollama service
|
|
29
|
-
echo "🦆 Starting Ollama service..."
|
|
30
|
-
ollama serve &
|
|
31
|
-
sleep 2
|
|
32
|
-
|
|
33
|
-
# Pull a basic model
|
|
34
|
-
echo "🦆 Pulling basic model..."
|
|
35
|
-
ollama pull qwen3:1.7b
|
|
36
|
-
|
|
37
|
-
# Test devduck
|
|
38
|
-
echo "🦆 Testing Devduck..."
|
|
39
|
-
python3 __init__.py "what's 5*7?"
|
|
40
|
-
|
|
41
|
-
echo "✅ Devduck installed successfully!"
|
|
42
|
-
echo "Usage: python3 __init__.py 'your question'"
|
devduck-0.2.0.dist-info/METADATA
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: devduck
|
|
3
|
-
Version: 0.2.0
|
|
4
|
-
Summary: 🦆 Extreme minimalist self-adapting AI agent - one file, self-healing, runtime dependencies
|
|
5
|
-
Author-email: duck <hey@devduck.dev>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/cagataycali/devduck
|
|
8
|
-
Project-URL: Repository, https://github.com/cagataycali/devduck.git
|
|
9
|
-
Project-URL: Documentation, https://github.com/cagataycali/devduck#readme
|
|
10
|
-
Project-URL: Bug Tracker, https://github.com/cagataycali/devduck/issues
|
|
11
|
-
Keywords: ai,agent,minimalist,self-healing,ollama,strands-agents
|
|
12
|
-
Classifier: Development Status :: 4 - Beta
|
|
13
|
-
Classifier: Environment :: Console
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: Intended Audience :: System Administrators
|
|
16
|
-
Classifier: Operating System :: OS Independent
|
|
17
|
-
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
-
Classifier: Topic :: System :: Systems Administration
|
|
25
|
-
Classifier: Topic :: Utilities
|
|
26
|
-
Requires-Python: >=3.10
|
|
27
|
-
Description-Content-Type: text/markdown
|
|
28
|
-
License-File: LICENSE
|
|
29
|
-
Requires-Dist: strands-agents
|
|
30
|
-
Requires-Dist: strands-agents[ollama]
|
|
31
|
-
Requires-Dist: strands-agents[openai]
|
|
32
|
-
Requires-Dist: strands-agents[anthropic]
|
|
33
|
-
Requires-Dist: strands-agents-tools
|
|
34
|
-
Requires-Dist: strands-fun-tools[audio]
|
|
35
|
-
Requires-Dist: strands-fun-tools[vision]
|
|
36
|
-
Requires-Dist: strands-fun-tools[all]
|
|
37
|
-
Requires-Dist: websockets
|
|
38
|
-
Requires-Dist: prompt_toolkit
|
|
39
|
-
Dynamic: license-file
|
|
40
|
-
|
|
41
|
-
# 🦆 DevDuck
|
|
42
|
-
|
|
43
|
-
**One file. Self-healing. Adaptive.**
|
|
44
|
-
|
|
45
|
-
Minimalist AI agent that fixes itself when things break.
|
|
46
|
-
|
|
47
|
-
## Install
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
pipx install devduck
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Requires: Python 3.10+, Ollama running
|
|
54
|
-
|
|
55
|
-
## Use
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
# Start DevDuck (auto-starts TCP, WebSocket, MCP servers)
|
|
59
|
-
devduck
|
|
60
|
-
|
|
61
|
-
# CLI mode
|
|
62
|
-
devduck "what's the time?"
|
|
63
|
-
|
|
64
|
-
# Python
|
|
65
|
-
import devduck
|
|
66
|
-
devduck("calculate 2+2")
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Auto-Started Servers
|
|
70
|
-
|
|
71
|
-
When you run `devduck`, three servers start automatically:
|
|
72
|
-
|
|
73
|
-
- **🌐 Web UI**: [http://cagataycali.github.io/devduck](http://cagataycali.github.io/devduck) (auto-connects)
|
|
74
|
-
- **🔌 TCP**: `nc localhost 9999` (raw socket)
|
|
75
|
-
- **🌊 WebSocket**: `ws://localhost:8080` (structured JSON)
|
|
76
|
-
- **🔗 MCP**: `http://localhost:8000/mcp` (Model Context Protocol)
|
|
77
|
-
|
|
78
|
-
### Connect via MCP
|
|
79
|
-
|
|
80
|
-
Add to your MCP client (e.g., Claude Desktop):
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"mcpServers": {
|
|
85
|
-
"devduck": {
|
|
86
|
-
"command": "uvx",
|
|
87
|
-
"args": [
|
|
88
|
-
"strands-mcp-server",
|
|
89
|
-
"--upstream-url",
|
|
90
|
-
"http://localhost:8000/mcp/"
|
|
91
|
-
],
|
|
92
|
-
"disabled": false
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Connect via Terminal
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
# Direct TCP connection
|
|
102
|
-
nc localhost 9999
|
|
103
|
-
> what's the time?
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Features
|
|
107
|
-
|
|
108
|
-
- **Self-healing** - Auto-fixes deps, models, errors
|
|
109
|
-
- **Hot-reload** - Create tools in `./tools/*.py`, use instantly
|
|
110
|
-
- **Adaptive** - Picks model based on OS (macOS: 1.7b, Linux: 30b)
|
|
111
|
-
- **14 tools** - shell, editor, files, python, calculator, tcp, etc.
|
|
112
|
-
- **History aware** - Remembers shell/conversation context
|
|
113
|
-
- **Multi-protocol** - TCP, WebSocket, MCP, CLI, Python
|
|
114
|
-
|
|
115
|
-
## Create Tool
|
|
116
|
-
|
|
117
|
-
```python
|
|
118
|
-
# ./tools/greet.py
|
|
119
|
-
from strands import tool
|
|
120
|
-
|
|
121
|
-
@tool
|
|
122
|
-
def greet(name: str) -> str:
|
|
123
|
-
return f"Hello {name}!"
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Save. Done. Use immediately.
|
|
127
|
-
|
|
128
|
-
## Multi-Model
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
export MODEL_PROVIDER="bedrock"
|
|
132
|
-
export STRANDS_MODEL_ID="us.anthropic.claude-sonnet-4-5-20250929-v1:0"
|
|
133
|
-
export STRANDS_ADDITIONAL_REQUEST_FIELDS='{"anthropic_beta": ["interleaved-thinking-2025-05-14", "context-1m-2025-08-07"], "thinking": {"type": "enabled", "budget_tokens": 2048}}'
|
|
134
|
-
export STRANDS_MAX_TOKENS="64000"
|
|
135
|
-
|
|
136
|
-
devduck "analyze data"
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
**Quack.** 🦆
|
|
142
|
-
|
|
143
|
-
*Built with [Strands Agents SDK](https://github.com/strands-agents/sdk-python)*
|
devduck-0.2.0.dist-info/RECORD
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
devduck/__init__.py,sha256=w7H7wKWkeD0fKUhLMJ4dxxrWCkRH_R7w3maxjJI0WgU,51881
|
|
2
|
-
devduck/__main__.py,sha256=aeF2RR4k7lzSR2X1QKV9XQPCKhtsH0JYUv2etBBqmL0,145
|
|
3
|
-
devduck/_version.py,sha256=Dg8AmJomLVpjKL6prJylOONZAPRtB86LOce7dorQS_A,704
|
|
4
|
-
devduck/install.sh,sha256=tYq2WWZFCBEMbxCneKAw3GSNAG1zNhpd-kzW1l5ZISw,990
|
|
5
|
-
devduck/test_redduck.py,sha256=nqRchR7d54jWGx7JN5tji2ZV4Ek4L9s-P7hp0mKjA0Y,1773
|
|
6
|
-
devduck/tools/__init__.py,sha256=mu3V4jL2ACN4f-pnUID_A2p6o3Yc_-V_y9071PduCR0,177
|
|
7
|
-
devduck/tools/install_tools.py,sha256=wm_67b9IfY-2wRuWgxuEKhaSIV5vNfbGmZL3G9dGi2A,10348
|
|
8
|
-
devduck/tools/mcp_server.py,sha256=oyF1gb7K-OlxyJLUO3L-vNo2ajKzIrcnT1crwKMOkhU,20118
|
|
9
|
-
devduck/tools/tcp.py,sha256=4KtyRlgaOLKXT3PU0yFRM79FoOkn3-S10dVL4L5iG80,22063
|
|
10
|
-
devduck/tools/websocket.py,sha256=ryKE1WbfaTFguwp-AzJlyCOifHE5uXJAVdHD8jecJgQ,16681
|
|
11
|
-
devduck-0.2.0.dist-info/licenses/LICENSE,sha256=CVGEiNh6cW1mgAKW83Q0P4xrQEXvqc6W-rb789W_IHM,1060
|
|
12
|
-
devduck-0.2.0.dist-info/METADATA,sha256=yl_DpWxBYGIWkbehwUFH-jyD7W1O945cRCJsE9Ufzew,3902
|
|
13
|
-
devduck-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
14
|
-
devduck-0.2.0.dist-info/entry_points.txt,sha256=BAMQaIg_BLZQOTk12bT7hy1dE9oGPLt-_dTbI4cnBnQ,40
|
|
15
|
-
devduck-0.2.0.dist-info/top_level.txt,sha256=ySXWlVronp8xHYfQ_Hdfr463e0EnbWuqyuxs94EU7yk,8
|
|
16
|
-
devduck-0.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|