code-aide 1.15.3__tar.gz → 1.15.5__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.
Files changed (61) hide show
  1. {code_aide-1.15.3 → code_aide-1.15.5}/PKG-INFO +1 -1
  2. {code_aide-1.15.3 → code_aide-1.15.5}/script-archive/amp-install.sh +38 -6
  3. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/__init__.py +1 -1
  4. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/data/tools.json +2 -2
  5. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/versions.py +8 -3
  6. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_versions.py +19 -0
  7. {code_aide-1.15.3 → code_aide-1.15.5}/.github/workflows/ci.yml +0 -0
  8. {code_aide-1.15.3 → code_aide-1.15.5}/.github/workflows/publish.yml +0 -0
  9. {code_aide-1.15.3 → code_aide-1.15.5}/.gitignore +0 -0
  10. {code_aide-1.15.3 → code_aide-1.15.5}/.gitlab-ci.yml +0 -0
  11. {code_aide-1.15.3 → code_aide-1.15.5}/.pre-commit-config.yaml +0 -0
  12. {code_aide-1.15.3 → code_aide-1.15.5}/AGENTS.md +0 -0
  13. {code_aide-1.15.3 → code_aide-1.15.5}/CLAUDE.md +0 -0
  14. {code_aide-1.15.3 → code_aide-1.15.5}/LICENSE +0 -0
  15. {code_aide-1.15.3 → code_aide-1.15.5}/README.md +0 -0
  16. {code_aide-1.15.3 → code_aide-1.15.5}/TODO.md +0 -0
  17. {code_aide-1.15.3 → code_aide-1.15.5}/pyproject.toml +0 -0
  18. {code_aide-1.15.3 → code_aide-1.15.5}/script-archive/README.md +0 -0
  19. {code_aide-1.15.3 → code_aide-1.15.5}/script-archive/claude-install.sh +0 -0
  20. {code_aide-1.15.3 → code_aide-1.15.5}/script-archive/cursor-install.sh +0 -0
  21. {code_aide-1.15.3 → code_aide-1.15.5}/specs/2026-05-03-qwen3.6-code-quality-analysis-original.md +0 -0
  22. {code_aide-1.15.3 → code_aide-1.15.5}/specs/2026-05-03-qwen3.6-code-quality-analysis.md +0 -0
  23. {code_aide-1.15.3 → code_aide-1.15.5}/specs/auto-migrate-deprecated-installs.md +0 -0
  24. {code_aide-1.15.3 → code_aide-1.15.5}/specs/claude-native-installer-migration.md +0 -0
  25. {code_aide-1.15.3 → code_aide-1.15.5}/specs/missing-coding-llm-cli-tools.md +0 -0
  26. {code_aide-1.15.3 → code_aide-1.15.5}/specs/pre-commit-uv-setup.md +0 -0
  27. {code_aide-1.15.3 → code_aide-1.15.5}/specs/remove-bundled-version-baseline.md +0 -0
  28. {code_aide-1.15.3 → code_aide-1.15.5}/specs/unify-upgrade-eligibility-with-shared-evaluator.md +0 -0
  29. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/__main__.py +0 -0
  30. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/commands_actions.py +0 -0
  31. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/commands_tools.py +0 -0
  32. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/config.py +0 -0
  33. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/console.py +0 -0
  34. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/constants.py +0 -0
  35. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/detection.py +0 -0
  36. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/detection_types.py +0 -0
  37. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/entry.py +0 -0
  38. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/install.py +0 -0
  39. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/install_types.py +0 -0
  40. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/operation_handlers.py +0 -0
  41. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/operations.py +0 -0
  42. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/package_info.py +0 -0
  43. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/package_managers.py +0 -0
  44. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/prereqs.py +0 -0
  45. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/status.py +0 -0
  46. {code_aide-1.15.3 → code_aide-1.15.5}/src/code_aide/status_print.py +0 -0
  47. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_commands_actions.py +0 -0
  48. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_commands_tools.py +0 -0
  49. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_config.py +0 -0
  50. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_console.py +0 -0
  51. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_constants.py +0 -0
  52. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_detection.py +0 -0
  53. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_entry.py +0 -0
  54. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_error_paths.py +0 -0
  55. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_install.py +0 -0
  56. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_install_types.py +0 -0
  57. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_operations.py +0 -0
  58. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_package_managers.py +0 -0
  59. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_prereqs.py +0 -0
  60. {code_aide-1.15.3 → code_aide-1.15.5}/tests/test_status.py +0 -0
  61. {code_aide-1.15.3 → code_aide-1.15.5}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-aide
