tunacode-cli 0.0.6__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 (80) hide show
  1. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/PKG-INFO +28 -1
  2. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/README.md +27 -0
  3. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/pyproject.toml +1 -1
  4. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/cli/main.py +6 -0
  5. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/agents/tinyagent_main.py +10 -8
  6. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/tools/tinyagent_tools.py +1 -1
  7. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/utils/system.py +40 -0
  8. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode_cli.egg-info/PKG-INFO +28 -1
  9. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode_cli.egg-info/SOURCES.txt +2 -1
  10. tunacode_cli-0.0.7/tests/test_import.py +7 -0
  11. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/LICENSE +0 -0
  12. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/setup.cfg +0 -0
  13. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/setup.py +0 -0
  14. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/__init__.py +0 -0
  15. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/cli/__init__.py +0 -0
  16. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/cli/commands.py +0 -0
  17. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/cli/model_selector.py +0 -0
  18. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/cli/repl.py +0 -0
  19. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/configuration/__init__.py +0 -0
  20. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/configuration/defaults.py +0 -0
  21. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/configuration/models.py +0 -0
  22. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/configuration/settings.py +0 -0
  23. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/constants.py +0 -0
  24. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/context.py +0 -0
  25. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/__init__.py +0 -0
  26. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/agents/__init__.py +0 -0
  27. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/agents/main.py +0 -0
  28. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/setup/__init__.py +0 -0
  29. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/setup/agent_setup.py +0 -0
  30. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/setup/base.py +0 -0
  31. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/setup/config_setup.py +0 -0
  32. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/setup/coordinator.py +0 -0
  33. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/setup/environment_setup.py +0 -0
  34. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/setup/git_safety_setup.py +0 -0
  35. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/setup/optimized_coordinator.py +0 -0
  36. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/setup/undo_setup.py +0 -0
  37. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/state.py +0 -0
  38. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/core/tool_handler.py +0 -0
  39. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/exceptions.py +0 -0
  40. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/prompts/system.txt +0 -0
  41. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/py.typed +0 -0
  42. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/services/__init__.py +0 -0
  43. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/services/enhanced_undo_service.py +0 -0
  44. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/services/mcp.py +0 -0
  45. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/services/project_undo_service.py +0 -0
  46. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/services/undo_service.py +0 -0
  47. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/setup.py +0 -0
  48. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/tools/__init__.py +0 -0
  49. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/tools/base.py +0 -0
  50. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/tools/read_file.py +0 -0
  51. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/tools/run_command.py +0 -0
  52. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/tools/update_file.py +0 -0
  53. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/tools/write_file.py +0 -0
  54. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/types.py +0 -0
  55. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/__init__.py +0 -0
  56. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/completers.py +0 -0
  57. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/console.py +0 -0
  58. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/constants.py +0 -0
  59. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/decorators.py +0 -0
  60. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/input.py +0 -0
  61. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/keybindings.py +0 -0
  62. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/lexers.py +0 -0
  63. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/output.py +0 -0
  64. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/panels.py +0 -0
  65. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/prompt_manager.py +0 -0
  66. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/tool_ui.py +0 -0
  67. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/ui/validators.py +0 -0
  68. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/utils/__init__.py +0 -0
  69. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/utils/bm25.py +0 -0
  70. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/utils/diff_utils.py +0 -0
  71. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/utils/file_utils.py +0 -0
  72. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/utils/lazy_imports.py +0 -0
  73. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/utils/regex_cache.py +0 -0
  74. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/utils/ripgrep.py +0 -0
  75. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/utils/text_utils.py +0 -0
  76. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode/utils/user_configuration.py +0 -0
  77. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode_cli.egg-info/dependency_links.txt +0 -0
  78. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode_cli.egg-info/entry_points.txt +0 -0
  79. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/src/tunacode_cli.egg-info/requires.txt +0 -0
  80. {tunacode_cli-0.0.6 → tunacode_cli-0.0.7}/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.6
3
+ Version: 0.0.7
4
4
  Summary: Your agentic CLI developer.
5
5
  Author-email: larock22 <noreply@github.com>
6
6
  License-Expression: MIT
@@ -71,16 +71,42 @@ Dynamic: license-file
71
71
 
72
72
  ## 🚀 Quick Start
