devorch 0.1.2__tar.gz → 0.2.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.
Files changed (70) hide show
  1. {devorch-0.1.2 → devorch-0.2.1}/.github/workflows/ci.yml +1 -1
  2. devorch-0.2.1/PKG-INFO +363 -0
  3. devorch-0.2.1/README.md +322 -0
  4. devorch-0.2.1/assets/chat.png +0 -0
  5. devorch-0.2.1/assets/models.png +0 -0
  6. devorch-0.2.1/assets/providers.png +0 -0
  7. devorch-0.2.1/assets/startup.png +0 -0
  8. devorch-0.2.1/assets/terminal.png +0 -0
  9. devorch-0.2.1/assets/tools.png +0 -0
  10. {devorch-0.1.2 → devorch-0.2.1}/cli/main.py +701 -242
  11. {devorch-0.1.2 → devorch-0.2.1}/config/settings.py +6 -0
  12. {devorch-0.1.2 → devorch-0.2.1}/core/agent.py +70 -68
  13. {devorch-0.1.2 → devorch-0.2.1}/core/executor.py +11 -10
  14. devorch-0.2.1/core/mcp.py +383 -0
  15. devorch-0.2.1/core/memory.py +411 -0
  16. devorch-0.2.1/core/skills.py +226 -0
  17. {devorch-0.1.2 → devorch-0.2.1}/pyproject.toml +2 -1
  18. {devorch-0.1.2 → devorch-0.2.1}/tools/__init__.py +2 -4
  19. devorch-0.2.1/tools/terminal_session.py +637 -0
  20. {devorch-0.1.2 → devorch-0.2.1}/utils/logger.py +24 -4
  21. devorch-0.1.2/PKG-INFO +0 -528
  22. devorch-0.1.2/README.md +0 -488
  23. devorch-0.1.2/tools/terminal.py +0 -123
  24. devorch-0.1.2/tools/terminal_session.py +0 -298
  25. {devorch-0.1.2 → devorch-0.2.1}/.github/workflows/publish.yml +0 -0
  26. {devorch-0.1.2 → devorch-0.2.1}/.gitignore +0 -0
  27. {devorch-0.1.2 → devorch-0.2.1}/cli/commands/ask.py +0 -0
  28. {devorch-0.1.2 → devorch-0.2.1}/cli/commands/edit.py +0 -0
  29. {devorch-0.1.2 → devorch-0.2.1}/cli/commands/run.py +0 -0
  30. {devorch-0.1.2 → devorch-0.2.1}/config/permissions.py +0 -0
  31. {devorch-0.1.2 → devorch-0.2.1}/config/profiles.py +0 -0
  32. {devorch-0.1.2 → devorch-0.2.1}/core/context.py +0 -0
  33. {devorch-0.1.2 → devorch-0.2.1}/core/modes.py +0 -0
  34. {devorch-0.1.2 → devorch-0.2.1}/core/planner.py +0 -0
  35. {devorch-0.1.2 → devorch-0.2.1}/core/sessions.py +0 -0
  36. {devorch-0.1.2 → devorch-0.2.1}/core/tasks.py +0 -0
  37. {devorch-0.1.2 → devorch-0.2.1}/providers/__init__.py +0 -0
  38. {devorch-0.1.2 → devorch-0.2.1}/providers/anthropic.py +0 -0
  39. {devorch-0.1.2 → devorch-0.2.1}/providers/base.py +0 -0
  40. {devorch-0.1.2 → devorch-0.2.1}/providers/custom.py +0 -0
  41. {devorch-0.1.2 → devorch-0.2.1}/providers/deepseek.py +0 -0
  42. {devorch-0.1.2 → devorch-0.2.1}/providers/gemini.py +0 -0
  43. {devorch-0.1.2 → devorch-0.2.1}/providers/github_copilot.py +0 -0
  44. {devorch-0.1.2 → devorch-0.2.1}/providers/groq.py +0 -0
  45. {devorch-0.1.2 → devorch-0.2.1}/providers/kimi.py +0 -0
  46. {devorch-0.1.2 → devorch-0.2.1}/providers/lmstudio.py +0 -0
  47. {devorch-0.1.2 → devorch-0.2.1}/providers/local.py +0 -0
  48. {devorch-0.1.2 → devorch-0.2.1}/providers/mistral.py +0 -0
  49. {devorch-0.1.2 → devorch-0.2.1}/providers/openai.py +0 -0
  50. {devorch-0.1.2 → devorch-0.2.1}/providers/openrouter.py +0 -0
  51. {devorch-0.1.2 → devorch-0.2.1}/providers/together.py +0 -0
  52. {devorch-0.1.2 → devorch-0.2.1}/schemas/message.py +0 -0
  53. {devorch-0.1.2 → devorch-0.2.1}/schemas/task.py +0 -0
  54. {devorch-0.1.2 → devorch-0.2.1}/schemas/tool.py +0 -0
  55. {devorch-0.1.2 → devorch-0.2.1}/tests/__init__.py +0 -0
  56. {devorch-0.1.2 → devorch-0.2.1}/tests/test_core.py +0 -0
  57. {devorch-0.1.2 → devorch-0.2.1}/tests/test_integration.py +0 -0
  58. {devorch-0.1.2 → devorch-0.2.1}/tests/test_permissions.py +0 -0
  59. {devorch-0.1.2 → devorch-0.2.1}/tests/test_schemas.py +0 -0
  60. {devorch-0.1.2 → devorch-0.2.1}/tests/test_tools.py +0 -0
  61. {devorch-0.1.2 → devorch-0.2.1}/tools/base.py +0 -0
  62. {devorch-0.1.2 → devorch-0.2.1}/tools/edit.py +0 -0
  63. {devorch-0.1.2 → devorch-0.2.1}/tools/filesystem.py +0 -0
  64. {devorch-0.1.2 → devorch-0.2.1}/tools/git.py +0 -0
  65. {devorch-0.1.2 → devorch-0.2.1}/tools/grep.py +0 -0
  66. {devorch-0.1.2 → devorch-0.2.1}/tools/search.py +0 -0
  67. {devorch-0.1.2 → devorch-0.2.1}/tools/shell.py +0 -0
  68. {devorch-0.1.2 → devorch-0.2.1}/tools/task.py +0 -0
  69. {devorch-0.1.2 → devorch-0.2.1}/tools/tests.py +0 -0
  70. {devorch-0.1.2 → devorch-0.2.1}/tools/websearch.py +0 -0