3
- Version: 1.15.3
3
+ Version: 1.15.5
4
4
  Summary: Manage AI coding CLI tools (Claude, Copilot, Cursor, Gemini, Amp, Codex)
5
5
  Project-URL: Homepage, https://github.com/dajobe/code-aide
6
6
  Project-URL: Repository, https://github.com/dajobe/code-aide
@@ -4,7 +4,7 @@ set -euo pipefail
4
4
  # Configuration
5
5
  AMP_HOME="${AMP_HOME:-$HOME/.amp}"
6
6
  BIN_DIR="$AMP_HOME/bin"
7
- STORAGE_BASE="https://static.ampcode.com"
7
+ AMP_STORAGE_BASE="${AMP_STORAGE_BASE:-https://static.ampcode.com}"
8
8
  AMP_URL="${AMP_URL:-https://ampcode.com}"
9
9
  AMP_VERSION="${AMP_VERSION:-}"
10
10
 
@@ -19,6 +19,7 @@ NC='\033[0m' # No Color
19
19
  cleanup() {
20
20
  echo -e "\n${YELLOW}Installation interrupted...${NC}"
21
21
  rm -f "$AMP_HOME/amp-install-"* 2>/dev/null || true
22
+ rm -f "$BIN_DIR/tmp."* 2>/dev/null || true
22
23
  exit 1
23
24
  }
24
25
 
@@ -166,6 +167,32 @@ download_file() {
166
167
  mv "$temp_file" "$output_file"
167
168
  }
168
169
 
170
+ # Download gzip-compressed file and write decompressed contents atomically
171
+ download_gzipped_file() {
172
+ local url="$1"
173
+ local output_file="$2"
174
+
175
+ log "Downloading $(basename "$output_file").gz..."
176
+
177
+ local temp_gz_file
178
+ temp_gz_file=$(mktemp "$(dirname "$output_file")/tmp.XXXXXX.gz")
179
+ local temp_output_file
180
+ temp_output_file=$(mktemp "$(dirname "$output_file")/tmp.XXXXXX")
181
+
182
+ downloader "$url" "$temp_gz_file"
183
+ if command_exists gzip; then
184
+ gzip -dc "$temp_gz_file" > "$temp_output_file"
185
+ else
186
+ gunzip -c "$temp_gz_file" > "$temp_output_file"
187
+ fi
188
+ mv "$temp_output_file" "$output_file"
189
+ rm -f "$temp_gz_file"
190
+ }
191
+
192
+ has_gzip_support() {
193
+ command_exists gzip || command_exists gunzip
194
+ }
195
+
169
196
  # Verify SHA256 checksum
