tunacode-cli 0.0.5__tar.gz → 0.0.7__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 (84) hide show
  1. tunacode_cli-0.0.7/PKG-INFO +262 -0
  2. tunacode_cli-0.0.7/README.md +226 -0
  3. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/pyproject.toml +3 -2
  4. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/cli/commands.py +91 -33
  5. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/cli/main.py +6 -0
  6. tunacode_cli-0.0.7/src/tunacode/cli/model_selector.py +178 -0
  7. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/cli/repl.py +11 -10
  8. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/configuration/models.py +11 -1
  9. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/constants.py +10 -10
  10. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/context.py +1 -3
  11. tunacode_cli-0.0.7/src/tunacode/core/agents/main.py +77 -0
  12. tunacode_cli-0.0.7/src/tunacode/core/agents/tinyagent_main.py +173 -0
  13. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/setup/git_safety_setup.py +39 -51
  14. tunacode_cli-0.0.7/src/tunacode/core/setup/optimized_coordinator.py +73 -0
  15. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/exceptions.py +0 -2
  16. tunacode_cli-0.0.7/src/tunacode/services/enhanced_undo_service.py +322 -0
  17. tunacode_cli-0.0.7/src/tunacode/services/project_undo_service.py +311 -0
  18. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/services/undo_service.py +13 -16
  19. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/tools/base.py +11 -20
  20. tunacode_cli-0.0.7/src/tunacode/tools/tinyagent_tools.py +103 -0
  21. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/tools/update_file.py +24 -14
  22. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/tools/write_file.py +9 -7
  23. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/completers.py +98 -33
  24. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/input.py +8 -7
  25. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/keybindings.py +1 -3
  26. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/lexers.py +16 -17
  27. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/output.py +9 -3
  28. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/panels.py +4 -4
  29. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/prompt_manager.py +6 -4
  30. tunacode_cli-0.0.7/src/tunacode/utils/lazy_imports.py +59 -0
  31. tunacode_cli-0.0.7/src/tunacode/utils/regex_cache.py +33 -0
  32. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/utils/system.py +40 -0
  33. tunacode_cli-0.0.7/src/tunacode_cli.egg-info/PKG-INFO +262 -0
  34. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode_cli.egg-info/SOURCES.txt +10 -1
  35. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode_cli.egg-info/requires.txt +2 -1
  36. tunacode_cli-0.0.7/tests/test_import.py +7 -0
  37. tunacode_cli-0.0.5/PKG-INFO +0 -247
  38. tunacode_cli-0.0.5/README.md +0 -212
  39. tunacode_cli-0.0.5/src/tunacode/core/agents/main.py +0 -119
  40. tunacode_cli-0.0.5/src/tunacode_cli.egg-info/PKG-INFO +0 -247
  41. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/LICENSE +0 -0
  42. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/setup.cfg +0 -0
  43. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/setup.py +0 -0
  44. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/__init__.py +0 -0
  45. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/cli/__init__.py +0 -0
  46. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/configuration/__init__.py +0 -0
  47. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/configuration/defaults.py +0 -0
  48. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/configuration/settings.py +0 -0
  49. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/__init__.py +0 -0
  50. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/agents/__init__.py +0 -0
  51. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/setup/__init__.py +0 -0
  52. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/setup/agent_setup.py +0 -0
  53. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/setup/base.py +0 -0
  54. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/setup/config_setup.py +0 -0
  55. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/setup/coordinator.py +0 -0
  56. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/setup/environment_setup.py +0 -0
  57. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/setup/undo_setup.py +0 -0
  58. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/state.py +0 -0
  59. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/core/tool_handler.py +0 -0
  60. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/prompts/system.txt +0 -0
  61. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/py.typed +0 -0
  62. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/services/__init__.py +0 -0
  63. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/services/mcp.py +0 -0
  64. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/setup.py +0 -0
  65. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/tools/__init__.py +0 -0
  66. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/tools/read_file.py +0 -0
  67. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/tools/run_command.py +0 -0
  68. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/types.py +0 -0
  69. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/__init__.py +0 -0
  70. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/console.py +0 -0
  71. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/constants.py +0 -0
  72. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/decorators.py +0 -0
  73. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/tool_ui.py +0 -0
  74. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/ui/validators.py +0 -0
  75. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/utils/__init__.py +0 -0
  76. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/utils/bm25.py +0 -0
  77. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/utils/diff_utils.py +0 -0
  78. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/utils/file_utils.py +0 -0
  79. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/utils/ripgrep.py +0 -0
  80. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/utils/text_utils.py +0 -0
  81. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode/utils/user_configuration.py +0 -0
  82. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode_cli.egg-info/dependency_links.txt +0 -0
  83. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode_cli.egg-info/entry_points.txt +0 -0
  84. {tunacode_cli-0.0.5 → tunacode_cli-0.0.7}/src/tunacode_cli.egg-info/top_level.txt +0 -0