@@ -35,7 +35,7 @@ jobs:
35
35
  strategy:
36
36
  matrix:
37
37
  os: [ubuntu-latest, windows-latest, macos-latest]
38
- python-version: ["3.10", "3.11", "3.12"]
38
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
39
39
  steps:
40
40
  - uses: actions/checkout@v4
41
41
 
devorch-0.2.1/PKG-INFO ADDED
@@ -0,0 +1,363 @@
1
+ Metadata-Version: 2.4
2
+ Name: devorch
3
+ Version: 0.2.1
4
+ Summary: Multi-provider AI coding assistant CLI with 13+ providers
5
+ Project-URL: Homepage, https://github.com/Amanbig/DevOrch
6
+ Project-URL: Repository, https://github.com/Amanbig/DevOrch
7
+ Project-URL: Issues, https://github.com/Amanbig/DevOrch/issues
8
+ Author-email: Aman <amanpreetsinghjhiwant@outlook.com>
9
+ License: MIT
10
+ Keywords: ai,anthropic,assistant,claude,cli,coding,copilot,deepseek,gemini,gpt,kimi,llm,llmstudio,mistral,openai,openrouter,together
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: anthropic>=0.25.8
23
+ Requires-Dist: duckduckgo-search>=6.0.0
24
+ Requires-Dist: google-genai>=1.0.0
25
+ Requires-Dist: httpx>=0.27.0
26
+ Requires-Dist: keyring>=25.0.0
27
+ Requires-Dist: openai>=1.28.0
28
+ Requires-Dist: prompt-toolkit>=3.0.0
29
+ Requires-Dist: pydantic>=2.7.1
30
+ Requires-Dist: pyyaml>=6.0
31
+ Requires-Dist: questionary>=2.0.0
32
+ Requires-Dist: rich>=13.7.1
33
+ Requires-Dist: typer>=0.12.3
34
+ Provides-Extra: dev
35
+ Requires-Dist: mypy>=1.10.0; extra == 'dev'
36
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
37
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
38
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
39
+ Requires-Dist: ruff>=0.4.0; extra == 'dev'
40
+ Description-Content-Type: text/markdown
41
+
42
+ # DevOrch
43
+
44
+ A multi-provider AI coding assistant CLI, similar to Claude Code and Gemini CLI.
45
+
46
+ ![DevOrch Banner](https://img.shields.io/badge/DevOrch-AI%20Coding%20Assistant-blue)
47
+ ![Python](https://img.shields.io/badge/Python-3.10+-green)
48
+ ![License](https://img.shields.io/badge/License-MIT-yellow)
49
+
50
+ ## Screenshots
51
+
52
+ | Startup | Chat |
53
+ |---------|------|
54
+ | ![Startup](assets/startup.png) | ![Chat](assets/chat.png) |
55
+
56
+ | Provider Selection | Model Selection |
57
+ |--------------------|-----------------|
58
+ | ![Providers](assets/providers.png) | ![Models](assets/models.png) |
59
+
60
+ | Tool Execution | Terminal Session |
61
+ |----------------|-----------------|
62
+ | ![Tools](assets/tools.png) | ![Terminal](assets/terminal.png) |
63
+
64
+ ## Features
65
+
66
+ - **13 AI Providers** - OpenAI, Anthropic, Gemini, Groq, Mistral, Together AI, OpenRouter, GitHub Copilot, DeepSeek, Kimi, Ollama, LM Studio, and Custom
67
+ - **Memory System** - Persistent memory across conversations (user preferences, feedback, project context)
68
+ - **MCP Support** - Connect Model Context Protocol servers for extensible tools
69
+ - **Skills System** - Built-in and custom skills (`/commit`, `/review`, `/test`, `/fix`, `/explain`, `/simplify`)
70
+ - **Terminal Sessions** - Background processes with GUI option, persist across restarts
71
+ - **Dynamic Model Listing** - Fetches latest available models from provider APIs
72
+ - **Secure API Key Storage** - Uses system keychain (Windows, macOS, Linux)
73
+ - **Session Persistence** - SQLite-based chat history with resume capability
74
+ - **Powerful Tools** - Shell, terminal sessions, file operations, search, grep, code editing, web access, memory
75
+ - **Interactive UI** - Arrow-key navigation, numbered selections, bottom status bar, markdown responses
76
+ - **Permission System** - Configurable allow/deny rules with interactive prompts
77
+ - **In-Chat Auth** - Set or update API keys with `/auth` without restarting
78
+ - **Multiple Modes** - Plan mode, Auto mode, and Ask mode
79
+
80
+ ## Installation
81
+
82
+ ### Option 1: Install with pipx (Recommended)
83
+
84
+ ```bash
85
+ pip install pipx
86
+ pipx install devorch
87
+ ```
88
+
89
+ ### Option 2: Install with pip
90
+
91
+ ```bash
92
+ pip install devorch
93
+ ```
94
+
95
+ ### Option 3: Install from source
96
+
97
+ ```bash
98
+ git clone https://github.com/Amanbig/DevOrch.git
99
+ cd DevOrch
100
+ pip install -e .
101
+ ```
102
+
103
+ ## Quick Start
104
+
105
+ ```bash
106
+ # Start DevOrch (first run shows interactive setup)
107
+ devorch
108
+
109
+ # Specify a provider
110
+ devorch -p openai
111
+ devorch -p anthropic
112
+ devorch -p local # Ollama
113
+ ```
114
+
115
+ ## Slash Commands
116
+
117
+ ### Navigation & Switching
118
+
119
+ | Command | Description |
120
+ |---------|-------------|
121
+ | `/help` | Show all commands grouped by category |
122
+ | `/models` | Browse and switch models (interactive, numbered list) |
123
+ | `/model <name>` | Switch model (supports partial match, e.g. `/model opus`) |
124
+ | `/providers` | Browse and switch providers (interactive, numbered list) |
125
+ | `/provider <name>` | Switch provider directly |
126
+ | `/mode` | Switch between Plan/Auto/Ask modes |
127
+ | `/status` | Show provider, model, mode, memories, skills, MCP |
128
+ | `/auth [provider]` | Set or update API key for current or specified provider |
129
+
130
+ ### Memory
131
+
132
+ | Command | Description |
133
+ |---------|-------------|
134
+ | `/memory` | Show all saved memories |
135
+ | `/remember <text>` | Save something to memory |
136
+ | `/forget` | Delete a memory (interactive) |
137
+
138
+ Memories persist across conversations in `~/.devorch/memory/`. Types:
139
+ - **user** - Your role, preferences, expertise
140
+ - **feedback** - Corrections and guidance for the AI
141
+ - **project** - Project decisions, context, ongoing work
142
+ - **reference** - Links to external resources
143
+
144
+ ### Skills
145
+
146
+ | Command | Description |
147
+ |---------|-------------|
148
+ | `/skills` | List all available skills |
149
+ | `/skill <name>` | Run a skill |
150
+ | `/commit` | Create a git commit with a descriptive message |
151
+ | `/review` | Review code changes for bugs and issues |
152
+ | `/test` | Run project tests and analyze results |
153
+ | `/fix` | Fix the last error or failing test |
154
+ | `/explain` | Explain the current project structure |
155
+ | `/simplify` | Simplify recent code changes |
156
+
157
+ Custom skills can be added as YAML files in `~/.devorch/skills/`:
158
+
159
+ ```yaml
160
+ # ~/.devorch/skills/deploy.yaml
161
+ name: deploy
162
+ description: Deploy to production
163
+ prompt: |
164
+ Run the deploy script and verify it succeeds.
165
+ Check the deploy logs for any errors.
166
+ ```
167
+
168
+ ### Session
169
+
170
+ | Command | Description |
171
+ |---------|-------------|
172
+ | `/session` | Show current session info |
173
+ | `/history` | Show conversation history |
174
+ | `/clear` | Clear conversation history |
175
+ | `/compact` | Summarize and compact history |
176
+ | `/save` | Save conversation to file |
177
+ | `/undo` | Undo last message |
178
+
179
+ ### MCP
180
+
181
+ | Command | Description |
182
+ |---------|-------------|
183
+ | `/mcp` | Show connected MCP servers and their tools |
184
+
185
+ ## MCP (Model Context Protocol)
186
+
187
+ Connect external tool servers via MCP. Configure in `~/.devorch/config.yaml`:
188
+
189
+ ```yaml
190
+ mcp_servers:
191
+ filesystem:
192
+ command: npx
193
+ args: ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"]
194
+ github:
195
+ command: npx
196
+ args: ["-y", "@modelcontextprotocol/server-github"]
197
+ env:
198
+ GITHUB_TOKEN: "ghp_xxx"
199
+ sqlite:
200
+ command: uvx
201
+ args: ["mcp-server-sqlite", "--db-path", "mydb.sqlite"]
202
+ ```
203
+
204
+ MCP tools automatically appear alongside built-in tools and can be used by the AI.
205
+
206
+ ## Modes
207
+
208
+ - **ASK** (default) - Asks before each tool execution
209
+ - **AUTO** - Executes tools automatically (dangerous commands still blocked)
210
+ - **PLAN** - Shows plan before executing, asks for approval
211
+
212
+ ## Terminal Sessions
213
+
214
+ Unified terminal tool with optional GUI window. The AI can monitor output and send input.
215
+
216
+ ```
217
+ > Start a dev server (headless, AI monitors)
218
+ > terminal_session start command="npm run dev"
219
+ ✓ Session 'swift-fox-a3f2' started (PID 12345)
220
+
221
+ > Open a visible terminal (user can type, AI reads output)
222
+ > terminal_session start command="bash" gui=true
223
+ ✓ Session 'calm-owl-b7e1' started in visible terminal
224
+
225
+ > Check output
226
+ > terminal_session read session_id="swift-fox-a3f2"
227
+ ✓ [Session 'swift-fox-a3f2' — running]
228
+
229
+ > Stop it
230
+ > terminal_session stop session_id="swift-fox-a3f2"
231
+ ✓ Session stopped.
232
+ ```
233
+
234
+ Sessions are tracked in `~/.devorch/sessions/` and can be reconnected after restarting DevOrch.
235
+
236
+ ## Tool Permissions
237
+
238
+ Interactive permission system with arrow-key navigation:
239
+
240
+ ```
241
+ ? Choose an action:
242
+ » Allow once
243
+ Allow for this session
244
+ Always allow (save to config)
245
+ Deny
246
+ ```
247
+
248
+ ```bash
249
+ devorch permissions list # Show permissions
250
+ devorch permissions set shell allow # Always allow shell
251
+ devorch permissions allow shell "git *" # Allow git commands
252
+ devorch permissions deny shell "rm -rf *" # Block dangerous commands
253
+ ```
254
+
255
+ ## Supported Providers
256
+
257
+ ### Cloud Providers
258
+
259
+ | Provider | Models | API Key |
260
+ |----------|--------|---------|
261
+ | **OpenAI** | GPT-4o, GPT-4, o1 | `OPENAI_API_KEY` |
262
+ | **Anthropic** | Claude 4, Claude 3.5 | `ANTHROPIC_API_KEY` |
263
+ | **Google Gemini** | Gemini 2.0, 1.5 Pro/Flash | `GOOGLE_API_KEY` |
264
+ | **Groq** | Llama 3.3, Mixtral | `GROQ_API_KEY` |
265
+ | **Mistral** | Large, Codestral | `MISTRAL_API_KEY` |
266
+ | **Together AI** | Llama 3, Mixtral, Qwen | `TOGETHER_API_KEY` |
267
+ | **OpenRouter** | 100+ models | `OPENROUTER_API_KEY` |
268
+ | **GitHub Copilot** | GPT-4o, Claude 3.5 | `GITHUB_TOKEN` |
269
+ | **DeepSeek** | Chat, Coder, Reasoner | `DEEPSEEK_API_KEY` |
270
+ | **Kimi (Moonshot)** | 8K, 32K, 128K context | `MOONSHOT_API_KEY` |
271
+
272
+ ### Local & Self-Hosted
273
+
274
+ | Provider | Setup |
275
+ |----------|-------|
276
+ | **Ollama** | Install Ollama, run models locally |
277
+ | **LM Studio** | Install LM Studio, GUI for local models |
278
+ | **Custom** | Any OpenAI-compatible API (vLLM, TGI, llama.cpp) |
279
+
280
+ ## Tools
281
+
282
+ | Tool | Description |
283
+ |------|-------------|
284
+ | **shell** | Execute shell commands |
285
+ | **terminal_session** | Managed sessions with optional GUI (start, read, send, stop) |
286
+ | **filesystem** | Read, write, and list files |
287
+ | **search** | Find files by name patterns (glob) |
288
+ | **grep** | Search for text patterns in files |
289
+ | **edit** | Make targeted edits to existing files |
290
+ | **task** | Track progress on multi-step work |
291
+ | **memory** | Save/search persistent memories across conversations |
292
+ | **websearch** | Search the web (DuckDuckGo) |
293
+ | **webfetch** | Fetch content from a URL |
294
+
295
+ ## Configuration
296
+
297
+ ### API Keys
298
+
299
+ ```bash
300
+ # From CLI
301
+ devorch set-key openai
302
+ devorch set-key anthropic
303
+
304
+ # From within chat
305
+ /auth openai
306
+ /auth anthropic
307
+
308
+ # Or use environment variables
309
+ export OPENAI_API_KEY=sk-...
310
+ export ANTHROPIC_API_KEY=sk-ant-...
311
+ export GOOGLE_API_KEY=...
312
+ export GROQ_API_KEY=gsk_...
313
+ ```
314
+
315
+ ### Config File
316
+
317
+ `~/.devorch/config.yaml`:
318
+
319
+ ```yaml
320
+ default_provider: openai
321
+
322
+ providers:
323
+ openai:
324
+ default_model: gpt-4o
325
+ anthropic:
326
+ default_model: claude-sonnet-4-20250514
327
+
328
+ # MCP servers
329
+ mcp_servers:
330
+ github:
331
+ command: npx
332
+ args: ["-y", "@modelcontextprotocol/server-github"]
333
+ env:
334
+ GITHUB_TOKEN: "ghp_xxx"
335
+ ```
336
+
337
+ ### Directory Structure
338
+
339
+ ```
340
+ ~/.devorch/
341
+ ├── config.yaml # Provider settings, MCP servers
342
+ ├── permissions.yaml # Tool permission rules
343
+ ├── sessions.db # Chat history (SQLite)
344
+ ├── memory/ # Persistent memories
345
+ │ ├── MEMORY.md # Memory index
346
+ │ ├── user_*.md # User profile memories
347
+ │ ├── feedback_*.md # Feedback memories
348
+ │ └── project_*.md # Project context memories
349
+ ├── skills/ # Custom skill definitions
350
+ │ └── *.yaml # User-defined skills
351
+ └── sessions/ # Terminal session logs
352
+ ├── registry.json # Session registry
353
+ └── *.log # Session output logs
354
+ ```
355
+
356
+ ## Requirements
357
+
358
+ - Python 3.10+
359
+ - Dependencies: typer, rich, pydantic, openai, anthropic, google-genai, httpx, keyring, prompt_toolkit, questionary, pyyaml, duckduckgo-search
360
+
361
+ ## License
362
+
363
+ MIT
@@ -0,0 +1,322 @@
1
+ # DevOrch
2
+
3
+ A multi-provider AI coding assistant CLI, similar to Claude Code and Gemini CLI.
4
+
5
+ ![DevOrch Banner](https://img.shields.io/badge/DevOrch-AI%20Coding%20Assistant-blue)
6
+ ![Python](https://img.shields.io/badge/Python-3.10+-green)
7
+ ![License](https://img.shields.io/badge/License-MIT-yellow)
8
+
9
+ ## Screenshots
10
+
11
+ | Startup | Chat |
12
+ |---------|------|
13
+ | ![Startup](assets/startup.png) | ![Chat](assets/chat.png) |
14
+
15
+ | Provider Selection | Model Selection |
16
+ |--------------------|-----------------|
17
+ | ![Providers](assets/providers.png) | ![Models](assets/models.png) |
18
+
19
+ | Tool Execution | Terminal Session |
20
+ |----------------|-----------------|
21
+ | ![Tools](assets/tools.png) | ![Terminal](assets/terminal.png) |
22
+
23
+ ## Features
24
+
25
+ - **13 AI Providers** - OpenAI, Anthropic, Gemini, Groq, Mistral, Together AI, OpenRouter, GitHub Copilot, DeepSeek, Kimi, Ollama, LM Studio, and Custom
26
+ - **Memory System** - Persistent memory across conversations (user preferences, feedback, project context)
27
+ - **MCP Support** - Connect Model Context Protocol servers for extensible tools
28
+ - **Skills System** - Built-in and custom skills (`/commit`, `/review`, `/test`, `/fix`, `/explain`, `/simplify`)
29
+ - **Terminal Sessions** - Background processes with GUI option, persist across restarts
30
+ - **Dynamic Model Listing** - Fetches latest available models from provider APIs
31
+ - **Secure API Key Storage** - Uses system keychain (Windows, macOS, Linux)
32
+ - **Session Persistence** - SQLite-based chat history with resume capability
33
+ - **Powerful Tools** - Shell, terminal sessions, file operations, search, grep, code editing, web access, memory
34
+ - **Interactive UI** - Arrow-key navigation, numbered selections, bottom status bar, markdown responses
35
+ - **Permission System** - Configurable allow/deny rules with interactive prompts
36
+ - **In-Chat Auth** - Set or update API keys with `/auth` without restarting
37
+ - **Multiple Modes** - Plan mode, Auto mode, and Ask mode
38
+
39
+ ## Installation
40
+
41
+ ### Option 1: Install with pipx (Recommended)
42
+
43
+ ```bash
44
+ pip install pipx
45
+ pipx install devorch
46
+ ```
47
+
48
+ ### Option 2: Install with pip
49
+
50
+ ```bash
51
+ pip install devorch
52
+ ```
53
+
54
+ ### Option 3: Install from source
55
+
56
+ ```bash
57
+ git clone https://github.com/Amanbig/DevOrch.git
58
+ cd DevOrch
59
+ pip install -e .
60
+ ```
61
+
62
+ ## Quick Start
63
+
64
+ ```bash
65
+ # Start DevOrch (first run shows interactive setup)
66
+ devorch
67
+
68
+ # Specify a provider
69
+ devorch -p openai
70
+ devorch -p anthropic
71
+ devorch -p local # Ollama
72
+ ```
73
+
74
+ ## Slash Commands
75
+
76
+ ### Navigation & Switching
77
+
78
+ | Command | Description |
79
+ |---------|-------------|
80
+ | `/help` | Show all commands grouped by category |
81
+ | `/models` | Browse and switch models (interactive, numbered list) |
82
+ | `/model <name>` | Switch model (supports partial match, e.g. `/model opus`) |
83
+ | `/providers` | Browse and switch providers (interactive, numbered list) |
84
+ | `/provider <name>` | Switch provider directly |
85
+ | `/mode` | Switch between Plan/Auto/Ask modes |
86
+ | `/status` | Show provider, model, mode, memories, skills, MCP |
87
+ | `/auth [provider]` | Set or update API key for current or specified provider |
88
+
89
+ ### Memory
90
+
91
+ | Command | Description |
92
+ |---------|-------------|
93
+ | `/memory` | Show all saved memories |
94
+ | `/remember <text>` | Save something to memory |
95
+ | `/forget` | Delete a memory (interactive) |
96
+
97
+ Memories persist across conversations in `~/.devorch/memory/`. Types:
98
+ - **user** - Your role, preferences, expertise
99
+ - **feedback** - Corrections and guidance for the AI
100
+ - **project** - Project decisions, context, ongoing work
101
+ - **reference** - Links to external resources
102
+
103
+ ### Skills
104
+
105
+ | Command | Description |
106
+ |---------|-------------|
107
+ | `/skills` | List all available skills |
108
+ | `/skill <name>` | Run a skill |
109
+ | `/commit` | Create a git commit with a descriptive message |
110
+ | `/review` | Review code changes for bugs and issues |
111
+ | `/test` | Run project tests and analyze results |
112
+ | `/fix` | Fix the last error or failing test |
113
+ | `/explain` | Explain the current project structure |
114
+ | `/simplify` | Simplify recent code changes |
115
+
116
+ Custom skills can be added as YAML files in `~/.devorch/skills/`:
117
+
118
+ ```yaml
119
+ # ~/.devorch/skills/deploy.yaml
120
+ name: deploy
121
+ description: Deploy to production
122
+ prompt: |
123
+ Run the deploy script and verify it succeeds.
124
+ Check the deploy logs for any errors.
125
+ ```
126
+
127
+ ### Session
128
+
129
+ | Command | Description |
130
+ |---------|-------------|
131
+ | `/session` | Show current session info |
132
+ | `/history` | Show conversation history |
133
+ | `/clear` | Clear conversation history |
134
+ | `/compact` | Summarize and compact history |
135
+ | `/save` | Save conversation to file |
136
+ | `/undo` | Undo last message |
137
+
138
+ ### MCP
139
+
140
+ | Command | Description |
141
+ |---------|-------------|
142
+ | `/mcp` | Show connected MCP servers and their tools |
143
+
144
+ ## MCP (Model Context Protocol)
145
+
146
+ Connect external tool servers via MCP. Configure in `~/.devorch/config.yaml`:
147
+
148
+ ```yaml
149
+ mcp_servers:
150
+ filesystem:
151
+ command: npx
152
+ args: ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"]
153
+ github:
154
+ command: npx
155
+ args: ["-y", "@modelcontextprotocol/server-github"]
156
+ env:
157
+ GITHUB_TOKEN: "ghp_xxx"
158
+ sqlite:
159
+ command: uvx
160
+ args: ["mcp-server-sqlite", "--db-path", "mydb.sqlite"]
161
+ ```
162
+
163
+ MCP tools automatically appear alongside built-in tools and can be used by the AI.
164
+
165
+ ## Modes
166
+
167
+ - **ASK** (default) - Asks before each tool execution
168
+ - **AUTO** - Executes tools automatically (dangerous commands still blocked)
169
+ - **PLAN** - Shows plan before executing, asks for approval
170
+
171
+ ## Terminal Sessions
172
+
173
+ Unified terminal tool with optional GUI window. The AI can monitor output and send input.
174
+
175
+ ```
176
+ > Start a dev server (headless, AI monitors)
177
+ > terminal_session start command="npm run dev"
178
+ ✓ Session 'swift-fox-a3f2' started (PID 12345)
179
+
180
+ > Open a visible terminal (user can type, AI reads output)
181
+ > terminal_session start command="bash" gui=true
182
+ ✓ Session 'calm-owl-b7e1' started in visible terminal
183
+
184
+ > Check output
185
+ > terminal_session read session_id="swift-fox-a3f2"
186
+ ✓ [Session 'swift-fox-a3f2' — running]
187
+
188
+ > Stop it
189
+ > terminal_session stop session_id="swift-fox-a3f2"
190
+ ✓ Session stopped.
191
+ ```
192
+
193
+ Sessions are tracked in `~/.devorch/sessions/` and can be reconnected after restarting DevOrch.
194
+
195
+ ## Tool Permissions
196
+
197
+ Interactive permission system with arrow-key navigation:
198
+
199
+ ```
200
+ ? Choose an action:
201
+ » Allow once
202
+ Allow for this session
203
+ Always allow (save to config)
204
+ Deny
205
+ ```
206
+
207
+ ```bash
208
+ devorch permissions list # Show permissions
209
+ devorch permissions set shell allow # Always allow shell
210
+ devorch permissions allow shell "git *" # Allow git commands
211
+ devorch permissions deny shell "rm -rf *" # Block dangerous commands
212
+ ```
213
+
214
+ ## Supported Providers
215
+
216
+ ### Cloud Providers
217
+
218
+ | Provider | Models | API Key |
219
+ |----------|--------|---------|
220
+ | **OpenAI** | GPT-4o, GPT-4, o1 | `OPENAI_API_KEY` |
221
+ | **Anthropic** | Claude 4, Claude 3.5 | `ANTHROPIC_API_KEY` |
222
+ | **Google Gemini** | Gemini 2.0, 1.5 Pro/Flash | `GOOGLE_API_KEY` |
223
+ | **Groq** | Llama 3.3, Mixtral | `GROQ_API_KEY` |
224
+ | **Mistral** | Large, Codestral | `MISTRAL_API_KEY` |
225
+ | **Together AI** | Llama 3, Mixtral, Qwen | `TOGETHER_API_KEY` |
226
+ | **OpenRouter** | 100+ models | `OPENROUTER_API_KEY` |
227
+ | **GitHub Copilot** | GPT-4o, Claude 3.5 | `GITHUB_TOKEN` |
228
+ | **DeepSeek** | Chat, Coder, Reasoner | `DEEPSEEK_API_KEY` |
229
+ | **Kimi (Moonshot)** | 8K, 32K, 128K context | `MOONSHOT_API_KEY` |
230
+
231
+ ### Local & Self-Hosted
232
+
233
+ | Provider | Setup |
234
+ |----------|-------|
235
+ | **Ollama** | Install Ollama, run models locally |
236
+ | **LM Studio** | Install LM Studio, GUI for local models |
237
+ | **Custom** | Any OpenAI-compatible API (vLLM, TGI, llama.cpp) |
238
+
239
+ ## Tools
240
+
241
+ | Tool | Description |
242
+ |------|-------------|
243
+ | **shell** | Execute shell commands |
244
+ | **terminal_session** | Managed sessions with optional GUI (start, read, send, stop) |
245
+ | **filesystem** | Read, write, and list files |
246
+ | **search** | Find files by name patterns (glob) |
247
+ | **grep** | Search for text patterns in files |
248
+ | **edit** | Make targeted edits to existing files |
249
+ | **task** | Track progress on multi-step work |
250
+ | **memory** | Save/search persistent memories across conversations |
251
+ | **websearch** | Search the web (DuckDuckGo) |
252
+ | **webfetch** | Fetch content from a URL |
253
+
254
+ ## Configuration
255
+
256
+ ### API Keys
257
+
258
+ ```bash
259
+ # From CLI
260
+ devorch set-key openai
261
+ devorch set-key anthropic
262
+
263
+ # From within chat
264
+ /auth openai
265
+ /auth anthropic
266
+
267
+ # Or use environment variables
268
+ export OPENAI_API_KEY=sk-...
269
+ export ANTHROPIC_API_KEY=sk-ant-...
270
+ export GOOGLE_API_KEY=...
271
+ export GROQ_API_KEY=gsk_...
272
+ ```
273
+
274
+ ### Config File
275
+
276
+ `~/.devorch/config.yaml`:
277
+
278
+ ```yaml
279
+ default_provider: openai
280
+
281
+ providers:
282
+ openai:
283
+ default_model: gpt-4o
284
+ anthropic:
285
+ default_model: claude-sonnet-4-20250514
286
+
287
+ # MCP servers
288
+ mcp_servers:
289
+ github:
290
+ command: npx
291
+ args: ["-y", "@modelcontextprotocol/server-github"]
292
+ env:
293
+ GITHUB_TOKEN: "ghp_xxx"
294
+ ```
295
+
296
+ ### Directory Structure
297
+
298
+ ```
299
+ ~/.devorch/
300
+ ├── config.yaml # Provider settings, MCP servers
301
+ ├── permissions.yaml # Tool permission rules
302
+ ├── sessions.db # Chat history (SQLite)
303
+ ├── memory/ # Persistent memories
304
+ │ ├── MEMORY.md # Memory index
305
+ │ ├── user_*.md # User profile memories
306
+ │ ├── feedback_*.md # Feedback memories
307
+ │ └── project_*.md # Project context memories
308
+ ├── skills/ # Custom skill definitions
309
+ │ └── *.yaml # User-defined skills
310
+ └── sessions/ # Terminal session logs
311
+ ├── registry.json # Session registry
312
+ └── *.log # Session output logs
313
+ ```
314
+
315
+ ## Requirements
316
+
317
+ - Python 3.10+
318
+ - Dependencies: typer, rich, pydantic, openai, anthropic, google-genai, httpx, keyring, prompt_toolkit, questionary, pyyaml, duckduckgo-search
319
+
320
+ ## License
321
+
322
+ MIT
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file