tunacode-cli 0.0.11__tar.gz → 0.0.13__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.
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/PKG-INFO +94 -40
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/README.md +91 -38
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/pyproject.toml +4 -3
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/cli/commands.py +3 -4
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/cli/main.py +5 -4
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/cli/repl.py +2 -13
- tunacode_cli-0.0.13/src/tunacode/cli/textual_app.py +423 -0
- tunacode_cli-0.0.13/src/tunacode/cli/textual_bridge.py +158 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/configuration/defaults.py +3 -4
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/configuration/models.py +3 -3
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/configuration/settings.py +2 -2
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/constants.py +2 -10
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/agents/main.py +5 -3
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/setup/__init__.py +0 -2
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/setup/agent_setup.py +3 -3
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/setup/base.py +3 -3
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/setup/coordinator.py +2 -2
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/setup/environment_setup.py +2 -2
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/setup/git_safety_setup.py +1 -2
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/state.py +3 -3
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/setup.py +2 -3
- tunacode_cli-0.0.13/src/tunacode/tools/__init__.py +1 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/tools/base.py +4 -43
- tunacode_cli-0.0.13/src/tunacode/tools/bash.py +252 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/tools/read_file.py +2 -2
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/tools/run_command.py +2 -2
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/tools/update_file.py +3 -3
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/tools/write_file.py +3 -3
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/completers.py +1 -1
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/console.py +2 -3
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/constants.py +1 -1
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/decorators.py +2 -2
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/input.py +1 -1
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/keybindings.py +1 -1
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/output.py +11 -4
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/panels.py +3 -4
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/prompt_manager.py +1 -1
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/validators.py +1 -1
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/utils/diff_utils.py +3 -3
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode_cli.egg-info/PKG-INFO +94 -40
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode_cli.egg-info/SOURCES.txt +3 -2
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode_cli.egg-info/requires.txt +2 -1
- tunacode_cli-0.0.11/src/tunacode/core/setup/undo_setup.py +0 -33
- tunacode_cli-0.0.11/src/tunacode/services/undo_service.py +0 -244
- tunacode_cli-0.0.11/src/tunacode/utils/__init__.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/LICENSE +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/setup.cfg +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/setup.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/__init__.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/cli/__init__.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/configuration/__init__.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/context.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/__init__.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/agents/__init__.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/setup/config_setup.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/core/tool_handler.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/exceptions.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/prompts/system.txt +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/py.typed +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/services/__init__.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/services/mcp.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/types.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/__init__.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/lexers.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/ui/tool_ui.py +0 -0
- {tunacode_cli-0.0.11/src/tunacode/tools → tunacode_cli-0.0.13/src/tunacode/utils}/__init__.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/utils/bm25.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/utils/file_utils.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/utils/ripgrep.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/utils/system.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/utils/text_utils.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode/utils/user_configuration.py +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode_cli.egg-info/dependency_links.txt +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode_cli.egg-info/entry_points.txt +0 -0
- {tunacode_cli-0.0.11 → tunacode_cli-0.0.13}/src/tunacode_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tunacode-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.13
|
|
4
4
|
Summary: Your agentic CLI developer.
|
|
5
5
|
Author-email: larock22 <noreply@github.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,11 +19,11 @@ Classifier: Topic :: Utilities
|
|
|
19
19
|
Requires-Python: >=3.10
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
License-File: LICENSE
|
|
22
|
+
Requires-Dist: typer==0.15.3
|
|
22
23
|
Requires-Dist: prompt_toolkit==3.0.51
|
|
23
24
|
Requires-Dist: pydantic-ai[logfire]==0.2.6
|
|
24
25
|
Requires-Dist: pygments==2.19.1
|
|
25
26
|
Requires-Dist: rich==14.0.0
|
|
26
|
-
Requires-Dist: typer==0.15.3
|
|
27
27
|
Provides-Extra: dev
|
|
28
28
|
Requires-Dist: build; extra == "dev"
|
|
29
29
|
Requires-Dist: black; extra == "dev"
|
|
@@ -31,6 +31,7 @@ Requires-Dist: flake8; extra == "dev"
|
|
|
31
31
|
Requires-Dist: isort; extra == "dev"
|
|
32
32
|
Requires-Dist: pytest; extra == "dev"
|
|
33
33
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
34
|
+
Requires-Dist: textual-dev; extra == "dev"
|
|
34
35
|
Dynamic: license-file
|
|
35
36
|
|
|
36
37
|
# TunaCode
|
|
@@ -306,6 +307,97 @@ Create a `TUNACODE.md` file your project root to customize TunaCode's behavior:
|
|
|
306
307
|
|
|
307
308
|
---
|
|
308
309
|
|
|
310
|
+
## Source Code Architecture
|
|
311
|
+
|
|
312
|
+
### Directory Structure
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
src/tunacode/
|
|
316
|
+
├── cli/ # Command Line Interface
|
|
317
|
+
│ ├── commands.py # Command registry and implementations
|
|
318
|
+
│ ├── main.py # Entry point and CLI setup (Typer)
|
|
319
|
+
│ └── repl.py # Interactive REPL loop
|
|
320
|
+
│
|
|
321
|
+
├── configuration/ # Configuration Management
|
|
322
|
+
│ ├── defaults.py # Default configuration values
|
|
323
|
+
│ ├── models.py # Configuration data models
|
|
324
|
+
│ └── settings.py # Settings loader and validator
|
|
325
|
+
│
|
|
326
|
+
├── core/ # Core Application Logic
|
|
327
|
+
│ ├── agents/ # AI Agent System
|
|
328
|
+
│ │ └── main.py # Primary agent implementation (pydantic-ai)
|
|
329
|
+
│ ├── setup/ # Application Setup & Initialization
|
|
330
|
+
│ │ ├── agent_setup.py # Agent configuration
|
|
331
|
+
│ │ ├── base.py # Setup step base class
|
|
332
|
+
│ │ ├── config_setup.py # Configuration setup
|
|
333
|
+
│ │ ├── coordinator.py # Setup orchestration
|
|
334
|
+
│ │ ├── environment_setup.py # Environment validation
|
|
335
|
+
│ │ └── git_safety_setup.py # Git safety checks
|
|
336
|
+
│ ├── state.py # Application state management
|
|
337
|
+
│ └── tool_handler.py # Tool execution and validation
|
|
338
|
+
│
|
|
339
|
+
├── services/ # External Services
|
|
340
|
+
│ ├── mcp.py # Model Context Protocol integration
|
|
341
|
+
│ └── undo_service.py # Undo operations (beta)
|
|
342
|
+
│
|
|
343
|
+
├── tools/ # AI Agent Tools
|
|
344
|
+
│ ├── base.py # Tool base classes
|
|
345
|
+
│ ├── read_file.py # File reading tool
|
|
346
|
+
│ ├── run_command.py # Command execution tool
|
|
347
|
+
│ ├── update_file.py # File modification tool
|
|
348
|
+
│ └── write_file.py # File creation tool
|
|
349
|
+
│
|
|
350
|
+
├── ui/ # User Interface Components
|
|
351
|
+
│ ├── completers.py # Tab completion
|
|
352
|
+
│ ├── console.py # Rich console setup
|
|
353
|
+
│ ├── input.py # Input handling
|
|
354
|
+
│ ├── keybindings.py # Keyboard shortcuts
|
|
355
|
+
│ ├── lexers.py # Syntax highlighting
|
|
356
|
+
│ ├── output.py # Output formatting and banner
|
|
357
|
+
│ ├── panels.py # UI panels and layouts
|
|
358
|
+
│ ├── prompt_manager.py # Prompt toolkit integration
|
|
359
|
+
│ ├── tool_ui.py # Tool confirmation dialogs
|
|
360
|
+
│ └── validators.py # Input validation
|
|
361
|
+
│
|
|
362
|
+
├── utils/ # Utility Functions
|
|
363
|
+
│ ├── bm25.py # BM25 search algorithm(beta)
|
|
364
|
+
│ ├── diff_utils.py # Diff generation and formatting
|
|
365
|
+
│ ├── file_utils.py # File system operations
|
|
366
|
+
│ ├── ripgrep.py # Code search utilities
|
|
367
|
+
│ ├── system.py # System information
|
|
368
|
+
│ ├── text_utils.py # Text processing
|
|
369
|
+
│ └── user_configuration.py # User config management
|
|
370
|
+
│
|
|
371
|
+
├── constants.py # Application constants
|
|
372
|
+
├── context.py # Context management
|
|
373
|
+
├── exceptions.py # Custom exceptions
|
|
374
|
+
├── types.py # Type definitions
|
|
375
|
+
└── prompts/
|
|
376
|
+
└── system.txt # System prompts for AI agent
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### Key Components
|
|
380
|
+
|
|
381
|
+
| Component | Purpose | Key Files |
|
|
382
|
+
| -------------------- | ------------------------ | ------------------------------- |
|
|
383
|
+
| **CLI Layer** | Command parsing and REPL | `cli/main.py`, `cli/repl.py` |
|
|
384
|
+
| **Agent System** | AI-powered assistance | `core/agents/main.py` |
|
|
385
|
+
| **Tool System** | File/command operations | `tools/*.py` |
|
|
386
|
+
| **State Management** | Session state tracking | `core/state.py` |
|
|
387
|
+
| **UI Framework** | Rich terminal interface | `ui/output.py`, `ui/console.py` |
|
|
388
|
+
| **Configuration** | User settings & models | `configuration/*.py` |
|
|
389
|
+
| **Setup System** | Initial configuration | `core/setup/*.py` |
|
|
390
|
+
|
|
391
|
+
### Data Flow
|
|
392
|
+
|
|
393
|
+
```
|
|
394
|
+
CLI Input → Command Registry → REPL → Agent → Tools → UI Output
|
|
395
|
+
↓ ↓ ↓ ↓ ↓ ↑
|
|
396
|
+
State Manager ←────────────────────────────────────────┘
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
309
401
|
## Development
|
|
310
402
|
|
|
311
403
|
### Requirements
|
|
@@ -326,44 +418,6 @@ make lint
|
|
|
326
418
|
make test
|
|
327
419
|
```
|
|
328
420
|
|
|
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
421
|
---
|
|
368
422
|
|
|
369
423
|
## Links
|
|
@@ -271,6 +271,97 @@ Create a `TUNACODE.md` file your project root to customize TunaCode's behavior:
|
|
|
271
271
|
|
|
272
272
|
---
|
|
273
273
|
|
|
274
|
+
## Source Code Architecture
|
|
275
|
+
|
|
276
|
+
### Directory Structure
|
|
277
|
+
|
|
278
|
+
```
|
|
279
|
+
src/tunacode/
|
|
280
|
+
├── cli/ # Command Line Interface
|
|
281
|
+
│ ├── commands.py # Command registry and implementations
|
|
282
|
+
│ ├── main.py # Entry point and CLI setup (Typer)
|
|
283
|
+
│ └── repl.py # Interactive REPL loop
|
|
284
|
+
│
|
|
285
|
+
├── configuration/ # Configuration Management
|
|
286
|
+
│ ├── defaults.py # Default configuration values
|
|
287
|
+
│ ├── models.py # Configuration data models
|
|
288
|
+
│ └── settings.py # Settings loader and validator
|
|
289
|
+
│
|
|
290
|
+
├── core/ # Core Application Logic
|
|
291
|
+
│ ├── agents/ # AI Agent System
|
|
292
|
+
│ │ └── main.py # Primary agent implementation (pydantic-ai)
|
|
293
|
+
│ ├── setup/ # Application Setup & Initialization
|
|
294
|
+
│ │ ├── agent_setup.py # Agent configuration
|
|
295
|
+
│ │ ├── base.py # Setup step base class
|
|
296
|
+
│ │ ├── config_setup.py # Configuration setup
|
|
297
|
+
│ │ ├── coordinator.py # Setup orchestration
|
|
298
|
+
│ │ ├── environment_setup.py # Environment validation
|
|
299
|
+
│ │ └── git_safety_setup.py # Git safety checks
|
|
300
|
+
│ ├── state.py # Application state management
|
|
301
|
+
│ └── tool_handler.py # Tool execution and validation
|
|
302
|
+
│
|
|
303
|
+
├── services/ # External Services
|
|
304
|
+
│ ├── mcp.py # Model Context Protocol integration
|
|
305
|
+
│ └── undo_service.py # Undo operations (beta)
|
|
306
|
+
│
|
|
307
|
+
├── tools/ # AI Agent Tools
|
|
308
|
+
│ ├── base.py # Tool base classes
|
|
309
|
+
│ ├── read_file.py # File reading tool
|
|
310
|
+
│ ├── run_command.py # Command execution tool
|
|
311
|
+
│ ├── update_file.py # File modification tool
|
|
312
|
+
│ └── write_file.py # File creation tool
|
|
313
|
+
│
|
|
314
|
+
├── ui/ # User Interface Components
|
|
315
|
+
│ ├── completers.py # Tab completion
|
|
316
|
+
│ ├── console.py # Rich console setup
|
|
317
|
+
│ ├── input.py # Input handling
|
|
318
|
+
│ ├── keybindings.py # Keyboard shortcuts
|
|
319
|
+
│ ├── lexers.py # Syntax highlighting
|
|
320
|
+
│ ├── output.py # Output formatting and banner
|
|
321
|
+
│ ├── panels.py # UI panels and layouts
|
|
322
|
+
│ ├── prompt_manager.py # Prompt toolkit integration
|
|
323
|
+
│ ├── tool_ui.py # Tool confirmation dialogs
|
|
324
|
+
│ └── validators.py # Input validation
|
|
325
|
+
│
|
|
326
|
+
├── utils/ # Utility Functions
|
|
327
|
+
│ ├── bm25.py # BM25 search algorithm(beta)
|
|
328
|
+
│ ├── diff_utils.py # Diff generation and formatting
|
|
329
|
+
│ ├── file_utils.py # File system operations
|
|
330
|
+
│ ├── ripgrep.py # Code search utilities
|
|
331
|
+
│ ├── system.py # System information
|
|
332
|
+
│ ├── text_utils.py # Text processing
|
|
333
|
+
│ └── user_configuration.py # User config management
|
|
334
|
+
│
|
|
335
|
+
├── constants.py # Application constants
|
|
336
|
+
├── context.py # Context management
|
|
337
|
+
├── exceptions.py # Custom exceptions
|
|
338
|
+
├── types.py # Type definitions
|
|
339
|
+
└── prompts/
|
|
340
|
+
└── system.txt # System prompts for AI agent
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Key Components
|
|
344
|
+
|
|
345
|
+
| Component | Purpose | Key Files |
|
|
346
|
+
| -------------------- | ------------------------ | ------------------------------- |
|
|
347
|
+
| **CLI Layer** | Command parsing and REPL | `cli/main.py`, `cli/repl.py` |
|
|
348
|
+
| **Agent System** | AI-powered assistance | `core/agents/main.py` |
|
|
349
|
+
| **Tool System** | File/command operations | `tools/*.py` |
|
|
350
|
+
| **State Management** | Session state tracking | `core/state.py` |
|
|
351
|
+
| **UI Framework** | Rich terminal interface | `ui/output.py`, `ui/console.py` |
|
|
352
|
+
| **Configuration** | User settings & models | `configuration/*.py` |
|
|
353
|
+
| **Setup System** | Initial configuration | `core/setup/*.py` |
|
|
354
|
+
|
|
355
|
+
### Data Flow
|
|
356
|
+
|
|
357
|
+
```
|
|
358
|
+
CLI Input → Command Registry → REPL → Agent → Tools → UI Output
|
|
359
|
+
↓ ↓ ↓ ↓ ↓ ↑
|
|
360
|
+
State Manager ←────────────────────────────────────────┘
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
274
365
|
## Development
|
|
275
366
|
|
|
276
367
|
### Requirements
|
|
@@ -291,44 +382,6 @@ make lint
|
|
|
291
382
|
make test
|
|
292
383
|
```
|
|
293
384
|
|
|
294
|
-
### Release Process
|
|
295
|
-
|
|
296
|
-
<details>
|
|
297
|
-
<summary><b>Click to expand release steps</b></summary>
|
|
298
|
-
|
|
299
|
-
1. **Update versions:**
|
|
300
|
-
|
|
301
|
-
- `pyproject.toml`
|
|
302
|
-
- `src/tunacode/constants.py` (APP_VERSION)
|
|
303
|
-
|
|
304
|
-
2. **Commit and tag:**
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
git add pyproject.toml src/tunacode/constants.py
|
|
308
|
-
git commit -m "chore: bump version to X.Y.Z"
|
|
309
|
-
git tag vX.Y.Z
|
|
310
|
-
git push origin vX.Y.Z
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
3. **Create release:**
|
|
314
|
-
```bash
|
|
315
|
-
gh release create vX.Y.Z --title "vX.Y.Z" --notes "Release notes"
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
</details>
|
|
319
|
-
|
|
320
|
-
### Commit Convention
|
|
321
|
-
|
|
322
|
-
Following [Conventional Commits](https://www.conventionalcommits.org/):
|
|
323
|
-
|
|
324
|
-
- `feat:` New features
|
|
325
|
-
- `fix:` Bug fixes
|
|
326
|
-
- `docs:` Documentation
|
|
327
|
-
- `style:` Code formatting
|
|
328
|
-
- `refactor:` Code refactoring
|
|
329
|
-
- `test:` Tests
|
|
330
|
-
- `chore:` Maintenance
|
|
331
|
-
|
|
332
385
|
---
|
|
333
386
|
|
|
334
387
|
## Links
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tunacode-cli"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.13"
|
|
8
8
|
description = "Your agentic CLI developer."
|
|
9
9
|
keywords = ["cli", "agent", "development", "automation"]
|
|
10
10
|
readme = "README.md"
|
|
@@ -25,11 +25,11 @@ classifiers = [
|
|
|
25
25
|
"Topic :: Utilities",
|
|
26
26
|
]
|
|
27
27
|
dependencies = [
|
|
28
|
+
"typer==0.15.3",
|
|
28
29
|
"prompt_toolkit==3.0.51",
|
|
29
30
|
"pydantic-ai[logfire]==0.2.6",
|
|
30
31
|
"pygments==2.19.1",
|
|
31
32
|
"rich==14.0.0",
|
|
32
|
-
"typer==0.15.3",
|
|
33
33
|
]
|
|
34
34
|
|
|
35
35
|
[project.scripts]
|
|
@@ -38,11 +38,12 @@ tunacode = "tunacode.cli.main:app"
|
|
|
38
38
|
[project.optional-dependencies]
|
|
39
39
|
dev = [
|
|
40
40
|
"build",
|
|
41
|
-
"black",
|
|
41
|
+
"black",
|
|
42
42
|
"flake8",
|
|
43
43
|
"isort",
|
|
44
44
|
"pytest",
|
|
45
45
|
"pytest-cov",
|
|
46
|
+
"textual-dev",
|
|
46
47
|
]
|
|
47
48
|
|
|
48
49
|
[project.urls]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Command system for
|
|
1
|
+
"""Command system for TunaCode CLI."""
|
|
2
2
|
|
|
3
3
|
from abc import ABC, abstractmethod
|
|
4
4
|
from dataclasses import dataclass
|
|
@@ -248,14 +248,13 @@ class BranchCommand(SimpleCommand):
|
|
|
248
248
|
|
|
249
249
|
async def execute(self, args: List[str], context: CommandContext) -> None:
|
|
250
250
|
import subprocess
|
|
251
|
-
|
|
252
|
-
from ..services.undo_service import is_in_git_project
|
|
251
|
+
import os
|
|
253
252
|
|
|
254
253
|
if not args:
|
|
255
254
|
await ui.error("Usage: /branch <branch-name>")
|
|
256
255
|
return
|
|
257
256
|
|
|
258
|
-
if not
|
|
257
|
+
if not os.path.exists(".git"):
|
|
259
258
|
await ui.error("Not a git repository")
|
|
260
259
|
return
|
|
261
260
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"""
|
|
2
|
-
Module:
|
|
2
|
+
Module: tunacode.cli.main
|
|
3
3
|
|
|
4
|
-
CLI entry point
|
|
5
|
-
Manages application startup, version checking, and REPL initialization.
|
|
4
|
+
Enhanced CLI entry point with better styling while staying CLI-based.
|
|
6
5
|
"""
|
|
7
6
|
|
|
8
7
|
import asyncio
|
|
@@ -17,7 +16,7 @@ from tunacode.ui import console as ui
|
|
|
17
16
|
from tunacode.utils.system import check_for_updates
|
|
18
17
|
|
|
19
18
|
app_settings = ApplicationSettings()
|
|
20
|
-
app = typer.Typer(help=
|
|
19
|
+
app = typer.Typer(help="🐟 TunaCode - Your AI-powered development assistant")
|
|
21
20
|
state_manager = StateManager()
|
|
22
21
|
|
|
23
22
|
|
|
@@ -29,6 +28,8 @@ def main(
|
|
|
29
28
|
model: str = typer.Option(None, "--model", help="Default model to use (e.g., openai/gpt-4)"),
|
|
30
29
|
key: str = typer.Option(None, "--key", help="API key for the provider"),
|
|
31
30
|
):
|
|
31
|
+
"""🚀 Start TunaCode - Your AI-powered development assistant"""
|
|
32
|
+
|
|
32
33
|
if version:
|
|
33
34
|
asyncio.run(ui.version())
|
|
34
35
|
return
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""
|
|
2
|
-
Module:
|
|
2
|
+
Module: tunacode.cli.repl
|
|
3
3
|
|
|
4
|
-
Interactive REPL (Read-Eval-Print Loop) implementation for
|
|
4
|
+
Interactive REPL (Read-Eval-Print Loop) implementation for TunaCode.
|
|
5
5
|
Handles user input, command processing, and agent interaction in an interactive shell.
|
|
6
6
|
"""
|
|
7
7
|
|
|
@@ -207,18 +207,7 @@ async def repl(state_manager: StateManager):
|
|
|
207
207
|
action = None
|
|
208
208
|
|
|
209
209
|
# Professional startup information
|
|
210
|
-
await ui.info("TunaCode v0.1 - Beta Release")
|
|
211
|
-
await ui.muted("• Caution: This tool can modify your codebase")
|
|
212
210
|
await ui.muted(f"• Model: {state_manager.session.current_model}")
|
|
213
|
-
await ui.line()
|
|
214
|
-
|
|
215
|
-
# Important safety warning
|
|
216
|
-
await ui.warning("⚠️ IMPORTANT: The /undo command has been removed for safety reasons")
|
|
217
|
-
await ui.muted("• Always use git branches before making major changes")
|
|
218
|
-
await ui.muted("• Use '/branch <name>' to create a new branch for experiments")
|
|
219
|
-
await ui.muted("• Commit your work frequently to preserve changes")
|
|
220
|
-
await ui.line()
|
|
221
|
-
|
|
222
211
|
await ui.success("Ready to assist with your development")
|
|
223
212
|
await ui.line()
|
|
224
213
|
|