73
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
+
74
88
  ```bash
75
89
  # Install from PyPI
76
90
  pip install tunacode-cli
77
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
78
101
  # Run setup (first time only)
79
102
  tunacode
80
103
 
81
104
  # Start coding!
82
105
  tunacode
83
106
  > Help me refactor this codebase to use async/await
107
+
108
+ # Update to latest version
109
+ tunacode --update
84
110
  ```
85
111
 
86
112
  ## 📋 Commands
@@ -94,6 +120,7 @@ tunacode
94
120
  | `/branch <name>` | Create new git branch | `/branch feature/auth` |
95
121
  | `/compact` | Summarize and trim history | `/compact` |
96
122
  | `/help` | Show all commands | `/help` |
123
+ | `--update` | Update to latest version | `tunacode --update` |
97
124
 
98
125
  ## 🔧 Configuration
99
126
 
@@ -35,16 +35,42 @@
35
35
 
36
36
  ## 🚀 Quick Start
37
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
+
38
52
  ```bash
39
53
  # Install from PyPI
40
54
  pip install tunacode-cli
41
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
42
65
  # Run setup (first time only)
43
66
  tunacode
44
67
 
45
68
  # Start coding!
46
69
  tunacode
47
70
  > Help me refactor this codebase to use async/await
71
+
72
+ # Update to latest version
73
+ tunacode --update
48
74
  ```
49
75
 
50
76
  ## 📋 Commands
@@ -58,6 +84,7 @@ tunacode
58
84
  | `/branch <name>` | Create new git branch | `/branch feature/auth` |
59
85
  | `/compact` | Summarize and trim history | `/compact` |
60
86
  | `/help` | Show all commands | `/help` |
87
+ | `--update` | Update to latest version | `tunacode --update` |
61
88
 
62
89
  ## 🔧 Configuration
63
90
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tunacode-cli"
7
- version = "0.0.6"
7
+ version = "0.0.7"
8
8
  description = "Your agentic CLI developer."
9
9
  keywords = ["cli", "agent", "development", "automation"]
10
10
  readme = "README.md"
@@ -25,10 +25,16 @@ state_manager = StateManager()
25
25
  def main(
26
26
  version: bool = typer.Option(False, "--version", "-v", help="Show version and exit."),
27
27
  run_setup: bool = typer.Option(False, "--setup", help="Run setup process."),
28
+ update: bool = typer.Option(False, "--update", "--upgrade", help="Update TunaCode to the latest version."),
28
29
  ):
29
30
  if version:
30
31
  asyncio.run(ui.version())
31
32
  return
33
+
34
+ if update:
35
+ from tunacode.utils.system import update_tunacode
36
+ asyncio.run(update_tunacode())
37
+ return
32
38
 
33
39
  asyncio.run(ui.banner())
34
40
 
@@ -4,7 +4,7 @@ from contextlib import asynccontextmanager
4
4
  from datetime import datetime, timezone
5
5
  from typing import Any, Dict, Optional
6
6
 
7
- from tinyagent.react.react_agent import ReactAgent
7
+ from tinyagent import ReactAgent
8
8
 
9
9
  from tunacode.core.state import StateManager
10
10
  from tunacode.tools.tinyagent_tools import read_file, run_command, update_file, write_file
@@ -58,12 +58,9 @@ def get_or_create_react_agent(model: ModelName, state_manager: StateManager) ->
58
58
  if state_manager.session.user_config["env"].get(key_name):
59
59
  os.environ[key_name] = state_manager.session.user_config["env"][key_name]
60
60
 
61
- # Create new ReactAgent with the actual model name
62
- agent = ReactAgent(model_override=actual_model)
63
-
64
- # Register our tools
65
- for fn in (read_file, write_file, update_file, run_command):
66
- agent.register_tool(fn._tool)
61
+ # Create new ReactAgent with tools
62
+ # Note: tinyAgent gets model from environment variables, not constructor
63
+ agent = ReactAgent(tools=[read_file, write_file, update_file, run_command])
67
64
 
68
65
  # Add MCP compatibility method
69
66
  @asynccontextmanager