170
197
  verify_checksum() {
171
198
  local file="$1"
@@ -210,7 +237,7 @@ verify_signature() {
210
237
 
211
238
  # Fetch latest CLI version
212
239
  fetch_latest_version() {
213
- local version_url="$STORAGE_BASE/cli/cli-version.txt"
240
+ local version_url="$AMP_STORAGE_BASE/cli/cli-version.txt"
214
241
  local version_path="$AMP_HOME/amp-install-version.txt"
215
242
 
216
243
  download_file "$version_url" "$version_path"
@@ -240,8 +267,8 @@ install_amp_binary() {
240
267
  log "Installing version: $version"
241
268
  fi
242
269
 
243
- local binary_url="$STORAGE_BASE/cli/${version}/amp-${platform}"
244
- local checksum_url="$STORAGE_BASE/cli/${version}/${platform}-amp.sha256"
270
+ local binary_url="$AMP_STORAGE_BASE/cli/${version}/amp-${platform}"
271
+ local checksum_url="$AMP_STORAGE_BASE/cli/${version}/${platform}-amp.sha256"
245
272
  local minisign_signature_url="$binary_url.minisig"
246
273
 
247
274
  # Add .exe for Windows downloads
@@ -257,8 +284,13 @@ install_amp_binary() {
257
284
  local expected_checksum
258
285
  expected_checksum=$(cat "$checksum_path")
259
286
 
260
- # Download binary
261
- download_file "$binary_url" "$binary_path"
287
+ if has_gzip_support; then
288
+ # Download compressed binary and verify the decompressed bytes against checksum
289
+ download_gzipped_file "${binary_url}.gz" "$binary_path"
290
+ else
291
+ warn "gzip not found; downloading uncompressed binary"
292
+ download_file "$binary_url" "$binary_path"
293
+ fi
262
294
 
263
295
  # Verify checksum
264
296
  verify_checksum "$binary_path" "$expected_checksum"
@@ -1,3 +1,3 @@
1
1
  """code-aide - Manage AI coding CLI tools."""
2
2
 
3
- __version__ = "1.15.3"
3
+ __version__ = "1.15.5"
@@ -64,11 +64,11 @@
64
64
  "command": "amp",
65
65
  "install_type": "script",
66
66
  "install_url": "https://ampcode.com/install.sh",
67
- "install_sha256": "8fcc17808b55b1a6ec6b54aa28877dbff9a5cab4fef8e992c1cf82d8ceaf1e46",
67
+ "install_sha256": "4526d2cacd0254cd8aafd3cd27705f088598a4e21b72a3cdca503d157779e7b7",
68
68
  "install_script_path_prepend": [
69
69
  "~/.local/bin"
70
70
  ],
71
- "version_url": "https://storage.googleapis.com/amp-public-assets-prod-0/cli/cli-version.txt",
71
+ "version_url": "https://static.ampcode.com/cli/cli-version.txt",
72
72
  "prerequisites": [],
73
73
  "min_node_version": null,
74
74
  "next_steps": "Run 'amp login' to authenticate",
@@ -205,9 +205,14 @@ def extract_script_version(
205
205
  r"VERSION='([^']+)'",
206
206
  r"VERSION=(\S+)",
207
207
  ]:
208
- match = re.search(pattern, text)
209
- if match:
210
- return match.group(1)
208
+ for match in re.finditer(pattern, text):
209
+ candidate = match.group(1)
210
+ # Skip shell-variable placeholders such as the literal
211
+ # ${AMP_VERSION:-} in `AMP_VERSION="${AMP_VERSION:-}"`; a real
212
+ # version string never contains shell expansion characters.
213
+ if "$" in candidate or "{" in candidate:
214
+ continue
215
+ return candidate
211
216
 
212
217
  return None
213
218
 
@@ -304,3 +304,22 @@ class TestExtractScriptVersion(unittest.TestCase):
304
304
  self.assertIsNone(
305
305
  cli_versions.extract_script_version("cursor", {}, b"echo hello")
306
306
  )
307
+
308
+ def test_skips_shell_variable_placeholder(self):
309
+ # The amp script declares AMP_VERSION="${AMP_VERSION:-}"; the literal
310
+ # placeholder must not be returned as a version.
311
+ script = b'AMP_VERSION="${AMP_VERSION:-}"\n'
312
+ self.assertIsNone(cli_versions.extract_script_version("amp", {}, script))
313
+
314
+ def test_returns_real_version_after_placeholder(self):
315
+ script = b'AMP_VERSION="${AMP_VERSION:-}"\nVERSION="1.2.3"\n'
316
+ self.assertEqual(
317
+ cli_versions.extract_script_version("amp", {}, script),
318
+ "1.2.3",
319
+ )
320
+
321
+ def test_plain_version_assignment(self):
322
+ self.assertEqual(
323
+ cli_versions.extract_script_version("amp", {}, b'VERSION="2.0.1"\n'),
324
+ "2.0.1",
325
+ )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes