shotgun-sh 0.2.10.dev3__py3-none-any.whl → 0.2.10.dev5__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 shotgun-sh might be problematic. Click here for more details.

shotgun/cli/update.py CHANGED
@@ -45,7 +45,7 @@ def update(
45
45
 
46
46
  This command will:
47
47
  - Check PyPI for the latest version
48
- - Detect your installation method (pipx, pip, or venv)
48
+ - Detect your installation method (uvx, uv-tool, pipx, pip, or venv)
49
49
  - Perform the appropriate upgrade command
50
50
 
51
51
  Examples:
@@ -93,6 +93,8 @@ def update(
93
93
  )
94
94
  console.print(
95
95
  "Use --force to update anyway, or install the stable version with:\n"
96
+ " uv tool install shotgun-sh\n"
97
+ " or\n"
96
98
  " pipx install shotgun-sh\n"
97
99
  " or\n"
98
100
  " pip install shotgun-sh",
@@ -134,7 +136,19 @@ def update(
134
136
  console.print(f"\n[red]✗[/red] {message}", style="bold red")
135
137
 
136
138
  # Provide manual update instructions
137
- if method == "pipx":
139
+ if method == "uvx":
140
+ console.print(
141
+ "\n[yellow]Run uvx again to use the latest version:[/yellow]\n"
142
+ " uvx shotgun-sh\n"
143
+ "\n[yellow]Or install permanently:[/yellow]\n"
144
+ " uv tool install shotgun-sh"
145
+ )
146
+ elif method == "uv-tool":
147
+ console.print(
148
+ "\n[yellow]Try updating manually:[/yellow]\n"
149
+ " uv tool upgrade shotgun-sh"
150
+ )
151
+ elif method == "pipx":
138
152
  console.print(
139
153
  "\n[yellow]Try updating manually:[/yellow]\n"
140
154
  " pipx upgrade shotgun-sh"
@@ -18,8 +18,29 @@ def detect_installation_method() -> str:
18
18
  """Detect how shotgun-sh was installed.
19
19
 
20
20
  Returns:
21
- Installation method: 'pipx', 'pip', 'venv', or 'unknown'.
21
+ Installation method: 'uvx', 'uv-tool', 'pipx', 'pip', 'venv', or 'unknown'.
22
22
  """
23
+ # Check for uvx (ephemeral execution) by looking at executable path
24
+ # uvx runs from a temporary cache directory
25
+ executable = Path(sys.executable)
26
+ if ".cache/uv" in str(executable) or "uv/cache" in str(executable):
27
+ logger.debug("Detected uvx (ephemeral) execution")
28
+ return "uvx"
29
+
30
+ # Check for uv tool installation
31
+ try:
32
+ result = subprocess.run(
33
+ ["uv", "tool", "list"], # noqa: S607, S603
34
+ capture_output=True,
35
+ text=True,
36
+ timeout=5,
37
+ )
38
+ if result.returncode == 0 and "shotgun-sh" in result.stdout:
39
+ logger.debug("Detected uv tool installation")
40
+ return "uv-tool"
41
+ except (subprocess.SubprocessError, FileNotFoundError):
42
+ pass
43
+
23
44
  # Check for pipx installation
24
45
  try:
25
46
  result = subprocess.run(
@@ -59,7 +80,7 @@ def detect_installation_method() -> str:
59
80
 
60
81
 
61
82
  def perform_auto_update(no_update_check: bool = False) -> None:
62
- """Perform automatic update if installed via pipx.
83
+ """Perform automatic update if installed via pipx or uv tool.
63
84
 
64
85
  Args:
65
86
  no_update_check: If True, skip the update.
@@ -68,23 +89,40 @@ def perform_auto_update(no_update_check: bool = False) -> None:
68
89
  return
69
90
 
70
91
  try:
71
- # Only auto-update for pipx installations
72
- if detect_installation_method() != "pipx":
73
- logger.debug("Not a pipx installation, skipping auto-update")
92
+ method = detect_installation_method()
93
+
94
+ # Skip auto-update for ephemeral uvx executions
95
+ if method == "uvx":
96
+ logger.debug("uvx (ephemeral) execution, skipping auto-update")
74
97
  return
75
98
 
76
- # Run pipx upgrade quietly
77
- logger.debug("Running pipx upgrade shotgun-sh --quiet")
78
- result = subprocess.run(
79
- ["pipx", "upgrade", "shotgun-sh", "--quiet"], # noqa: S607, S603
99
+ # Only auto-update for pipx and uv-tool installations
100
+ if method not in ["pipx", "uv-tool"]:
101
+ logger.debug(f"Installation method '{method}', skipping auto-update")
102
+ return
103
+
104
+ # Determine the appropriate upgrade command
105
+ if method == "pipx":
106
+ command = ["pipx", "upgrade", "shotgun-sh", "--quiet"]
107
+ logger.debug("Running pipx upgrade shotgun-sh --quiet")
108
+ elif method == "uv-tool":
109
+ command = ["uv", "tool", "upgrade", "shotgun-sh"]
110
+ logger.debug("Running uv tool upgrade shotgun-sh")
111
+ else:
112
+ return
113
+
114
+ # Run upgrade command
115
+ result = subprocess.run( # noqa: S603, S607
116
+ command,
80
117
  capture_output=True,
81
118
  text=True,
82
119
  timeout=30,
83
120
  )
84
121
 
85
122
  if result.returncode == 0:
86
- # Check if there was an actual update (pipx shows output even with --quiet for actual updates)
87
- if result.stdout and "upgraded" in result.stdout.lower():
123
+ # Check if there was an actual update
124
+ output = result.stdout.lower()
125
+ if "upgraded" in output or "updated" in output:
88
126
  logger.info("Shotgun-sh has been updated to the latest version")
89
127
  else:
90
128
  # Only log errors at debug level to not annoy users
@@ -166,16 +204,18 @@ def compare_versions(current: str, latest: str) -> bool:
166
204
  return False
167
205
 
168
206
 
169
- def get_update_command(method: str) -> list[str]:
207
+ def get_update_command(method: str) -> list[str] | None:
170
208
  """Get the appropriate update command based on installation method.
171
209
 
172
210
  Args:
173
- method: Installation method ('pipx', 'pip', 'venv', or 'unknown').
211
+ method: Installation method ('uvx', 'uv-tool', 'pipx', 'pip', 'venv', or 'unknown').
174
212
 
175
213
  Returns:
176
- Command list to execute for updating.
214
+ Command list to execute for updating, or None for uvx (ephemeral).
177
215
  """
178
216
  commands = {
217
+ "uvx": None, # uvx is ephemeral, no update command
218
+ "uv-tool": ["uv", "tool", "upgrade", "shotgun-sh"],
179
219
  "pipx": ["pipx", "upgrade", "shotgun-sh"],
180
220
  "pip": [sys.executable, "-m", "pip", "install", "--upgrade", "shotgun-sh"],
181
221
  "venv": [sys.executable, "-m", "pip", "install", "--upgrade", "shotgun-sh"],
@@ -210,6 +250,15 @@ def perform_update(force: bool = False) -> tuple[bool, str]:
210
250
  method = detect_installation_method()
211
251
  command = get_update_command(method)
212
252
 
253
+ # Handle uvx (ephemeral) installations
254
+ if method == "uvx" or command is None:
255
+ return (
256
+ False,
257
+ "You're running shotgun-sh via uvx (ephemeral mode). "
258
+ "To get the latest version, simply run 'uvx shotgun-sh' again, "
259
+ "or install permanently with 'uv tool install shotgun-sh'.",
260
+ )
261
+
213
262
  # Perform update
214
263
  try:
215
264
  logger.info(f"Updating shotgun-sh using {method}...")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shotgun-sh
3
- Version: 0.2.10.dev3
3
+ Version: 0.2.10.dev5
4
4
  Summary: AI-powered research, planning, and task management CLI tool
5
5
  Project-URL: Homepage, https://shotgun.sh/
6
6
  Project-URL: Repository, https://github.com/shotgun-sh/shotgun
@@ -84,13 +84,30 @@ Every research finding, every architectural decision, every "here's why we didn'
84
84
 
85
85
  ## Installation
86
86
 
87
- ### Using pipx (Recommended)
87
+ ### Using uvx (Recommended)
88
+
89
+ **Quick start (ephemeral):**
90
+ ```bash
91
+ uvx shotgun-sh
92
+ ```
93
+
94
+ **Install permanently:**
95
+ ```bash
96
+ uv tool install shotgun-sh
97
+ ```
98
+
99
+ **Why uvx?** It's 10-100x faster than pipx and handles binary wheels more reliably. If you don't have `uv` installed, get it at [astral.sh/uv](https://astral.sh/uv) or `curl -LsSf https://astral.sh/uv/install.sh | sh`
100
+
101
+ ### Using pipx
88
102
 
89
103
  ```bash
90
104
  pipx install shotgun-sh
91
105
  ```
92
106
 
93
- **Why pipx?** It installs Shotgun in an isolated environment, preventing dependency conflicts with your other Python projects.
107
+ If you encounter build errors with kuzu on macOS:
108
+ ```bash
109
+ pipx install --pip-args="--only-binary kuzu" shotgun-sh
110
+ ```
94
111
 
95
112
  ### Using pip
96
113
 
@@ -64,7 +64,7 @@ shotgun/cli/plan.py,sha256=T-eu-I9z-dSoKqJ-KI8X5i5Mm0VL1BfornxRiUjTgnk,2324
64
64
  shotgun/cli/research.py,sha256=qvBBtX3Wyn6pDZlJpcEvbeK-0iTOXegi71tm8HKVYaE,2490
65
65
  shotgun/cli/specify.py,sha256=ErRQ72Zc75fmxopZbKy0vvnLPuYBLsGynpjj1X6-BwI,2166
66
66
  shotgun/cli/tasks.py,sha256=17qWoGCVYpNIxa2vaoIH1P-xz2RcGLaK8SF4JlPsOWI,2420
67
- shotgun/cli/update.py,sha256=Dn_No7jPmdZ-7qYlhzI0BtmlufetVdw1BN-xRi_UE5A,4718
67
+ shotgun/cli/update.py,sha256=sc3uuw3AXFF0kpskWah1JEoTwrKv67fCnqp9BjeND3o,5328
68
68
  shotgun/cli/utils.py,sha256=umVWXDx8pelovMk-nT8B7m0c39AKY9hHsuAMnbw_Hcg,732
69
69
  shotgun/cli/codebase/__init__.py,sha256=rKdvx33p0i_BYbNkz5_4DCFgEMwzOOqLi9f5p7XTLKM,73
70
70
  shotgun/cli/codebase/commands.py,sha256=1N2yOGmok0ZarqXPIpWGcsQrwm_ZJcyWiMxy6tm0j70,8711
@@ -147,9 +147,9 @@ shotgun/utils/datetime_utils.py,sha256=x_uYmG1n9rkhSO2oR2uV9ttiuPL0nKa9os8YYaPfd
147
147
  shotgun/utils/env_utils.py,sha256=ulM3BRi9ZhS7uC-zorGeDQm4SHvsyFuuU9BtVPqdrHY,1418
148
148
  shotgun/utils/file_system_utils.py,sha256=l-0p1bEHF34OU19MahnRFdClHufThfGAjQ431teAIp0,1004
149
149
  shotgun/utils/source_detection.py,sha256=Co6Q03R3fT771TF3RzB-70stfjNP2S4F_ArZKibwzm8,454
150
- shotgun/utils/update_checker.py,sha256=IgzPHRhS1ETH7PnJR_dIx6lxgr1qHpCkMTgzUxvGjhI,7586
151
- shotgun_sh-0.2.10.dev3.dist-info/METADATA,sha256=3SV48d2PulzqbFQlQqjhMe6zOcAMQxyW31MkgKgACeo,4336
152
- shotgun_sh-0.2.10.dev3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
153
- shotgun_sh-0.2.10.dev3.dist-info/entry_points.txt,sha256=asZxLU4QILneq0MWW10saVCZc4VWhZfb0wFZvERnzfA,45
154
- shotgun_sh-0.2.10.dev3.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
155
- shotgun_sh-0.2.10.dev3.dist-info/RECORD,,
150
+ shotgun/utils/update_checker.py,sha256=CAEnZ7_ZOazf_7tfyCAGGf4cW6N2dmwZekLNynHsg2c,9425
151
+ shotgun_sh-0.2.10.dev5.dist-info/METADATA,sha256=Mg-pqL6LylquimQmVVIL20lIcnMn7yMeT27Be2kKgcE,4683
152
+ shotgun_sh-0.2.10.dev5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
153
+ shotgun_sh-0.2.10.dev5.dist-info/entry_points.txt,sha256=asZxLU4QILneq0MWW10saVCZc4VWhZfb0wFZvERnzfA,45
154
+ shotgun_sh-0.2.10.dev5.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
155
+ shotgun_sh-0.2.10.dev5.dist-info/RECORD,,