@@ -106,7 +103,12 @@ async def process_request_with_tinyagent(
106
103
 
107
104
  try:
108
105
  # Run the agent with the message
109
- result = await agent.run_react(message)
106
+ # The new API's run() method might be synchronous based on the examples
107
+ import asyncio
108
+ if asyncio.iscoroutinefunction(agent.run):
109
+ result = await agent.run(message)
110
+ else:
111
+ result = agent.run(message)
110
112
 
111
113
  # Update message history in state_manager
112
114
  # This will need to be adapted based on how tinyAgent returns messages
@@ -2,7 +2,7 @@
2
2
 
3
3
  from typing import Optional
4
4
 
5
- from tinyagent.decorators import tool
5
+ from tinyagent import tool
6
6
 
7
7
  from tunacode.exceptions import ToolExecutionError
8
8
  from tunacode.ui import console as ui
@@ -277,6 +277,46 @@ def check_for_updates():
277
277
  return False, current_version
278
278
 
279
279
 
280
+ async def update_tunacode():
281
+ """
282
+ Update TunaCode to the latest version using pip.
283
+ """
284
+ from ..ui import console as ui
285
+
286
+ await ui.info("🔄 Checking for updates...")
287
+
288
+ has_update, latest_version = check_for_updates()
289
+
290
+ if not has_update:
291
+ await ui.success("✅ TunaCode is already up to date!")
292
+ return
293
+
294
+ app_settings = ApplicationSettings()
295
+ current_version = app_settings.version
296
+
297
+ await ui.info(f"📦 Updating from v{current_version} to v{latest_version}...")
298
+
299
+ try:
300
+ # Run pip install --upgrade tunacode-cli
301
+ result = subprocess.run(
302
+ ["pip", "install", "--upgrade", "tunacode-cli"],
303
+ capture_output=True,
304
+ text=True,
305
+ check=True
306
+ )
307
+
308
+ if result.returncode == 0:
309
+ await ui.success(f"🎉 Successfully updated to v{latest_version}!")
310
+ await ui.info("Please restart TunaCode to use the new version.")
311
+ else:
312
+ await ui.error(f"❌ Update failed: {result.stderr}")
313
+
314
+ except subprocess.CalledProcessError as e:
315
+ await ui.error(f"❌ Update failed: {e.stderr}")
316
+ except Exception as e:
317
+ await ui.error(f"❌ Update failed: {str(e)}")
318
+
319
+
280
320
  def list_cwd(max_depth=3):
281
321
  """
282
322
  Lists files in the current working directory up to a specified depth,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tunacode-cli
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: Your agentic CLI developer.
5
5
  Author-email: larock22 <noreply@github.com>
6
6
  License-Expression: MIT
@@ -71,16 +71,42 @@ Dynamic: license-file
71
71
 
72
72
  ## 🚀 Quick Start
73
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
+
74
88
  ```bash
75
89
  # Install from PyPI
76
90
  pip install tunacode-cli
77
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
78
101
  # Run setup (first time only)
79
102
  tunacode
80
103
 
81
104
  # Start coding!
82
105
  tunacode
83
106
  > Help me refactor this codebase to use async/await
107
+
108
+ # Update to latest version
109
+ tunacode --update
84
110
  ```
85
111
 
86
112
  ## 📋 Commands
@@ -94,6 +120,7 @@ tunacode
94
120
  | `/branch <name>` | Create new git branch | `/branch feature/auth` |
95
121
  | `/compact` | Summarize and trim history | `/compact` |
96
122
  | `/help` | Show all commands | `/help` |
123
+ | `--update` | Update to latest version | `tunacode --update` |
97
124
 
98
125
  ## 🔧 Configuration
99
126
 
@@ -74,4 +74,5 @@ src/tunacode_cli.egg-info/SOURCES.txt
74
74
  src/tunacode_cli.egg-info/dependency_links.txt
75
75
  src/tunacode_cli.egg-info/entry_points.txt
76
76
  src/tunacode_cli.egg-info/requires.txt
77
- src/tunacode_cli.egg-info/top_level.txt
77
+ src/tunacode_cli.egg-info/top_level.txt
78
+ tests/test_import.py
@@ -0,0 +1,7 @@
1
+ import os
2
+ import sys
3
+
4
+ sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src'))
5
+
6
+ def test_import_constants():
7
+ import tunacode.constants
File without changes
File without changes
File without changes