code-aide 1.15.4__tar.gz → 1.15.6__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.4 → code_aide-1.15.6}/PKG-INFO +1 -1
  2. {code_aide-1.15.4 → code_aide-1.15.6}/script-archive/amp-install.sh +145 -42
  3. {code_aide-1.15.4 → code_aide-1.15.6}/script-archive/claude-install.sh +29 -1
  4. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/__init__.py +1 -1
  5. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/data/tools.json +2 -2
  6. {code_aide-1.15.4 → code_aide-1.15.6}/.github/workflows/ci.yml +0 -0
  7. {code_aide-1.15.4 → code_aide-1.15.6}/.github/workflows/publish.yml +0 -0
  8. {code_aide-1.15.4 → code_aide-1.15.6}/.gitignore +0 -0
  9. {code_aide-1.15.4 → code_aide-1.15.6}/.gitlab-ci.yml +0 -0
  10. {code_aide-1.15.4 → code_aide-1.15.6}/.pre-commit-config.yaml +0 -0
  11. {code_aide-1.15.4 → code_aide-1.15.6}/AGENTS.md +0 -0
  12. {code_aide-1.15.4 → code_aide-1.15.6}/CLAUDE.md +0 -0
  13. {code_aide-1.15.4 → code_aide-1.15.6}/LICENSE +0 -0
  14. {code_aide-1.15.4 → code_aide-1.15.6}/README.md +0 -0
  15. {code_aide-1.15.4 → code_aide-1.15.6}/TODO.md +0 -0
  16. {code_aide-1.15.4 → code_aide-1.15.6}/pyproject.toml +0 -0
  17. {code_aide-1.15.4 → code_aide-1.15.6}/script-archive/README.md +0 -0
  18. {code_aide-1.15.4 → code_aide-1.15.6}/script-archive/cursor-install.sh +0 -0
  19. {code_aide-1.15.4 → code_aide-1.15.6}/specs/2026-05-03-qwen3.6-code-quality-analysis-original.md +0 -0
  20. {code_aide-1.15.4 → code_aide-1.15.6}/specs/2026-05-03-qwen3.6-code-quality-analysis.md +0 -0
  21. {code_aide-1.15.4 → code_aide-1.15.6}/specs/auto-migrate-deprecated-installs.md +0 -0
  22. {code_aide-1.15.4 → code_aide-1.15.6}/specs/claude-native-installer-migration.md +0 -0
  23. {code_aide-1.15.4 → code_aide-1.15.6}/specs/missing-coding-llm-cli-tools.md +0 -0
  24. {code_aide-1.15.4 → code_aide-1.15.6}/specs/pre-commit-uv-setup.md +0 -0
  25. {code_aide-1.15.4 → code_aide-1.15.6}/specs/remove-bundled-version-baseline.md +0 -0
  26. {code_aide-1.15.4 → code_aide-1.15.6}/specs/unify-upgrade-eligibility-with-shared-evaluator.md +0 -0
  27. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/__main__.py +0 -0
  28. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/commands_actions.py +0 -0
  29. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/commands_tools.py +0 -0
  30. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/config.py +0 -0
  31. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/console.py +0 -0
  32. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/constants.py +0 -0
  33. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/detection.py +0 -0
  34. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/detection_types.py +0 -0
  35. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/entry.py +0 -0
  36. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/install.py +0 -0
  37. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/install_types.py +0 -0
  38. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/operation_handlers.py +0 -0
  39. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/operations.py +0 -0
  40. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/package_info.py +0 -0
  41. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/package_managers.py +0 -0
  42. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/prereqs.py +0 -0
  43. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/status.py +0 -0
  44. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/status_print.py +0 -0
  45. {code_aide-1.15.4 → code_aide-1.15.6}/src/code_aide/versions.py +0 -0
  46. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_commands_actions.py +0 -0
  47. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_commands_tools.py +0 -0
  48. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_config.py +0 -0
  49. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_console.py +0 -0
  50. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_constants.py +0 -0
  51. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_detection.py +0 -0
  52. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_entry.py +0 -0
  53. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_error_paths.py +0 -0
  54. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_install.py +0 -0
  55. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_install_types.py +0 -0
  56. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_operations.py +0 -0
  57. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_package_managers.py +0 -0
  58. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_prereqs.py +0 -0
  59. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_status.py +0 -0
  60. {code_aide-1.15.4 → code_aide-1.15.6}/tests/test_versions.py +0 -0
  61. {code_aide-1.15.4 → code_aide-1.15.6}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-aide
