tunacode-cli 0.0.5__py3-none-any.whl → 0.0.6__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 tunacode-cli might be problematic. Click here for more details.
- tunacode/cli/commands.py +91 -33
- tunacode/cli/model_selector.py +178 -0
- tunacode/cli/repl.py +11 -10
- tunacode/configuration/models.py +11 -1
- tunacode/constants.py +10 -10
- tunacode/context.py +1 -3
- tunacode/core/agents/main.py +52 -94
- tunacode/core/agents/tinyagent_main.py +171 -0
- tunacode/core/setup/git_safety_setup.py +39 -51
- tunacode/core/setup/optimized_coordinator.py +73 -0
- tunacode/exceptions.py +0 -2
- tunacode/services/enhanced_undo_service.py +322 -0
- tunacode/services/project_undo_service.py +311 -0
- tunacode/services/undo_service.py +13 -16
- tunacode/tools/base.py +11 -20
- tunacode/tools/tinyagent_tools.py +103 -0
- tunacode/tools/update_file.py +24 -14
- tunacode/tools/write_file.py +9 -7
- tunacode/ui/completers.py +98 -33
- tunacode/ui/input.py +8 -7
- tunacode/ui/keybindings.py +1 -3
- tunacode/ui/lexers.py +16 -17
- tunacode/ui/output.py +9 -3
- tunacode/ui/panels.py +4 -4
- tunacode/ui/prompt_manager.py +6 -4
- tunacode/utils/lazy_imports.py +59 -0
- tunacode/utils/regex_cache.py +33 -0
- tunacode_cli-0.0.6.dist-info/METADATA +235 -0
- {tunacode_cli-0.0.5.dist-info → tunacode_cli-0.0.6.dist-info}/RECORD +33 -25
- tunacode_cli-0.0.5.dist-info/METADATA +0 -247
- {tunacode_cli-0.0.5.dist-info → tunacode_cli-0.0.6.dist-info}/WHEEL +0 -0
- {tunacode_cli-0.0.5.dist-info → tunacode_cli-0.0.6.dist-info}/entry_points.txt +0 -0
- {tunacode_cli-0.0.5.dist-info → tunacode_cli-0.0.6.dist-info}/licenses/LICENSE +0 -0
- {tunacode_cli-0.0.5.dist-info → tunacode_cli-0.0.6.dist-info}/top_level.txt +0 -0
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: tunacode-cli
|
|
3
|
-
Version: 0.0.5
|
|
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 (Beta)
|
|
37
|
-
|
|
38
|
-
[](https://badge.fury.io/py/tunacode-cli)
|
|
39
|
-
[](https://www.python.org/downloads/)
|
|
40
|
-
|
|
41
|
-

|
|
42
|
-
|
|
43
|
-
Your agentic CLI developer.
|
|
44
|
-
|
|
45
|
-
## Overview
|
|
46
|
-
|
|
47
|
-
TunaCode is an agentic CLI-based AI tool inspired by Claude Code, Copilot, Windsurf and Cursor. It's meant
|
|
48
|
-
to be an open source alternative to these tools, providing a similar experience but with the flexibility of
|
|
49
|
-
using different LLM providers (Anthropic, OpenAI, Google Gemini, OpenRouter) while keeping the agentic workflow.
|
|
50
|
-
|
|
51
|
-
*TunaCode is currently in beta and under active development. Please [report issues](https://github.com/larock22/tunacode/issues) or share feedback!*
|
|
52
|
-
|
|
53
|
-
## Features
|
|
54
|
-
|
|
55
|
-
- No vendor lock-in. Use whichever LLM provider you prefer.
|
|
56
|
-
- MCP support
|
|
57
|
-
- Use /undo when AI breaks things.
|
|
58
|
-
- Easily switch between models in the same session.
|
|
59
|
-
- JIT-style system prompt injection ensures TunaCode doesn't lose the plot.
|
|
60
|
-
- Per-project guide. Adjust TunaCode's behavior to suit your needs.
|
|
61
|
-
- CLI-first design. Ditch the clunky IDE.
|
|
62
|
-
- Cost and token tracking.
|
|
63
|
-
- Per command or per session confirmation skipping.
|
|
64
|
-
|
|
65
|
-
## Upcoming Features
|
|
66
|
-
|
|
67
|
-
- **TinyAgent Integration**: Adding the [tinyagent framework](http://tinyagent.xyz/) to make this CLI tool truly agentic with multi-step reasoning and autonomous task execution
|
|
68
|
-
- **Advanced Flows**: Implementing sophisticated workflow patterns for complex development tasks
|
|
69
|
-
- **Quality of Life Updates**: Enhanced user experience with improved UI, better error handling, and streamlined interactions
|
|
70
|
-
|
|
71
|
-
## Quick Start
|
|
72
|
-
|
|
73
|
-
Install TunaCode.
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
pip install tunacode-cli
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
On first run, you'll be asked to configure your LLM providers.
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
tunacode
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## Configuration
|
|
86
|
-
|
|
87
|
-
After initial setup, TunaCode saves a config file to `~/.config/tunacode.json`. You can open and
|
|
88
|
-
edit this file as needed. Future updates will make editing easier directly from within TunaCode.
|
|
89
|
-
|
|
90
|
-
### OpenRouter Support
|
|
91
|
-
|
|
92
|
-
To use [OpenRouter](https://openrouter.ai) models, add an `OPENROUTER_API_KEY` to the
|
|
93
|
-
`env` section of your configuration file. TunaCode will set the environment variable so the
|
|
94
|
-
OpenAI client can communicate with OpenRouter:
|
|
95
|
-
|
|
96
|
-
```json
|
|
97
|
-
{
|
|
98
|
-
"env": {
|
|
99
|
-
"OPENROUTER_API_KEY": "<YOUR_KEY>"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Then run TunaCode with the OpenRouter base URL:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
OPENAI_BASE_URL="https://openrouter.ai/api/v1" tunacode
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
You can now switch to OpenRouter models using:
|
|
111
|
-
```
|
|
112
|
-
/model openrouter:mistralai/devstral-small
|
|
113
|
-
/model openrouter:openai/gpt-4.1-mini
|
|
114
|
-
/model openrouter:codex-mini-latest
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
**Adding Custom OpenRouter Models**: You can use any OpenRouter model by editing your `~/.config/tunacode.json` file and adding the model to the configuration. TunaCode will automatically detect and use any model format `openrouter:provider/model-name`.
|
|
118
|
-
|
|
119
|
-
### MCP Support
|
|
120
|
-
|
|
121
|
-
TunaCode supports Model Context Protocol (MCP) servers. You can configure MCP servers in your `~/.config/tunacode.json` file:
|
|
122
|
-
|
|
123
|
-
```json
|
|
124
|
-
{
|
|
125
|
-
"mcpServers": {
|
|
126
|
-
"fetch": {
|
|
127
|
-
"command": "uvx",
|
|
128
|
-
"args": ["mcp-server-fetch"]
|
|
129
|
-
},
|
|
130
|
-
"github": {
|
|
131
|
-
"command": "npx",
|
|
132
|
-
"args": ["-y", "@modelcontextprotocol/server-github"],
|
|
133
|
-
"env": {
|
|
134
|
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
MCP servers extend the capabilities of your AI assistant, allowing it to interact with additional tools and data sources. Learn more about MCP at [modelcontextprotocol.io](https://modelcontextprotocol.io/).
|
|
142
|
-
|
|
143
|
-
### Available Commands
|
|
144
|
-
|
|
145
|
-
- `/help` - Show available commands
|
|
146
|
-
- `/yolo` - Toggle "yolo" mode (skip tool confirmations)
|
|
147
|
-
- `/clear` - Clear message history
|
|
148
|
-
- `/compact` - Summarize message history and clear old messages
|
|
149
|
-
- `/model` - List available models
|
|
150
|
-
- `/model <num>` - Switch to a specific model (by index)
|
|
151
|
-
- `/branch <name>` - Create and switch to a new Git branch
|
|
152
|
-
- `/undo` - Undo most recent changes
|
|
153
|
-
- `/dump` - Show current message history (for debugging)
|
|
154
|
-
- `exit` - Exit the application
|
|
155
|
-
|
|
156
|
-
## Customization
|
|
157
|
-
|
|
158
|
-
TunaCode supports the use of a "guide". This is a `TUNACODE.md` file in the project root that contains
|
|
159
|
-
instructions for TunaCode. Helpful for specifying tech stack, project structure, development
|
|
160
|
-
preferences etc.
|
|
161
|
-
|
|
162
|
-
## Requirements
|
|
163
|
-
|
|
164
|
-
- Python 3.10 or higher
|
|
165
|
-
- Git (for undo functionality)
|
|
166
|
-
|
|
167
|
-
## Installation
|
|
168
|
-
|
|
169
|
-
### Using pip
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
pip install tunacode-cli
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### From Source
|
|
176
|
-
|
|
177
|
-
1. Clone the repository
|
|
178
|
-
2. Install dependencies: `pip install .` (or `pip install -e .` for development)
|
|
179
|
-
|
|
180
|
-
## Development
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
# Install development dependencies
|
|
184
|
-
make install
|
|
185
|
-
|
|
186
|
-
# Run linting
|
|
187
|
-
make lint
|
|
188
|
-
|
|
189
|
-
# Run tests
|
|
190
|
-
make test
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
## Release Process
|
|
194
|
-
|
|
195
|
-
When preparing a new release:
|
|
196
|
-
|
|
197
|
-
1. Update version numbers in:
|
|
198
|
-
- `pyproject.toml`
|
|
199
|
-
- `src/tunacode/constants.py` (APP_VERSION)
|
|
200
|
-
|
|
201
|
-
2. Commit the version changes:
|
|
202
|
-
```bash
|
|
203
|
-
git add pyproject.toml src/tunacode/constants.py
|
|
204
|
-
git commit -m "chore: bump version to X.Y.Z"
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
3. Create and push a tag:
|
|
208
|
-
```bash
|
|
209
|
-
git tag vX.Y.Z
|
|
210
|
-
git push origin vX.Y.Z
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
4. Create a GitHub release:
|
|
214
|
-
```bash
|
|
215
|
-
gh release create vX.Y.Z --title "vX.Y.Z" --notes "Release notes here"
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
5. Merge to main branch and push to trigger PyPI release (automated)
|
|
219
|
-
|
|
220
|
-
### Commit Convention
|
|
221
|
-
|
|
222
|
-
This project follows the [Conventional Commits](https://www.conventionalcommits.org/) specification for commit messages:
|
|
223
|
-
|
|
224
|
-
- `feat:` - New features
|
|
225
|
-
- `fix:` - Bug fixes
|
|
226
|
-
- `docs:` - Documentation changes
|
|
227
|
-
- `style:` - Code style changes (formatting, etc.)
|
|
228
|
-
- `refactor:` - Code refactoring
|
|
229
|
-
- `perf:` - Performance improvements
|
|
230
|
-
- `test:` - Test additions or modifications
|
|
231
|
-
- `chore:` - Maintenance tasks (version bumps, etc.)
|
|
232
|
-
- `build:` - Build system changes
|
|
233
|
-
- `ci:` - CI configuration changes
|
|
234
|
-
|
|
235
|
-
## Links
|
|
236
|
-
|
|
237
|
-
- [PyPI Package](https://pypi.org/project/tunacode-cli/)
|
|
238
|
-
- [GitHub Issues](https://github.com/larock22/tunacode/issues)
|
|
239
|
-
- [GitHub Repository](https://github.com/larock22/tunacode)
|
|
240
|
-
|
|
241
|
-
## License
|
|
242
|
-
|
|
243
|
-
MIT
|
|
244
|
-
|
|
245
|
-
## Acknowledgments
|
|
246
|
-
|
|
247
|
-
This project is a fork of [sidekick-cli](https://github.com/geekforbrains/sidekick-cli). Thank you to the sidekick-cli team for creating the foundation that made TunaCode possible! 🙏
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|