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