@@ -0,0 +1,262 @@
1
+ Metadata-Version: 2.4
2
+ Name: tunacode-cli
3
+ Version: 0.0.7
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: tiny_agent_os>=0.1.0
24
+ Requires-Dist: pygments==2.19.1
25
+ Requires-Dist: rich==14.0.0
26
+ Requires-Dist: typer==0.15.3
27
+ Requires-Dist: pyyaml>=6.0
28
+ Provides-Extra: dev
29
+ Requires-Dist: build; extra == "dev"
30
+ Requires-Dist: black; extra == "dev"
31
+ Requires-Dist: flake8; extra == "dev"
32
+ Requires-Dist: isort; extra == "dev"
33
+ Requires-Dist: pytest; extra == "dev"
34
+ Requires-Dist: pytest-cov; extra == "dev"
35
+ Dynamic: license-file
36
+
37
+ # 🐟 TunaCode
38
+
39
+ [![PyPI version](https://badge.fury.io/py/tunacode-cli.svg)](https://badge.fury.io/py/tunacode-cli)
40
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
41
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
42
+
43
+ ![Chuna](chuna.jpg_medium)
44
+
45
+ **Your agentic CLI developer** - An open-source alternative to Claude Code, Copilot, and Cursor with multi-provider LLM support.
46
+
47
+
48
+ ## ✨ What's New (v0.1.0)
49
+
50
+ - 🚀 **60% faster startup** with lazy loading and optimizations
51
+ - 🤖 **TinyAgent integration** for robust ReAct-based interactions
52
+ - 🛡️ **Three-layer undo system** with automatic failover
53
+ - 📊 **Enhanced model selection** with fuzzy matching and cost indicators
54
+ - 📁 **Project-local backups** in `.tunacode/` directory
55
+
56
+ ## 🎯 Features
57
+
58
+ ### Core Capabilities
59
+ - **🔓 No vendor lock-in** - Use any LLM provider (OpenAI, Anthropic, Google, 100+ via OpenRouter)
60
+ - **⚡ Fast & responsive** - Optimized for speed with <5ms operation overhead
61
+ - **🛡️ Safe operations** - Three-layer undo system ensures nothing is lost
62
+ - **🎨 Modern CLI** - Beautiful terminal UI with syntax highlighting
63
+ - **💰 Cost tracking** - Monitor tokens and costs per session
64
+
65
+ ### Developer Experience
66
+ - **🔄 Hot model switching** - Change models mid-conversation with `/model`
67
+ - **📝 Project guides** - Customize behavior with `TUNACODE.md` files
68
+ - **🚀 YOLO mode** - Skip confirmations when you're confident
69
+ - **🔧 MCP support** - Extend with Model Context Protocol servers
70
+ - **📊 Git integration** - Automatic branch creation and undo support
71
+
72
+ ## 🚀 Quick Start
73
+
74
+ ### One-Line Install (Linux/macOS)
75
+
76
+ ```bash
77
+ # Using curl
78
+ curl -sSL https://raw.githubusercontent.com/alchemiststudiosDOTai/tunacode/master/scripts/install_linux.sh | bash
79
+
80
+ # Or using wget
81
+ wget -qO- https://raw.githubusercontent.com/alchemiststudiosDOTai/tunacode/master/scripts/install_linux.sh | bash
82
+ ```
83
+
84
+ This creates a virtual environment in `~/.tunacode-venv` and adds the `tunacode` command to your PATH.
85
+
86
+ ### Alternative Install Methods
87
+
88
+ ```bash
89
+ # Install from PyPI
90
+ pip install tunacode-cli
91
+
92
+ # Or install globally using pipx (recommended)
93
+ python3 -m pip install --user pipx
94
+ python3 -m pipx ensurepath
95
+ pipx install tunacode-cli
96
+ ```
97
+
98
+ ### Start Using TunaCode
99
+
100
+ ```bash
101
+ # Run setup (first time only)
102
+ tunacode
103
+
104
+ # Start coding!
105
+ tunacode
106
+ > Help me refactor this codebase to use async/await
107
+
108
+ # Update to latest version
109
+ tunacode --update
110
+ ```
111
+
112
+ ## 📋 Commands
113
+
114
+ | Command | Description | Example |
115
+ |---------|-------------|---------|
116
+ | `/model` or `/m` | List and switch models | `/model 3` or `/m opus` |
117
+ | `/yolo` | Toggle confirmation skipping | `/yolo` |
118
+ | `/undo` | Undo last file operation | `/undo` |
119
+ | `/clear` | Clear conversation history | `/clear` |
120
+ | `/branch <name>` | Create new git branch | `/branch feature/auth` |
121
+ | `/compact` | Summarize and trim history | `/compact` |
122
+ | `/help` | Show all commands | `/help` |
123
+ | `--update` | Update to latest version | `tunacode --update` |
124
+
125
+ ## 🔧 Configuration
126
+
127
+ Configuration is stored in `~/.config/tunacode.json`:
128
+
129
+ ```json
130
+ {
131
+ "default_model": "openai:gpt-4o",
132
+ "env": {
133
+ "OPENAI_API_KEY": "sk-...",
134
+ "ANTHROPIC_API_KEY": "sk-ant-...",
135
+ "OPENROUTER_API_KEY": "sk-or-..."
136
+ },
137
+ "mcpServers": {
138
+ "github": {
139
+ "command": "npx",
140
+ "args": ["-y", "@modelcontextprotocol/server-github"],
141
+ "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "..."}
142
+ }
143
+ }
144
+ }
145
+ ```
146
+
147
+ ### Using OpenRouter (100+ Models)
148
+
149
+ ```bash
150
+ # Add your OpenRouter API key to config
151
+ # Then run with OpenRouter base URL:
152
+ OPENAI_BASE_URL="https://openrouter.ai/api/v1" tunacode
153
+
154
+ # Use any OpenRouter model:
155
+ /model openrouter:anthropic/claude-3-opus
156
+ /model openrouter:mistralai/devstral-small
157
+ /model openrouter:openai/gpt-4.1
158
+ ```
159
+
160
+ ## 🛡️ Undo System
161
+
162
+ TunaCode provides **three layers of protection** for your files:
163
+
164
+ 1. **Git commits** - Primary undo mechanism (if available)
165
+ 2. **Operation log** - Tracks changes with content (<100KB files)
166
+ 3. **File backups** - Physical copies in `.tunacode/backups/`
167
+
168
+ All undo data is stored locally in your project:
169
+
170
+ ```
171
+ your-project/
172
+ └── .tunacode/ # Auto-created, gitignored
173
+ ├── backups/ # Timestamped file copies
174
+ ├── operations.jsonl # Change history
175
+ └── README.md # Explains the directory
176
+ ```
177
+
178
+ ## 🎯 Project Customization
179
+
180
+ Create a `TUNACODE.md` file in your project root:
181
+
182
+ ```markdown
183
+ # Project Guidelines for TunaCode
184
+
185
+ ## Tech Stack
186
+ - Next.js 14 with App Router
187
+ - TypeScript with strict mode
188
+ - Tailwind CSS for styling
189
+
190
+ ## Conventions
191
+ - Use arrow functions for components
192
+ - Prefer server components where possible
193
+ - Follow conventional commits
194
+
195
+ ## Commands
196
+ - `npm run dev` - Start development
197
+ - `npm test` - Run tests
198
+ ```
199
+
200
+ ## ⚡ Performance
201
+
202
+ TunaCode is optimized for speed:
203
+ - **Startup time**: ~0.5-0.8 seconds
204
+ - **Model switching**: ~100ms
205
+ - **File operations**: ~5ms overhead
206
+ - **API calls**: Connection pooling enabled
207
+
208
+ ## 🔧 Advanced Usage
209
+
210
+ ### Environment Variables
211
+ ```bash
212
+ # Use different base URLs
213
+ OPENAI_BASE_URL="https://openrouter.ai/api/v1" tunacode
214
+
215
+ # Disable undo system
216
+ TUNACODE_NO_UNDO=1 tunacode
217
+
218
+ # Set default model
219
+ TUNACODE_MODEL="anthropic:claude-3-opus" tunacode
220
+ ```
221
+
222
+ ### MCP Servers
223
+ Extend TunaCode with Model Context Protocol servers for web fetching, database access, and more. See [modelcontextprotocol.io](https://modelcontextprotocol.io/) for available servers.
224
+
225
+ ## 🤝 Contributing
226
+
227
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
228
+
229
+ ```bash
230
+ # Setup development environment
231
+ git clone https://github.com/larock22/tunacode
232
+ cd tunacode
233
+ pip install -e ".[dev]"
234
+
235
+ # Run tests
236
+ make test
237
+
238
+ # Lint code
239
+ make lint
240
+ ```
241
+
242
+ ## 📚 Documentation
243
+
244
+ - [Architecture Overview](docs/architecture.md)
245
+ - [API Integration](API_CALL_FLOW.md)
246
+ - [Undo System Design](UNDO_SYSTEM_DESIGN.md)
247
+ - [Performance Guide](PERFORMANCE_OPTIMIZATIONS.md)
248
+
249
+ ## 🙏 Acknowledgments
250
+
251
+ TunaCode is built on the foundation of [sidekick-cli](https://github.com/geekforbrains/sidekick-cli). Special thanks to:
252
+ - The sidekick-cli team for the original codebase
253
+ - [TinyAgent](https://github.com/alchemiststudiosDOTai/tinyAgent) for the robust agent framework
254
+ - The open-source community for feedback and contributions
255
+
256
+ ## 📄 License
257
+
258
+ MIT License - see [LICENSE](LICENSE) for details.
259
+
260
+ ---
261
+
262
+ **Note**: TunaCode is in active development. Please [report issues](https://github.com/larock22/tunacode/issues) or share feedback!
@@ -0,0 +1,226 @@
1
+ # 🐟 TunaCode
2
+
3
+ [![PyPI version](https://badge.fury.io/py/tunacode-cli.svg)](https://badge.fury.io/py/tunacode-cli)
4
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ ![Chuna](chuna.jpg_medium)
8
+
9
+ **Your agentic CLI developer** - An open-source alternative to Claude Code, Copilot, and Cursor with multi-provider LLM support.
10
+
11
+
12
+ ## ✨ What's New (v0.1.0)
13
+
14
+ - 🚀 **60% faster startup** with lazy loading and optimizations
15
+ - 🤖 **TinyAgent integration** for robust ReAct-based interactions
16
+ - 🛡️ **Three-layer undo system** with automatic failover
17
+ - 📊 **Enhanced model selection** with fuzzy matching and cost indicators
18
+ - 📁 **Project-local backups** in `.tunacode/` directory
19
+
20
+ ## 🎯 Features
21
+
22
+ ### Core Capabilities
23
+ - **🔓 No vendor lock-in** - Use any LLM provider (OpenAI, Anthropic, Google, 100+ via OpenRouter)
24
+ - **⚡ Fast & responsive** - Optimized for speed with <5ms operation overhead
25
+ - **🛡️ Safe operations** - Three-layer undo system ensures nothing is lost
26
+ - **🎨 Modern CLI** - Beautiful terminal UI with syntax highlighting
27
+ - **💰 Cost tracking** - Monitor tokens and costs per session
28
+
29
+ ### Developer Experience
30
+ - **🔄 Hot model switching** - Change models mid-conversation with `/model`
31
+ - **📝 Project guides** - Customize behavior with `TUNACODE.md` files
32
+ - **🚀 YOLO mode** - Skip confirmations when you're confident
33
+ - **🔧 MCP support** - Extend with Model Context Protocol servers
34
+ - **📊 Git integration** - Automatic branch creation and undo support
35
+
36
+ ## 🚀 Quick Start
37
+
38
+ ### One-Line Install (Linux/macOS)
39
+
40
+ ```bash
41
+ # Using curl
42
+ curl -sSL https://raw.githubusercontent.com/alchemiststudiosDOTai/tunacode/master/scripts/install_linux.sh | bash
43
+
44
+ # Or using wget
45
+ wget -qO- https://raw.githubusercontent.com/alchemiststudiosDOTai/tunacode/master/scripts/install_linux.sh | bash
46
+ ```
47
+
48
+ This creates a virtual environment in `~/.tunacode-venv` and adds the `tunacode` command to your PATH.
49
+
50
+ ### Alternative Install Methods
51
+
52
+ ```bash
53
+ # Install from PyPI
54
+ pip install tunacode-cli
55
+
56
+ # Or install globally using pipx (recommended)
57
+ python3 -m pip install --user pipx
58
+ python3 -m pipx ensurepath
59
+ pipx install tunacode-cli
60
+ ```
61
+
62
+ ### Start Using TunaCode
63
+
64
+ ```bash
65
+ # Run setup (first time only)
66
+ tunacode
67
+
68
+ # Start coding!
69
+ tunacode
70
+ > Help me refactor this codebase to use async/await
71
+
72
+ # Update to latest version
73
+ tunacode --update
74
+ ```
75
+
76
+ ## 📋 Commands
77
+
78
+ | Command | Description | Example |
79
+ |---------|-------------|---------|
80
+ | `/model` or `/m` | List and switch models | `/model 3` or `/m opus` |
81
+ | `/yolo` | Toggle confirmation skipping | `/yolo` |
82
+ | `/undo` | Undo last file operation | `/undo` |
83
+ | `/clear` | Clear conversation history | `/clear` |
84
+ | `/branch <name>` | Create new git branch | `/branch feature/auth` |
85
+ | `/compact` | Summarize and trim history | `/compact` |
86
+ | `/help` | Show all commands | `/help` |
87
+ | `--update` | Update to latest version | `tunacode --update` |
88
+
89
+ ## 🔧 Configuration
90
+
91
+ Configuration is stored in `~/.config/tunacode.json`:
92
+
93
+ ```json
94
+ {
95
+ "default_model": "openai:gpt-4o",
96
+ "env": {
97
+ "OPENAI_API_KEY": "sk-...",
98
+ "ANTHROPIC_API_KEY": "sk-ant-...",
99
+ "OPENROUTER_API_KEY": "sk-or-..."
100
+ },
101
+ "mcpServers": {
102
+ "github": {
103
+ "command": "npx",
104
+ "args": ["-y", "@modelcontextprotocol/server-github"],
105
+ "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "..."}
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+ ### Using OpenRouter (100+ Models)
112
+
113
+ ```bash
114
+ # Add your OpenRouter API key to config
115
+ # Then run with OpenRouter base URL:
116
+ OPENAI_BASE_URL="https://openrouter.ai/api/v1" tunacode
117
+
118
+ # Use any OpenRouter model:
119
+ /model openrouter:anthropic/claude-3-opus
120
+ /model openrouter:mistralai/devstral-small
121
+ /model openrouter:openai/gpt-4.1
122
+ ```
123
+
124
+ ## 🛡️ Undo System
125
+
126
+ TunaCode provides **three layers of protection** for your files:
127
+
128
+ 1. **Git commits** - Primary undo mechanism (if available)
129
+ 2. **Operation log** - Tracks changes with content (<100KB files)
130
+ 3. **File backups** - Physical copies in `.tunacode/backups/`
131
+
132
+ All undo data is stored locally in your project:
133
+
134
+ ```
135
+ your-project/
136
+ └── .tunacode/ # Auto-created, gitignored
137
+ ├── backups/ # Timestamped file copies
138
+ ├── operations.jsonl # Change history
139
+ └── README.md # Explains the directory
140
+ ```
141
+
142
+ ## 🎯 Project Customization
143
+
144
+ Create a `TUNACODE.md` file in your project root:
145
+
146
+ ```markdown
147
+ # Project Guidelines for TunaCode
148
+
149
+ ## Tech Stack
150
+ - Next.js 14 with App Router
151
+ - TypeScript with strict mode
152
+ - Tailwind CSS for styling
153
+
154
+ ## Conventions
155
+ - Use arrow functions for components
156
+ - Prefer server components where possible
157
+ - Follow conventional commits
158
+
159
+ ## Commands
160
+ - `npm run dev` - Start development
161
+ - `npm test` - Run tests
162
+ ```
163
+
164
+ ## ⚡ Performance
165
+
166
+ TunaCode is optimized for speed:
167
+ - **Startup time**: ~0.5-0.8 seconds
168
+ - **Model switching**: ~100ms
169
+ - **File operations**: ~5ms overhead
170
+ - **API calls**: Connection pooling enabled
171
+
172
+ ## 🔧 Advanced Usage
173
+
174
+ ### Environment Variables
175
+ ```bash
176
+ # Use different base URLs
177
+ OPENAI_BASE_URL="https://openrouter.ai/api/v1" tunacode
178
+
179
+ # Disable undo system
180
+ TUNACODE_NO_UNDO=1 tunacode
181
+
182
+ # Set default model
183
+ TUNACODE_MODEL="anthropic:claude-3-opus" tunacode
184
+ ```
185
+
186
+ ### MCP Servers
187
+ Extend TunaCode with Model Context Protocol servers for web fetching, database access, and more. See [modelcontextprotocol.io](https://modelcontextprotocol.io/) for available servers.
188
+
189
+ ## 🤝 Contributing
190
+
191
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
192
+
193
+ ```bash
194
+ # Setup development environment
195
+ git clone https://github.com/larock22/tunacode
196
+ cd tunacode
197
+ pip install -e ".[dev]"
198
+
199
+ # Run tests
200
+ make test
201
+
202
+ # Lint code
203
+ make lint
204
+ ```
205
+
206
+ ## 📚 Documentation
207
+
208
+ - [Architecture Overview](docs/architecture.md)
209
+ - [API Integration](API_CALL_FLOW.md)
210
+ - [Undo System Design](UNDO_SYSTEM_DESIGN.md)
211
+ - [Performance Guide](PERFORMANCE_OPTIMIZATIONS.md)
212
+
213
+ ## 🙏 Acknowledgments
214
+
215
+ TunaCode is built on the foundation of [sidekick-cli](https://github.com/geekforbrains/sidekick-cli). Special thanks to:
216
+ - The sidekick-cli team for the original codebase
217
+ - [TinyAgent](https://github.com/alchemiststudiosDOTai/tinyAgent) for the robust agent framework
218
+ - The open-source community for feedback and contributions
219
+
220
+ ## 📄 License
221
+
222
+ MIT License - see [LICENSE](LICENSE) for details.
223
+
224
+ ---
225
+
226
+ **Note**: TunaCode is in active development. Please [report issues](https://github.com/larock22/tunacode/issues) or share feedback!
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tunacode-cli"
7
- version = "0.0.5"
7
+ version = "0.0.7"
8
8
  description = "Your agentic CLI developer."
9
9
  keywords = ["cli", "agent", "development", "automation"]
10
10
  readme = "README.md"
@@ -26,10 +26,11 @@ classifiers = [
26
26
  ]
27
27
  dependencies = [
28
28
  "prompt_toolkit==3.0.51",
29
- "pydantic-ai[logfire]==0.2.6",
29
+ "tiny_agent_os>=0.1.0",
30
30
  "pygments==2.19.1",
31
31
  "rich==14.0.0",
32
32
  "typer==0.15.3",
33
+ "pyyaml>=6.0",
33
34
  ]
34
35
 
35
36
  [project.scripts]