3
- Version: 1.15.4
3
+ Version: 1.15.6
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,43 +4,112 @@ 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
 
11
- # Colors for output
12
- RED='\033[0;31m'
13
- GREEN='\033[0;32m'
14
- YELLOW='\033[1;33m'
15
- BLUE='\033[0;34m'
16
- NC='\033[0m' # No Color
17
-
18
- # Cleanup on interrupt
19
- cleanup() {
20
- echo -e "\n${YELLOW}Installation interrupted...${NC}"
21
- rm -f "$AMP_HOME/amp-install-"* 2>/dev/null || true
22
- exit 1
11
+ if [[ -t 2 ]]; then
12
+ TTY_OUTPUT=1
13
+ else
14
+ TTY_OUTPUT=0
15
+ fi
16
+
17
+ if [[ $TTY_OUTPUT -eq 1 && -z "${NO_COLOR:-}" ]] && command -v tput >/dev/null 2>&1; then
18
+ COLOR_COUNT="$(tput colors 2>/dev/null || printf '0')"
19
+ else
20
+ COLOR_COUNT=0
21
+ fi
22
+
23
+ if [[ "$COLOR_COUNT" =~ ^[0-9]+$ && "$COLOR_COUNT" -ge 8 ]]; then
24
+ BOLD="$(tput bold 2>/dev/null || true)"
25
+ DIM="$(tput dim 2>/dev/null || true)"
26
+ RESET="$(tput sgr0 2>/dev/null || true)"
27
+ ACCENT="$(tput setaf 6 2>/dev/null || true)"
28
+ SUCCESS="$(tput setaf 2 2>/dev/null || true)"
29
+ WARNING="$(tput setaf 3 2>/dev/null || true)"
30
+ ERROR="$(tput setaf 1 2>/dev/null || true)"
31
+ else
32
+ BOLD=''
33
+ DIM=''
34
+ RESET=''
35
+ ACCENT=''
36
+ SUCCESS=''
37
+ WARNING=''
38
+ ERROR=''
39
+ fi
40
+
41
+ case ":$TTY_OUTPUT:${LC_ALL:-${LC_CTYPE:-${LANG:-}}}" in
42
+ :1:*UTF-8* | :1:*utf8* | :1:*UTF8*)
43
+ ORB_LINES=' · · ·
44
+ · ◍ ● ◍ ·
45
+ · ● AMP ● ·
46
+ · ◍ ● ◍ ·
47
+ · · ·'
48
+ STEP_GLYPH='·──◍'
49
+ SUCCESS_GLYPH='◍──·'
50
+ WARN_GLYPH='·─!'
51
+ ERROR_GLYPH='·─╳'
52
+ ;;
53
+ *)
54
+ ORB_LINES=' . . .
55
+ . o O o .
56
+ . O AMP O .
57
+ . o O o .
58
+ . . .'
59
+ STEP_GLYPH='-->'
60
+ SUCCESS_GLYPH='<--'
61
+ WARN_GLYPH='!'
62
+ ERROR_GLYPH='x'
63
+ ;;
64
+ esac
65
+
66
+ print_header() {
67
+ if [[ $TTY_OUTPUT -eq 1 ]]; then
68
+ printf '\n' >&2
69
+ printf '%s\n' "$ORB_LINES" | while IFS= read -r line; do
70
+ printf '%s%s%s\n' "$ACCENT" "$line" "$RESET" >&2
71
+ done
72
+ printf '\n%s%s%s\n' "$BOLD$ACCENT" 'AMP CLI INSTALLER' "$RESET" >&2
73
+ printf '%s%s%s\n\n' "$DIM" \
74
+ 'Installs Amp into ~/.amp/bin and links it onto your PATH.' "$RESET" >&2
75
+ else
76
+ printf 'Amp CLI installer\n' >&2
77
+ fi
23
78
  }
24
79
 
25
- trap cleanup INT TERM
26
-
27
80
  log() {
28
- echo -e "${BLUE}[INFO]${NC} $1" >&2
81
+ printf '%s%s%s %s\n' "$ACCENT" "$STEP_GLYPH" "$RESET" "$1" >&2
29
82
  }
30
83
 
31
84
  warn() {
32
- echo -e "${YELLOW}[WARN]${NC} $1" >&2
85
+ printf '%s%s%s %s\n' "$WARNING" "$WARN_GLYPH" "$RESET" "$1" >&2
33
86
  }
34
87
 
35
88
  error() {
36
- echo -e "${RED}[ERROR]${NC} $1" >&2
89
+ printf '%s%s%s %b\n' "$ERROR" "$ERROR_GLYPH" "$RESET" "$1" >&2
37
90
  exit 1
38
91
  }
39
92
 
40
93
  success() {
41
- echo -e "${GREEN}[SUCCESS]${NC} $1" >&2
94
+ printf '%s%s%s %s%s%s\n' "$SUCCESS" "$SUCCESS_GLYPH" "$RESET" \
95
+ "$BOLD" "$1" "$RESET" >&2
96
+ }
97
+
98
+ detail() {
99
+ printf ' %s%s%s\n' "$DIM" "$1" "$RESET" >&2
100
+ }
101
+
102
+ # Cleanup on interrupt
103
+ cleanup() {
104
+ printf '\n' >&2
105
+ warn 'Installation interrupted'
106
+ rm -f "$AMP_HOME/amp-install-"* 2>/dev/null || true
107
+ rm -f "$BIN_DIR/tmp."* 2>/dev/null || true
108
+ exit 1
42
109
  }
43
110
 
111
+ trap cleanup INT TERM
112
+
44
113
  # Check if command exists
