code-aide 1.7.2__tar.gz → 1.8.0__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 (43) hide show
  1. {code_aide-1.7.2 → code_aide-1.8.0}/PKG-INFO +4 -1
  2. {code_aide-1.7.2 → code_aide-1.8.0}/README.md +3 -0
  3. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/__init__.py +1 -1
  4. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/commands_actions.py +16 -0
  5. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/commands_tools.py +3 -4
  6. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/status.py +20 -6
  7. {code_aide-1.7.2 → code_aide-1.8.0}/tests/test_status.py +45 -0
  8. {code_aide-1.7.2 → code_aide-1.8.0}/.github/workflows/ci.yml +0 -0
  9. {code_aide-1.7.2 → code_aide-1.8.0}/.github/workflows/publish.yml +0 -0
  10. {code_aide-1.7.2 → code_aide-1.8.0}/.gitignore +0 -0
  11. {code_aide-1.7.2 → code_aide-1.8.0}/.gitlab-ci.yml +0 -0
  12. {code_aide-1.7.2 → code_aide-1.8.0}/.pre-commit-config.yaml +0 -0
  13. {code_aide-1.7.2 → code_aide-1.8.0}/AGENTS.md +0 -0
  14. {code_aide-1.7.2 → code_aide-1.8.0}/CLAUDE.md +0 -0
  15. {code_aide-1.7.2 → code_aide-1.8.0}/LICENSE +0 -0
  16. {code_aide-1.7.2 → code_aide-1.8.0}/TODO.md +0 -0
  17. {code_aide-1.7.2 → code_aide-1.8.0}/pyproject.toml +0 -0
  18. {code_aide-1.7.2 → code_aide-1.8.0}/specs/auto-migrate-deprecated-installs.md +0 -0
  19. {code_aide-1.7.2 → code_aide-1.8.0}/specs/claude-native-installer-migration.md +0 -0
  20. {code_aide-1.7.2 → code_aide-1.8.0}/specs/missing-coding-llm-cli-tools.md +0 -0
  21. {code_aide-1.7.2 → code_aide-1.8.0}/specs/pre-commit-uv-setup.md +0 -0
  22. {code_aide-1.7.2 → code_aide-1.8.0}/specs/remove-bundled-version-baseline.md +0 -0
  23. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/__main__.py +0 -0
  24. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/config.py +0 -0
  25. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/console.py +0 -0
  26. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/constants.py +0 -0
  27. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/data/tools.json +0 -0
  28. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/detection.py +0 -0
  29. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/entry.py +0 -0
  30. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/install.py +0 -0
  31. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/operations.py +0 -0
  32. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/prereqs.py +0 -0
  33. {code_aide-1.7.2 → code_aide-1.8.0}/src/code_aide/versions.py +0 -0
  34. {code_aide-1.7.2 → code_aide-1.8.0}/tests/test_commands_actions.py +0 -0
  35. {code_aide-1.7.2 → code_aide-1.8.0}/tests/test_commands_tools.py +0 -0
  36. {code_aide-1.7.2 → code_aide-1.8.0}/tests/test_config.py +0 -0
  37. {code_aide-1.7.2 → code_aide-1.8.0}/tests/test_console.py +0 -0
  38. {code_aide-1.7.2 → code_aide-1.8.0}/tests/test_constants.py +0 -0
  39. {code_aide-1.7.2 → code_aide-1.8.0}/tests/test_detection.py +0 -0
  40. {code_aide-1.7.2 → code_aide-1.8.0}/tests/test_install.py +0 -0
  41. {code_aide-1.7.2 → code_aide-1.8.0}/tests/test_operations.py +0 -0
  42. {code_aide-1.7.2 → code_aide-1.8.0}/tests/test_versions.py +0 -0
  43. {code_aide-1.7.2 → code_aide-1.8.0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-aide
3
- Version: 1.7.2
3
+ Version: 1.8.0
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
@@ -54,6 +54,9 @@ code-aide list
54
54
  # Show detailed status for installed tools
55
55
  code-aide status
56
56
 
57
+ # Show compact one-line-per-tool status
58
+ code-aide status -c
59
+
57
60
  # Install specific tools
58
61
  code-aide install claude gemini
59
62
 
@@ -28,6 +28,9 @@ code-aide list
28
28
  # Show detailed status for installed tools
29
29
  code-aide status
30
30
 
31
+ # Show compact one-line-per-tool status
32
+ code-aide status -c
33
+
31
34
  # Install specific tools
32
35
  code-aide install claude gemini
33
36
 
@@ -1,3 +1,3 @@
1
1
  """code-aide - Manage AI coding CLI tools."""
2
2
 
3
- __version__ = "1.7.2"
3
+ __version__ = "1.8.0"
@@ -320,6 +320,22 @@ def cmd_update_versions(args: argparse.Namespace) -> None:
320
320
  tool_entry["latest_date"] = date
321
321
  version_info_changed = True
322
322
 
323
+ # Refresh latest_version from Homebrew for tools installed via brew, so
324
+ # "upstream" in status reflects the correct source for those installs.
325
+ for tool_name in tool_names:
326
+ install_info = detect_install_method(tool_name)
327
+ if install_info["method"] not in ("brew_formula", "brew_cask"):
328
+ continue
329
+ pkg_info = get_brew_package_info(install_info["method"], install_info["detail"])
330
+ avail = pkg_info.get("available_version")
331
+ if not avail:
332
+ continue
333
+ normalized = normalize_version(avail)
334
+ tool_entry = config["tools"][tool_name]
335
+ if tool_entry.get("latest_version") != normalized:
336
+ tool_entry["latest_version"] = normalized
337
+ version_info_changed = True
338
+
323
339
  def _save(tools: dict) -> str:
324
340
  """Save versions to user cache. Returns description."""
325
341
  save_updated_versions(tools)
@@ -127,7 +127,8 @@ def _compact_version_status(
127
127
  if status_version_matches_latest(version, latest_version):
128
128
  return (ver, f"{Colors.GREEN}ok{Colors.NC}")
129
129
  if ver and version_is_newer(ver, latest_version):
130
- return (ver, f"{Colors.YELLOW}newer{Colors.NC}")
130
+ # Installed is ahead of code-aide's known latest; treat as ok.
131
+ return (ver, f"{Colors.GREEN}ok{Colors.NC}")
131
132
  return (ver, f"{Colors.YELLOW}old{Colors.NC}")
132
133
 
133
134
 
@@ -151,9 +152,7 @@ def cmd_status_compact() -> None:
151
152
  install_info = detect_install_method(tool_name)
152
153
  method = _short_install_method(install_info["method"])
153
154
  latest_version = tool_config.get("latest_version")
154
- ver, ver_status = _compact_version_status(
155
- status["version"], latest_version
156
- )
155
+ ver, ver_status = _compact_version_status(status["version"], latest_version)
157
156
 
158
157
  state = f"{Colors.GREEN}ok{Colors.NC}"
159
158
  if ver_status:
@@ -40,9 +40,16 @@ def print_system_version_status(
40
40
  if avail_ver:
41
41
  date_suffix = f", {avail_date}" if avail_date else ""
42
42
  pkg_name = pkg_info.get("package") or "system"
43
- if latest_version and not status_version_matches_latest(
44
- avail_ver, latest_version
45
- ):
43
+ # Only show upstream when config's latest is newer than packaged version;
44
+ # avoid showing a stale "upstream" that is older than what's installed.
45
+ show_upstream = (
46
+ latest_version
47
+ and not status_version_matches_latest(avail_ver, latest_version)
48
+ and version_is_newer(
49
+ normalize_version(latest_version), normalize_version(avail_ver)
50
+ )
51
+ )
52
+ if show_upstream:
46
53
  print(
47
54
  f" Packaged: {avail_ver} ({pkg_name}{date_suffix}) "
48
55
  f"{Colors.YELLOW}(upstream: {latest_version}){Colors.NC}"
@@ -70,9 +77,16 @@ def print_brew_version_status(
70
77
 
71
78
  if avail_ver:
72
79
  pkg_name = pkg_info.get("package") or "Homebrew"
73
- if latest_version and not status_version_matches_latest(
74
- avail_ver, latest_version
75
- ):
80
+ # Only show upstream when config's latest is newer than packaged version;
81
+ # avoid showing a stale "upstream" that is older than what's installed.
82
+ show_upstream = (
83
+ latest_version
84
+ and not status_version_matches_latest(avail_ver, latest_version)
85
+ and version_is_newer(
86
+ normalize_version(latest_version), normalize_version(avail_ver)
87
+ )
88
+ )
89
+ if show_upstream:
76
90
  print(
77
91
  f" Packaged: {avail_ver} ({pkg_name}) "
78
92
  f"{Colors.YELLOW}(upstream: {latest_version}){Colors.NC}"
@@ -74,3 +74,48 @@ class TestPrintSystemVersionStatus(unittest.TestCase):
74
74
  )
75
75
  self.assertIn("2.1.50", output)
76
76
  self.assertNotIn("Packaged:", output)
77
+
78
+ def test_packaged_newer_than_config_no_upstream_note(self):
79
+ """When packaged version is newer than config latest, do not show upstream."""
80
+ output = self._capture(
81
+ "2.1.60 (Claude Code)",
82
+ "2.1.52",
83
+ {
84
+ "package": "dev-util/claude-code",
85
+ "installed_version": "2.1.60",
86
+ "available_version": "2.1.60",
87
+ "available_date": "2026-03-01",
88
+ },
89
+ )
90
+ self.assertIn("up to date", output)
91
+ self.assertIn("Packaged: 2.1.60", output)
92
+ self.assertNotIn("upstream:", output)
93
+
94
+
95
+ class TestPrintBrewVersionStatus(unittest.TestCase):
96
+ """Tests for print_brew_version_status."""
97
+
98
+ def _capture(self, cli_version, latest_version, pkg_info):
99
+ from io import StringIO
100
+ import contextlib
101
+
102
+ buf = StringIO()
103
+ with contextlib.redirect_stdout(buf):
104
+ cli_status.print_brew_version_status(cli_version, latest_version, pkg_info)
105
+ return buf.getvalue()
106
+
107
+ def test_packaged_newer_than_config_no_upstream_note(self):
108
+ """When Homebrew packaged version is newer than config, do not show upstream."""
109
+ output = self._capture(
110
+ "codex-cli 0.114.0",
111
+ "0.112.0",
112
+ {
113
+ "package": "codex",
114
+ "installed_version": "0.114.0",
115
+ "available_version": "0.114.0",
116
+ "outdated": False,
117
+ },
118
+ )
119
+ self.assertIn("up to date", output)
120
+ self.assertIn("Packaged: 0.114.0 (codex)", output)
121
+ self.assertNotIn("upstream:", output)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes