tunacode-cli 0.0.9__tar.gz → 0.0.11__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.

Potentially problematic release.


This version of tunacode-cli might be problematic. Click here for more details.

Files changed (86) hide show
  1. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/LICENSE +1 -1
  2. tunacode_cli-0.0.11/PKG-INFO +387 -0
  3. tunacode_cli-0.0.11/README.md +352 -0
  4. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/pyproject.toml +5 -6
  5. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/cli/commands.py +34 -165
  6. tunacode_cli-0.0.11/src/tunacode/cli/main.py +59 -0
  7. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/cli/repl.py +24 -18
  8. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/configuration/defaults.py +1 -1
  9. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/configuration/models.py +4 -11
  10. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/configuration/settings.py +10 -3
  11. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/constants.py +6 -4
  12. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/context.py +3 -1
  13. tunacode_cli-0.0.11/src/tunacode/core/agents/main.py +119 -0
  14. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/core/setup/agent_setup.py +1 -1
  15. tunacode_cli-0.0.11/src/tunacode/core/setup/config_setup.py +267 -0
  16. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/core/setup/coordinator.py +4 -2
  17. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/core/setup/environment_setup.py +1 -1
  18. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/core/setup/git_safety_setup.py +51 -39
  19. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/exceptions.py +2 -0
  20. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/prompts/system.txt +1 -1
  21. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/services/undo_service.py +16 -13
  22. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/setup.py +6 -2
  23. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/tools/base.py +20 -11
  24. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/tools/update_file.py +14 -24
  25. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/tools/write_file.py +7 -9
  26. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/completers.py +33 -98
  27. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/input.py +9 -13
  28. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/keybindings.py +3 -1
  29. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/lexers.py +17 -16
  30. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/output.py +8 -14
  31. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/panels.py +7 -5
  32. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/prompt_manager.py +4 -8
  33. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/tool_ui.py +3 -3
  34. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/utils/system.py +0 -40
  35. tunacode_cli-0.0.11/src/tunacode_cli.egg-info/PKG-INFO +387 -0
  36. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode_cli.egg-info/SOURCES.txt +1 -10
  37. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode_cli.egg-info/requires.txt +2 -3
  38. tunacode_cli-0.0.9/PKG-INFO +0 -321
  39. tunacode_cli-0.0.9/README.md +0 -285
  40. tunacode_cli-0.0.9/src/tunacode/cli/main.py +0 -82
  41. tunacode_cli-0.0.9/src/tunacode/cli/model_selector.py +0 -178
  42. tunacode_cli-0.0.9/src/tunacode/core/agents/main.py +0 -77
  43. tunacode_cli-0.0.9/src/tunacode/core/agents/tinyagent_main.py +0 -194
  44. tunacode_cli-0.0.9/src/tunacode/core/setup/config_setup.py +0 -187
  45. tunacode_cli-0.0.9/src/tunacode/core/setup/optimized_coordinator.py +0 -73
  46. tunacode_cli-0.0.9/src/tunacode/services/enhanced_undo_service.py +0 -322
  47. tunacode_cli-0.0.9/src/tunacode/services/project_undo_service.py +0 -311
  48. tunacode_cli-0.0.9/src/tunacode/tools/tinyagent_tools.py +0 -103
  49. tunacode_cli-0.0.9/src/tunacode/utils/lazy_imports.py +0 -59
  50. tunacode_cli-0.0.9/src/tunacode/utils/regex_cache.py +0 -33
  51. tunacode_cli-0.0.9/src/tunacode_cli.egg-info/PKG-INFO +0 -321
  52. tunacode_cli-0.0.9/tests/test_import.py +0 -7
  53. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/setup.cfg +0 -0
  54. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/setup.py +0 -0
  55. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/__init__.py +0 -0
  56. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/cli/__init__.py +0 -0
  57. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/configuration/__init__.py +0 -0
  58. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/core/__init__.py +0 -0
  59. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/core/agents/__init__.py +0 -0
  60. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/core/setup/__init__.py +0 -0
  61. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/core/setup/base.py +0 -0
  62. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/core/setup/undo_setup.py +0 -0
  63. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/core/state.py +0 -0
  64. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/core/tool_handler.py +0 -0
  65. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/py.typed +0 -0
  66. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/services/__init__.py +0 -0
  67. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/services/mcp.py +0 -0
  68. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/tools/__init__.py +0 -0
  69. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/tools/read_file.py +0 -0
  70. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/tools/run_command.py +0 -0
  71. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/types.py +0 -0
  72. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/__init__.py +0 -0
  73. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/console.py +0 -0
  74. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/constants.py +0 -0
  75. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/decorators.py +0 -0
  76. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/ui/validators.py +0 -0
  77. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/utils/__init__.py +0 -0
  78. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/utils/bm25.py +0 -0
  79. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/utils/diff_utils.py +0 -0
  80. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/utils/file_utils.py +0 -0
  81. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/utils/ripgrep.py +0 -0
  82. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/utils/text_utils.py +0 -0
  83. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode/utils/user_configuration.py +0 -0
  84. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode_cli.egg-info/dependency_links.txt +0 -0
  85. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode_cli.egg-info/entry_points.txt +0 -0
  86. {tunacode_cli-0.0.9 → tunacode_cli-0.0.11}/src/tunacode_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Gavin Vickery
3
+ Copyright (c) 2025
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,387 @@
1
+ Metadata-Version: 2.4
2
+ Name: tunacode-cli
3
+ Version: 0.0.11
4
+ Summary: Your agentic CLI developer.
5
+ Author-email: larock22 <noreply@github.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/larock22/tunacode
8
+ Project-URL: Repository, https://github.com/larock22/tunacode
9
+ Keywords: cli,agent,development,automation
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Software Development
18
+ Classifier: Topic :: Utilities
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: prompt_toolkit==3.0.51
23
+ Requires-Dist: pydantic-ai[logfire]==0.2.6
24
+ Requires-Dist: pygments==2.19.1
25
+ Requires-Dist: rich==14.0.0
26
+ Requires-Dist: typer==0.15.3
27
+ Provides-Extra: dev
28
+ Requires-Dist: build; extra == "dev"
29
+ Requires-Dist: black; extra == "dev"
30
+ Requires-Dist: flake8; extra == "dev"
31
+ Requires-Dist: isort; extra == "dev"
32
+ Requires-Dist: pytest; extra == "dev"
33
+ Requires-Dist: pytest-cov; extra == "dev"
34
+ Dynamic: license-file
35
+
36
+ # TunaCode
37
+
38
+ <div align="center">
39
+
40
+ [![PyPI version](https://badge.fury.io/py/tunacode-cli.svg)](https://badge.fury.io/py/tunacode-cli)
41
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
42
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
43
+
44
+ **Your AI-powered CLI coding assistant**
45
+
46
+ [Quick Start](#quick-start) • [Features](#features) • [Configuration](#configuration) • [Documentation](#documentation)
47
+
48
+ </div>
49
+
50
+ ---
51
+
52
+ ## Overview
53
+
54
+ > **⚠️ Safety First**: TunaCode can modify your codebase. Always use git branches before making major changes. The `/undo` command has been removed - use git for version control.
55
+
56
+ > **Beta Notice**: TunaCode is currently in beta. [Report issues](https://github.com/alchemiststudiosDOTai/tunacode/issues) or share feedback to help us improve!
57
+
58
+ ---
59
+
60
+ ### Recent Updates
61
+
62
+ - **Simplified Setup**: Direct CLI configuration with `--model` and `--key` flags
63
+ - **Enhanced Safety**: Removed `/undo` command in favor of git-based workflows
64
+ - **Cleaner Codebase**: Removed `/init` command and automatic TUNACODE.md generation
65
+ - **Better Onboarding**: No model validation - trust users to provide correct model names
66
+ - **Unified Model Format**: All models use `provider:model-name` format
67
+
68
+ ### Core Features
69
+
70
+ <table>
71
+ <tr>
72
+ <td width="50%">
73
+
74
+ ### **Multi-Provider Support**
75
+
76
+ - Anthropic Claude
77
+ - OpenAI GPT
78
+ - Google Gemini
79
+ - OpenRouter (100+ models)
80
+ - Any OpenAI-compatible API
81
+
82
+ ### **Developer Tools**
83
+
84
+ - 4 core tools: read_file, write_file, update_file, run_command
85
+ - MCP (Model Context Protocol) support
86
+ - File operation confirmations with diffs
87
+ - Per-project context guides (TUNACODE.md)
88
+
89
+ </td>
90
+ <td width="50%">
91
+
92
+ ### **Safety & Control**
93
+
94
+ - Git branch integration (`/branch`)
95
+ - No automatic commits
96
+ - Explicit file operation confirmations
97
+ - Permission tracking per session
98
+ - `/yolo` mode for power users
99
+
100
+ ### **Architecture**
101
+
102
+ - Built on pydantic-ai
103
+ - Async throughout
104
+ - Modular command system
105
+ - Rich UI with syntax highlighting
106
+
107
+ </td>
108
+ </tr>
109
+ </table>
110
+
111
+ ---
112
+
113
+ ## Quick Start
114
+
115
+ ### Installation
116
+
117
+ #### PyPI
118
+
119
+ ```bash
120
+ pip install tunacode-cli
121
+ ```
122
+
123
+ #### One-line Install (Linux/macOS)
124
+
125
+ ```bash
126
+ wget -qO- https://raw.githubusercontent.com/alchemiststudiosDOTai/tunacode/master/scripts/install_linux.sh | bash
127
+ ```
128
+
129
+ ### Uninstallation
130
+
131
+ To completely remove TunaCode from your system:
132
+
133
+ ```bash
134
+ # Download and run the uninstall script
135
+ wget -qO- https://raw.githubusercontent.com/alchemiststudiosDOTai/tunacode/master/scripts/uninstall.sh | bash
136
+
137
+ # Or manually:
138
+ # 1. Remove the package
139
+ pipx uninstall tunacode # if installed via pipx
140
+ # OR
141
+ pip uninstall tunacode-cli # if installed via pip
142
+
143
+ # 2. Remove configuration files
144
+ rm -rf ~/.config/tunacode*
145
+
146
+ # 3. Remove any leftover binaries
147
+ rm -f ~/.local/bin/tunacode
148
+ ```
149
+
150
+ ### Setup Options
151
+
152
+ <details>
153
+ <summary><b>Option 1: Interactive Setup (Beginner-friendly)</b></summary>
154
+
155
+ ```bash
156
+ tunacode
157
+ ```
158
+
159
+ Follow the interactive prompts to configure your preferred LLM provider.
160
+
161
+ </details>
162
+
163
+ <details>
164
+ <summary><b>Option 2: Direct CLI Setup (Recommended)</b></summary>
165
+
166
+ ```bash
167
+ # OpenAI
168
+ tunacode --model "openai:gpt-4.1" --key "your-openai-key"
169
+
170
+ # Anthropic Claude
171
+ tunacode --model "anthropic:claude-3-opus" --key "your-anthropic-key"
172
+
173
+ # OpenRouter (Access to multiple models)
174
+ tunacode --baseurl "https://openrouter.ai/api/v1" \
175
+ --model "openrouter:openai/gpt-4.1" \
176
+ --key "your-openrouter-key"
177
+ ```
178
+
179
+ </details>
180
+
181
+ > **Important**: Model names require provider prefixes (e.g., `openai:gpt-4.1`, not `gpt-4.1`)
182
+
183
+ ---
184
+
185
+ ## Configuration
186
+
187
+ ### Config Location
188
+
189
+ Configuration is stored in `~/.config/tunacode.json`
190
+
191
+ ### Model Format
192
+
193
+ ```
194
+ provider:model-name
195
+ ```
196
+
197
+ **Examples:**
198
+
199
+ - `openai:gpt-4.1`
200
+ - `anthropic:claude-3-opus`
201
+ - `google-gla:gemini-2.0-flash`
202
+ - `openrouter:mistralai/devstral-small`
203
+
204
+ ### OpenRouter Integration
205
+
206
+ <details>
207
+ <summary><b>Click to expand OpenRouter setup</b></summary>
208
+
209
+ [OpenRouter](https://openrouter.ai) provides access to 100+ models through a single API:
210
+
211
+ ```bash
212
+ tunacode --baseurl "https://openrouter.ai/api/v1" \
213
+ --model "openrouter:openai/gpt-4.1" \
214
+ --key "your-openrouter-key"
215
+ ```
216
+
217
+ **Manual Configuration:**
218
+
219
+ ```json
220
+ {
221
+ "env": {
222
+ "OPENROUTER_API_KEY": "<YOUR_KEY>",
223
+ "OPENAI_BASE_URL": "https://openrouter.ai/api/v1"
224
+ },
225
+ "default_model": "openrouter:openai/gpt-4.1"
226
+ }
227
+ ```
228
+
229
+ **Popular Models:**
230
+
231
+ - `openrouter:mistralai/devstral-small`
232
+ - `openrouter:openai/gpt-4.1-mini`
233
+ - `openrouter:codex-mini-latest`
234
+
235
+ </details>
236
+
237
+ ### MCP (Model Context Protocol) Support
238
+
239
+ <details>
240
+ <summary><b>Click to expand MCP configuration</b></summary>
241
+
242
+ Extend your AI's capabilities with MCP servers:
243
+
244
+ ```json
245
+ {
246
+ "mcpServers": {
247
+ "fetch": {
248
+ "command": "uvx",
249
+ "args": ["mcp-server-fetch"]
250
+ },
251
+ "github": {
252
+ "command": "npx",
253
+ "args": ["-y", "@modelcontextprotocol/server-github"],
254
+ "env": {
255
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
256
+ }
257
+ }
258
+ }
259
+ }
260
+ ```
261
+
262
+ Learn more at [modelcontextprotocol.io](https://modelcontextprotocol.io/)
263
+
264
+ </details>
265
+
266
+ ---
267
+
268
+ ## Commands Reference
269
+
270
+ | Command | Description |
271
+ | -------------------------------- | -------------------------------- |
272
+ | `/help` | Show available commands |
273
+ | `/yolo` | Toggle confirmation skipping |
274
+ | `/clear` | Clear message history |
275
+ | `/compact` | Summarize and clear old messages |
276
+ | `/model` | Show current model |
277
+ | `/model <provider:name>` | Switch model |
278
+ | `/model <provider:name> default` | Set default model |
279
+ | `/branch <name>` | Create and switch Git branch |
280
+ | `/dump` | Show message history (debug) |
281
+ | `exit` | Exit application |
282
+
283
+ ---
284
+
285
+ ## Customization
286
+
287
+ ### Project Guides
288
+
289
+ Create a `TUNACODE.md` file your project root to customize TunaCode's behavior:
290
+
291
+ ```markdown
292
+ # Project Guide
293
+
294
+ ## Tech Stack
295
+
296
+ - Python 3.11
297
+ - FastAPI
298
+ - PostgreSQL
299
+
300
+ ## Preferences
301
+
302
+ - Use type hints
303
+ - Follow PEP 8
304
+ - Write tests for new features
305
+ ```
306
+
307
+ ---
308
+
309
+ ## Development
310
+
311
+ ### Requirements
312
+
313
+ - Python 3.10+
314
+ - Git (for version control)
315
+
316
+ ### Development Setup
317
+
318
+ ```bash
319
+ # Install development dependencies
320
+ make install
321
+
322
+ # Run linting
323
+ make lint
324
+
325
+ # Run tests
326
+ make test
327
+ ```
328
+
329
+ ### Release Process
330
+
331
+ <details>
332
+ <summary><b>Click to expand release steps</b></summary>
333
+
334
+ 1. **Update versions:**
335
+
336
+ - `pyproject.toml`
337
+ - `src/tunacode/constants.py` (APP_VERSION)
338
+
339
+ 2. **Commit and tag:**
340
+
341
+ ```bash
342
+ git add pyproject.toml src/tunacode/constants.py
343
+ git commit -m "chore: bump version to X.Y.Z"
344
+ git tag vX.Y.Z
345
+ git push origin vX.Y.Z
346
+ ```
347
+
348
+ 3. **Create release:**
349
+ ```bash
350
+ gh release create vX.Y.Z --title "vX.Y.Z" --notes "Release notes"
351
+ ```
352
+
353
+ </details>
354
+
355
+ ### Commit Convention
356
+
357
+ Following [Conventional Commits](https://www.conventionalcommits.org/):
358
+
359
+ - `feat:` New features
360
+ - `fix:` Bug fixes
361
+ - `docs:` Documentation
362
+ - `style:` Code formatting
363
+ - `refactor:` Code refactoring
364
+ - `test:` Tests
365
+ - `chore:` Maintenance
366
+
367
+ ---
368
+
369
+ ## Links
370
+
371
+ <div align="center">
372
+
373
+ [![PyPI](https://img.shields.io/badge/PyPI-Package-blue?logo=pypi)](https://pypi.org/project/tunacode-cli/)
374
+ [![GitHub](https://img.shields.io/badge/GitHub-Repository-black?logo=github)](https://github.com/alchemiststudiosDOTai/tunacode)
375
+ [![Issues](https://img.shields.io/badge/GitHub-Issues-red?logo=github)](https://github.com/alchemiststudiosDOTai/tunacode/issues)
376
+
377
+ </div>
378
+
379
+ ---
380
+
381
+ ## License
382
+
383
+ MIT License - see [LICENSE](LICENSE) file for details.
384
+
385
+ ## Acknowledgments
386
+
387
+ TunaCode is a fork of [sidekick-cli](https://github.com/geekforbrains/sidekick-cli). Special thanks to the sidekick-cli team for creating the foundation that made TunaCode possible.