devduck 0.3.0__py3-none-any.whl → 0.4.1__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.

@@ -0,0 +1,283 @@
1
+ Metadata-Version: 2.4
2
+ Name: devduck
3
+ Version: 0.4.1
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
+ **Homebrew (macOS/Linux):**
55
+ ```bash
56
+ brew tap cagataycali/devduck
57
+ brew install devduck
58
+ ```
59
+
60
+ **pipx (all platforms):**
61
+ ```bash
62
+ pipx install "devduck[all]" # Full install (recommended)
63
+ ```
64
+
65
+ **uvx (instant run, no install):**
66
+ ```bash
67
+ uvx devduck "hello world"
68
+ ```
69
+
70
+ Requires: Python 3.10+, Ollama (or set `MODEL_PROVIDER`)
71
+
72
+ ## Quick Start
73
+
74
+ ```bash
75
+ devduck # Interactive mode (auto-starts servers)
76
+ devduck "analyze this code" # CLI mode
77
+ ```
78
+
79
+ ```python
80
+ import devduck
81
+ devduck("calculate 2+2") # Python API
82
+ ```
83
+
84
+ ## Core Features
85
+
86
+ - **🔧 Self-healing** - Auto-fixes dependencies, models, errors
87
+ - **🔥 Hot-reload** - Save `.py` files in `./tools/`, use instantly (no restart)
88
+ - **🧠 RAG memory** - Set `STRANDS_KNOWLEDGE_BASE_ID` for automatic context retrieval/storage
89
+ - **🌍 Multi-protocol** - TCP (9999), WebSocket (8080), MCP (8000), CLI, Python
90
+ - **📚 19+ tools** - shell, editor, calculator, python, GitHub, subagents, and more
91
+ - **🎯 Adaptive** - Auto-selects model by OS (macOS: 1.7b, Linux: 30b)
92
+
93
+ ## Auto-Started Servers
94
+
95
+ When you run `devduck`, 3 servers start automatically:
96
+
97
+ | Server | Endpoint | Usage |
98
+ |--------|----------|-------|
99
+ | 🌐 **Web UI** | [cagataycali.github.io/devduck](http://cagataycali.github.io/devduck) | Browser interface |
100
+ | 🔌 **TCP** | `localhost:9999` | `nc localhost 9999` |
101
+ | 🌊 **WebSocket** | `ws://localhost:8080` | Structured JSON messages |
102
+ | 🔗 **MCP** | `http://localhost:8000/mcp` | Model Context Protocol |
103
+
104
+ **Customize ports:**
105
+ ```bash
106
+ devduck --tcp-port 9000 --ws-port 8001 --mcp-port 3000
107
+ devduck --no-tcp --no-ws # Disable specific servers
108
+ ```
109
+
110
+ ## Connect Options
111
+
112
+ ### MCP Client (Claude Desktop)
113
+
114
+ **Simple stdio mode (recommended):**
115
+ ```json
116
+ {
117
+ "mcpServers": {
118
+ "devduck": {
119
+ "command": "uvx",
120
+ "args": ["devduck", "--mcp"]
121
+ }
122
+ }
123
+ }
124
+ ```
125
+
126
+ **Proxy mode (if devduck already running):**
127
+ ```json
128
+ {
129
+ "mcpServers": {
130
+ "devduck": {
131
+ "command": "uvx",
132
+ "args": ["strands-mcp-server", "--upstream-url", "http://localhost:8000/mcp/"]
133
+ }
134
+ }
135
+ }
136
+ ```
137
+
138
+ ### Terminal (TCP)
139
+ ```bash
140
+ nc localhost 9999
141
+ > analyze logs
142
+ ```
143
+
144
+ ### Shell Prefix
145
+ ```bash
146
+ devduck
147
+ 🦆 ! git status # Run shell commands with !
148
+ ```
149
+
150
+ ## Hot-Reload Tool Creation
151
+
152
+ Create tools instantly—no restart needed:
153
+
154
+ ```python
155
+ # ./tools/tip_calc.py
156
+ from strands import tool
157
+
158
+ @tool
159
+ def calculate_tip(amount: float, percent: float = 15.0) -> str:
160
+ """Calculate restaurant tip."""
161
+ tip = amount * (percent / 100)
162
+ return f"Tip: ${tip:.2f} | Total: ${amount + tip:.2f}"
163
+ ```
164
+
165
+ Save → Available instantly → Use: `devduck "calculate tip for $42"`
166
+
167
+ ## Built-in Tools (19+)
168
+
169
+ | Category | Tools |
170
+ |----------|-------|
171
+ | **Development** | shell, editor, python_repl, load_tool, environment |
172
+ | **GitHub** | use_github, create_subagent, gist, add_comment, list_issues |
173
+ | **Network** | tcp, websocket, mcp_server, mcp_client, http_request |
174
+ | **AI** | use_agent, install_tools, retrieve, store_in_kb |
175
+ | **Utilities** | calculator, image_reader, scraper, system_prompt, view_logs |
176
+
177
+ ## Multi-Model Support
178
+
179
+ Switch models via environment variables:
180
+
181
+ ```bash
182
+ # Bedrock (Claude)
183
+ export MODEL_PROVIDER="bedrock"
184
+ export STRANDS_MODEL_ID="us.anthropic.claude-sonnet-4-5-20250929-v1:0"
185
+ export STRANDS_MAX_TOKENS="64000"
186
+
187
+ # Anthropic API
188
+ export MODEL_PROVIDER="anthropic"
189
+ export STRANDS_MODEL_ID="claude-sonnet-4-20250514"
190
+
191
+ # Ollama (default)
192
+ export MODEL_PROVIDER="ollama"
193
+ export OLLAMA_HOST="http://localhost:11434"
194
+ ```
195
+
196
+ ## Knowledge Base (RAG)
197
+
198
+ Enable automatic memory across sessions:
199
+
200
+ ```bash
201
+ export STRANDS_KNOWLEDGE_BASE_ID="your-kb-id"
202
+ devduck # Auto-retrieves context before queries, stores after responses
203
+ ```
204
+
205
+ Works with AWS Bedrock Knowledge Bases.
206
+
207
+ ## Environment Variables
208
+
209
+ | Variable | Default | Description |
210
+ |----------|---------|-------------|
211
+ | `MODEL_PROVIDER` | `ollama` | Model provider (bedrock, anthropic, ollama) |
212
+ | `STRANDS_KNOWLEDGE_BASE_ID` | - | Enable auto-RAG with KB ID |
213
+ | `DEVDUCK_TCP_PORT` | `9999` | TCP server port |
214
+ | `DEVDUCK_WS_PORT` | `8080` | WebSocket port |
215
+ | `DEVDUCK_MCP_PORT` | `8000` | MCP server port |
216
+ | `DEVDUCK_ENABLE_TCP` | `true` | Enable TCP server |
217
+ | `DEVDUCK_ENABLE_WS` | `true` | Enable WebSocket |
218
+ | `DEVDUCK_ENABLE_MCP` | `true` | Enable MCP server |
219
+ | `DEVDUCK_LOG_LINE_COUNT` | `50` | Log lines in context |
220
+ | `SYSTEM_PROMPT` | - | Custom system prompt |
221
+
222
+ ## Dynamic Tool Loading
223
+
224
+ Load tools from any Python package at runtime:
225
+
226
+ ```python
227
+ devduck
228
+ 🦆 install_tools(action="install_and_load",
229
+ package="strands-fun-tools",
230
+ module="strands_fun_tools")
231
+ ```
232
+
233
+ No restart required—tools available immediately.
234
+
235
+ ## System Prompt Management
236
+
237
+ Modify agent behavior dynamically:
238
+
239
+ ```bash
240
+ devduck
241
+ 🦆 system_prompt(action="update", prompt="You are a senior Python expert.")
242
+ 🦆 system_prompt(action="view") # See current prompt
243
+ ```
244
+
245
+ ## Logs
246
+
247
+ ```bash
248
+ devduck
249
+ 🦆 view_logs(action="view", lines=100)
250
+ 🦆 view_logs(action="search", pattern="error")
251
+ 🦆 view_logs(action="stats")
252
+ ```
253
+
254
+ Log location: `/tmp/devduck/logs/devduck.log`
255
+
256
+ ## GitHub Actions
257
+
258
+ Run DevDuck in CI/CD:
259
+
260
+ ```yaml
261
+ name: AI Assistant
262
+ on: [issues, pull_request]
263
+
264
+ jobs:
265
+ assistant:
266
+ runs-on: ubuntu-latest
267
+ permissions:
268
+ contents: read
269
+ issues: write
270
+ pull-requests: write
271
+ steps:
272
+ - uses: cagataycali/devduck@main
273
+ with:
274
+ task: "Help with this issue or PR"
275
+ provider: "github"
276
+ model: "openai/o4-mini"
277
+ ```
278
+
279
+ ---
280
+
281
+ **One file. 19+ tools. Self-healing. Hot-reload. RAG memory.**
282
+
283
+ *Built with [Strands Agents SDK](https://github.com/strands-agents/sdk-python)*
@@ -1,18 +1,19 @@
1
- devduck/__init__.py,sha256=L_wVHAoQSMcnZaz-8vhGir9itE7RGq7jqSqTN6Uya1A,58613
1
+ devduck/__init__.py,sha256=Sdb1jdyy92bxYaP3kT0UN-8AdejWYoT2IrgiRiCR7XE,55852
2
2
  devduck/__main__.py,sha256=aeF2RR4k7lzSR2X1QKV9XQPCKhtsH0JYUv2etBBqmL0,145
3
- devduck/_version.py,sha256=5zTqm8rgXsWYBpB2M3Zw_K1D-aV8wP7NsBLrmMKkrAQ,704
3
+ devduck/_version.py,sha256=k7cu0JKra64gmMNU_UfA5sw2eNc_GRvf3QmesiYAy8g,704
4
4
  devduck/test_redduck.py,sha256=nqRchR7d54jWGx7JN5tji2ZV4Ek4L9s-P7hp0mKjA0Y,1773
5
5
  devduck/tools/__init__.py,sha256=mu3V4jL2ACN4f-pnUID_A2p6o3Yc_-V_y9071PduCR0,177
6
6
  devduck/tools/create_subagent.py,sha256=UzRz9BmU4PbTveZROEpZ311aH-u-i6x89gttu-CniAE,24687
7
7
  devduck/tools/install_tools.py,sha256=wm_67b9IfY-2wRuWgxuEKhaSIV5vNfbGmZL3G9dGi2A,10348
8
- devduck/tools/mcp_server.py,sha256=oyF1gb7K-OlxyJLUO3L-vNo2ajKzIrcnT1crwKMOkhU,20118
8
+ devduck/tools/mcp_server.py,sha256=Ybp0PcJKW2TOvghsRL-i8Guqc9WokPwOD2bhVgzoj6Q,21490
9
9
  devduck/tools/store_in_kb.py,sha256=-JM-oRQKR3FBubKHFHmXRnZSvi9dVgHxG0lismMgG2k,6861
10
+ devduck/tools/system_prompt.py,sha256=waAdmvRhyulorw_tLqpqUJN_AahuaeF2rXqjMqN7IRY,16905
10
11
  devduck/tools/tcp.py,sha256=HkJ_j1t7hsPMxNL51bYHvPkHoTfro9Nov6vClwvwkEk,21943
11
12
  devduck/tools/use_github.py,sha256=nr3JSGk48mKUobpgW__2gu6lFyUj93a1XRs3I6vH8W4,13682
12
13
  devduck/tools/websocket.py,sha256=lRJZt813iHorVr5UI66Lq-lmaFuLYAfpodeV2gtda7k,16635
13
- devduck-0.3.0.dist-info/licenses/LICENSE,sha256=CVGEiNh6cW1mgAKW83Q0P4xrQEXvqc6W-rb789W_IHM,1060
14
- devduck-0.3.0.dist-info/METADATA,sha256=pg0OIugkyVKbHA39NYYBJxr0MRVunCI9-XtwWr9Pcn4,4243
15
- devduck-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- devduck-0.3.0.dist-info/entry_points.txt,sha256=BAMQaIg_BLZQOTk12bT7hy1dE9oGPLt-_dTbI4cnBnQ,40
17
- devduck-0.3.0.dist-info/top_level.txt,sha256=ySXWlVronp8xHYfQ_Hdfr463e0EnbWuqyuxs94EU7yk,8
18
- devduck-0.3.0.dist-info/RECORD,,
14
+ devduck-0.4.1.dist-info/licenses/LICENSE,sha256=CVGEiNh6cW1mgAKW83Q0P4xrQEXvqc6W-rb789W_IHM,1060
15
+ devduck-0.4.1.dist-info/METADATA,sha256=2rphJUQewjp06O_msTc9x7XKCtGURagV-STJ4jBBNHc,7747
16
+ devduck-0.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
+ devduck-0.4.1.dist-info/entry_points.txt,sha256=BAMQaIg_BLZQOTk12bT7hy1dE9oGPLt-_dTbI4cnBnQ,40
18
+ devduck-0.4.1.dist-info/top_level.txt,sha256=ySXWlVronp8xHYfQ_Hdfr463e0EnbWuqyuxs94EU7yk,8
19
+ devduck-0.4.1.dist-info/RECORD,,
@@ -1,152 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: devduck
3
- Version: 0.3.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
- Provides-Extra: all
38
- Requires-Dist: strands-agents[openai]; extra == "all"
39
- Requires-Dist: strands-agents[anthropic]; extra == "all"
40
- Requires-Dist: strands-fun-tools[audio]; extra == "all"
41
- Requires-Dist: strands-fun-tools[vision]; extra == "all"
42
- Requires-Dist: strands-fun-tools[all]; extra == "all"
43
- Requires-Dist: strands-mcp-server; extra == "all"
44
- Dynamic: license-file
45
-
46
- # 🦆 DevDuck
47
-
48
- **One file. Self-healing. Adaptive.**
49
-
50
- Minimalist AI agent that fixes itself when things break.
51
-
52
- ## Install
53
-
54
- ```bash
55
- # Minimal install
56
- pipx install devduck
57
-
58
- # Full install (all tools)
59
- pipx install "devduck[all]"
60
- ```
61
-
62
- Requires: Python 3.10+, Ollama running (or set MODEL_PROVIDER)
63
-
64
- ## Use
65
-
66
- ```bash
67
- # Start DevDuck (auto-starts TCP, WebSocket, MCP servers)
68
- devduck
69
-
70
- # CLI mode
71
- devduck "what's the time?"
72
-
73
- # Python
74
- import devduck
75
- devduck("calculate 2+2")
76
- ```
77
-
78
- ## Auto-Started Servers
79
-
80
- When you run `devduck`, three servers start automatically:
81
-
82
- - **🌐 Web UI**: [http://cagataycali.github.io/devduck](http://cagataycali.github.io/devduck) (auto-connects)
83
- - **🔌 TCP**: `nc localhost 9999` (raw socket)
84
- - **🌊 WebSocket**: `ws://localhost:8080` (structured JSON)
85
- - **🔗 MCP**: `http://localhost:8000/mcp` (Model Context Protocol)
86
-
87
- ### Connect via MCP
88
-
89
- Add to your MCP client (e.g., Claude Desktop):
90
-
91
- ```json
92
- {
93
- "mcpServers": {
94
- "devduck": {
95
- "command": "uvx",
96
- "args": [
97
- "strands-mcp-server",
98
- "--upstream-url",
99
- "http://localhost:8000/mcp/"
100
- ],
101
- "disabled": false
102
- }
103
- }
104
- }
105
- ```
106
-
107
- ### Connect via Terminal
108
-
109
- ```bash
110
- # Direct TCP connection
111
- nc localhost 9999
112
- > what's the time?
113
- ```
114
-
115
- ## Features
116
-
117
- - **Self-healing** - Auto-fixes deps, models, errors
118
- - **Hot-reload** - Create tools in `./tools/*.py`, use instantly
119
- - **Adaptive** - Picks model based on OS (macOS: 1.7b, Linux: 30b)
120
- - **14 tools** - shell, editor, files, python, calculator, tcp, etc.
121
- - **History aware** - Remembers shell/conversation context
122
- - **Multi-protocol** - TCP, WebSocket, MCP, CLI, Python
123
-
124
- ## Create Tool
125
-
126
- ```python
127
- # ./tools/greet.py
128
- from strands import tool
129
-
130
- @tool
131
- def greet(name: str) -> str:
132
- return f"Hello {name}!"
133
- ```
134
-
135
- Save. Done. Use immediately.
136
-
137
- ## Multi-Model
138
-
139
- ```bash
140
- export MODEL_PROVIDER="bedrock"
141
- export STRANDS_MODEL_ID="us.anthropic.claude-sonnet-4-5-20250929-v1:0"
142
- export STRANDS_ADDITIONAL_REQUEST_FIELDS='{"anthropic_beta": ["interleaved-thinking-2025-05-14", "context-1m-2025-08-07"], "thinking": {"type": "enabled", "budget_tokens": 2048}}'
143
- export STRANDS_MAX_TOKENS="64000"
144
-
145
- devduck "analyze data"
146
- ```
147
-
148
- ---
149
-
150
- **Quack.** 🦆
151
-
152
- *Built with [Strands Agents SDK](https://github.com/strands-agents/sdk-python)*