45
114
  command_exists() {
46
115
  command -v "$1" >/dev/null 2>&1
@@ -154,8 +223,9 @@ downloader() {
154
223
  download_file() {
155
224
  local url="$1"
156
225
  local output_file="$2"
226
+ local label="${3:-$(basename "$output_file")}"
157
227
 
158
- log "Downloading $(basename "$output_file")..."
228
+ log "Downloading $label"
159
229
 
160
230
  # Use secure temporary file
161
231
  local temp_file
@@ -166,12 +236,39 @@ download_file() {
166
236
  mv "$temp_file" "$output_file"
167
237
  }
168
238
 
239
+ # Download gzip-compressed file and write decompressed contents atomically
240
+ download_gzipped_file() {
241
+ local url="$1"
242
+ local output_file="$2"
243
+ local label="${3:-$(basename "$output_file").gz}"
244
+
245
+ log "Downloading $label"
246
+
247
+ local temp_gz_file
248
+ temp_gz_file=$(mktemp "$(dirname "$output_file")/tmp.XXXXXX.gz")
249
+ local temp_output_file
250
+ temp_output_file=$(mktemp "$(dirname "$output_file")/tmp.XXXXXX")
251
+
252
+ downloader "$url" "$temp_gz_file"
253
+ if command_exists gzip; then
254
+ gzip -dc "$temp_gz_file" > "$temp_output_file"
255
+ else
256
+ gunzip -c "$temp_gz_file" > "$temp_output_file"
257
+ fi
258
+ mv "$temp_output_file" "$output_file"
259
+ rm -f "$temp_gz_file"
260
+ }
261
+
262
+ has_gzip_support() {
263
+ command_exists gzip || command_exists gunzip
264
+ }
265
+
169
266
  # Verify SHA256 checksum
170
267
  verify_checksum() {
171
268
  local file="$1"
172
269
  local expected_checksum="$2"
173
270
 
174
- log "Verifying checksum..."
271
+ log "Verifying checksum"
175
272
 
176
273
  local actual_checksum
177
274
  actual_checksum=$($SHA256_CMD "$file" | cut -d' ' -f1)
@@ -196,8 +293,8 @@ verify_signature() {
196
293
  local signature_path="$AMP_HOME/amp-install-signature.minisign"
197
294
  local pubkey_path="$AMP_HOME/signing-key.pub"
198
295
 
199
- download_file "$signature_url" "$signature_path"
200
- download_file "$AMP_URL/.well-known/signing-key.pub" "$pubkey_path"
296
+ download_file "$signature_url" "$signature_path" 'signature'
297
+ download_file "$AMP_URL/.well-known/signing-key.pub" "$pubkey_path" 'signing key'
201
298
 
202
299
  if ! minisign -Vm "$file" -x "$signature_path" -p "$pubkey_path" >/dev/null 2>&1; then
203
300
  rm -f "$signature_path" "$pubkey_path"
@@ -210,10 +307,10 @@ verify_signature() {
210
307
 
211
308
  # Fetch latest CLI version
212
309
  fetch_latest_version() {
213
- local version_url="$STORAGE_BASE/cli/cli-version.txt"
310
+ local version_url="$AMP_STORAGE_BASE/cli/cli-version.txt"
214
311
  local version_path="$AMP_HOME/amp-install-version.txt"
215
312
 
216
- download_file "$version_url" "$version_path"
313
+ download_file "$version_url" "$version_path" 'latest version'
217
314
  cat "$version_path"
218
315
  rm -f "$version_path"
219
316
  }
@@ -235,13 +332,13 @@ install_amp_binary() {
235
332
  else
236
333
  # Fetch version first to ensure consistent downloads (avoids race conditions
237
334
  # where a new version is published mid-download)
238
- log "Fetching latest version..."
335
+ log "Fetching latest version"
239
336
  version=$(fetch_latest_version)
240
337
  log "Installing version: $version"
241
338
  fi
242
339
 
243
- local binary_url="$STORAGE_BASE/cli/${version}/amp-${platform}"
244
- local checksum_url="$STORAGE_BASE/cli/${version}/${platform}-amp.sha256"
340
+ local binary_url="$AMP_STORAGE_BASE/cli/${version}/amp-${platform}"
341
+ local checksum_url="$AMP_STORAGE_BASE/cli/${version}/${platform}-amp.sha256"
245
342
  local minisign_signature_url="$binary_url.minisig"
246
343
 
247
344
  # Add .exe for Windows downloads
@@ -253,12 +350,17 @@ install_amp_binary() {
253
350
  local checksum_path="$AMP_HOME/amp-install-checksum.txt"
254
351
 
255
352
  # Download checksum first
256
- download_file "$checksum_url" "$checksum_path"
353
+ download_file "$checksum_url" "$checksum_path" 'checksum'
257
354
  local expected_checksum
258
355
  expected_checksum=$(cat "$checksum_path")
259
356
 
260
- # Download binary
261
- download_file "$binary_url" "$binary_path"
357
+ if has_gzip_support; then
358
+ # Download compressed binary and verify the decompressed bytes against checksum
359
+ download_gzipped_file "${binary_url}.gz" "$binary_path" 'Amp binary'
360
+ else
361
+ warn "gzip not found; downloading uncompressed binary"
362
+ download_file "$binary_url" "$binary_path" 'Amp binary'
363
+ fi
262
364
 
263
365
  # Verify checksum
264
366
  verify_checksum "$binary_path" "$expected_checksum"
@@ -413,20 +515,20 @@ update_shell_profile() {
413
515
 
414
516
  # Ask user before modifying shell config
415
517
  local tilde_profile="${shell_profile/#$HOME/\~}"
416
- echo ""
518
+ printf '\n'
417
519
  if [[ -t 0 ]]; then
418
520
  # Interactive: ask user
419
521
  read -p "Add ~/.local/bin to your PATH in $tilde_profile? [y/n] " -n 1 -r
420
- echo ""
522
+ printf '\n'
421
523
  if [[ ! $REPLY =~ ^[Yy]$ ]]; then
422
524
  log "Skipped modifying shell config."
423
525
  log "To use amp, add ~/.local/bin to your PATH manually:"
424
- echo " $path_export"
526
+ printf ' %s\n' "$path_export"
425
527
  return
426
528
  fi
427
529
  else
428
530
  # Non-interactive: add automatically
429
- log "Adding ~/.local/bin to PATH in $tilde_profile..."
531
+ log "Adding ~/.local/bin to PATH in $tilde_profile"
430
532
  fi
431
533
 
432
534
  # Create config file if it doesn't exist
@@ -443,16 +545,18 @@ update_shell_profile() {
443
545
  } >> "$shell_profile"
444
546
 
445
547
  success "Added ~/.local/bin to PATH in $tilde_profile"
446
- echo ""
548
+ printf '\n'
447
549
  log "To use amp immediately, run:"
448
- echo " $path_export"
550
+ printf ' %s\n' "$path_export"
449
551
  }
450
552
 
451
553
  # Main installation
452
554
  main() {
453
- log "Starting Amp CLI binary installation..."
555
+ print_header
556
+ detail "Install directory: $BIN_DIR"
454
557
 
455
558
  # Check prerequisites
559
+ log "Checking prerequisites"
456
560
  check_prereqs
457
561
 
458
562
  # Create directories
@@ -469,10 +573,9 @@ main() {
469
573
  # Update shell profile
470
574
  update_shell_profile
471
575
 
472
- echo ""
473
- success "Amp CLI installed successfully!"
474
- log "Run 'amp --help' to get started"
475
- log "Visit $AMP_URL for documentation"
576
+ success "Amp CLI installed"
577
+ detail "Run 'amp --help' to get started"
578
+ detail "Docs: $AMP_URL/manual"
476
579
  }
477
580
 
478
581
  main "$@"
@@ -155,11 +155,39 @@ chmod +x "$binary_path"
155
155
 
156
156
  # Run claude install to set up launcher and shell integration
157
157
  echo "Setting up Claude Code..."
158
- "$binary_path" install ${TARGET:+"$TARGET"}
158
+ install_code=0
159
+ "$binary_path" install ${TARGET:+"$TARGET"} || install_code=$?
159
160
 
160
161
  # Clean up downloaded file
161
162
  rm -f "$binary_path"
162
163
 
164
+ if [ "$install_code" -ne 0 ]; then
165
+ # A signal death mid-install kills the binary's TUI with no chance to
166
+ # restore the terminal, leaving the user's shell in raw mode (typed
167
+ # characters stop echoing). Restore it before printing anything.
168
+ if [ "$install_code" -ge 128 ] && [ -t 0 ]; then
169
+ stty sane 2>/dev/null || true
170
+ fi
171
+ # Red when stderr is a terminal, so the explanation stands out from the
172
+ # surrounding install output; plain when piped or captured
173
+ red="" reset=""
174
+ if [ -t 2 ]; then
175
+ red=$'\033[31m'
176
+ reset=$'\033[0m'
177
+ fi
178
+ # Signal deaths (exit code 128+N) print nothing of their own — bash shows
179
+ # only e.g. "Killed". 137 = SIGKILL, which on Linux is almost always the
180
+ # kernel OOM killer on small hosts; macOS has no equivalent OOM kill, so
181
+ # the out-of-memory explanation is Linux-only.
182
+ if [ "$install_code" -eq 137 ] && [ "$os" = "linux" ]; then
183
+ echo "${red}Installation was killed before it could finish (exit code 137). This usually means the system ran out of memory.${reset}" >&2
184
+ echo "${red}Claude Code needs roughly 512MB of free memory to install. Free up memory, then run this script again.${reset}" >&2
185
+ elif [ "$install_code" -ge 128 ]; then
186
+ echo "${red}Installation was killed before it could finish (exit code $install_code).${reset}" >&2
187
+ fi
188
+ exit "$install_code"
189
+ fi
190
+
163
191
  echo ""
164
192
  echo "✅ Installation complete!"
165
193
  echo ""
@@ -1,3 +1,3 @@
1
1
  """code-aide - Manage AI coding CLI tools."""
2
2
 
3
- __version__ = "1.15.4"
3
+ __version__ = "1.15.6"
@@ -28,7 +28,7 @@
28
28
  "command": "claude",
29
29
  "install_type": "script",
30
30
  "install_url": "https://claude.ai/install.sh",
31
- "install_sha256": "005ec1a937f32dfbb74f9e810287bcb12cba2d5cae4c9277aa8c6364adbf1787",
31
+ "install_sha256": "b3f79015b54c751440a6488f07b1b64f9088742b9052bc1bd356d13108320d2a",
32
32
  "version_url": "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest",
33
33
  "prerequisites": [],
34
34
  "min_node_version": null,
@@ -64,7 +64,7 @@
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": "4ceab71af4f5a126d8ffe0e1af3b06f210be67eae93c8e4583793a52064fc2e2",
68
68
  "install_script_path_prepend": [
69
69
  "~/.local/bin"
70
70
  ],
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