agent-cli 0.66.0__py3-none-any.whl → 0.66.2__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.
- agent_cli/install/extras.py +50 -1
- {agent_cli-0.66.0.dist-info → agent_cli-0.66.2.dist-info}/METADATA +3 -2
- {agent_cli-0.66.0.dist-info → agent_cli-0.66.2.dist-info}/RECORD +6 -6
- {agent_cli-0.66.0.dist-info → agent_cli-0.66.2.dist-info}/WHEEL +0 -0
- {agent_cli-0.66.0.dist-info → agent_cli-0.66.2.dist-info}/entry_points.txt +0 -0
- {agent_cli-0.66.0.dist-info → agent_cli-0.66.2.dist-info}/licenses/LICENSE +0 -0
agent_cli/install/extras.py
CHANGED
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import shutil
|
|
6
6
|
import subprocess
|
|
7
7
|
import sys
|
|
8
|
+
import tomllib
|
|
8
9
|
from pathlib import Path
|
|
9
10
|
from typing import Annotated
|
|
10
11
|
|
|
@@ -48,6 +49,35 @@ def _in_virtualenv() -> bool:
|
|
|
48
49
|
return sys.prefix != sys.base_prefix
|
|
49
50
|
|
|
50
51
|
|
|
52
|
+
def _is_uv_tool_install() -> bool:
|
|
53
|
+
"""Check if running from a uv tool environment."""
|
|
54
|
+
receipt = Path(sys.prefix) / "uv-receipt.toml"
|
|
55
|
+
return receipt.exists()
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _get_current_uv_tool_extras() -> list[str]:
|
|
59
|
+
"""Get extras currently configured in uv-receipt.toml."""
|
|
60
|
+
receipt = Path(sys.prefix) / "uv-receipt.toml"
|
|
61
|
+
if not receipt.exists():
|
|
62
|
+
return []
|
|
63
|
+
data = tomllib.loads(receipt.read_text())
|
|
64
|
+
requirements = data.get("tool", {}).get("requirements", [])
|
|
65
|
+
for req in requirements:
|
|
66
|
+
if req.get("name") == "agent-cli":
|
|
67
|
+
return req.get("extras", [])
|
|
68
|
+
return []
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _install_via_uv_tool(extras: list[str]) -> bool:
|
|
72
|
+
"""Reinstall agent-cli via uv tool with the specified extras."""
|
|
73
|
+
extras_str = ",".join(extras)
|
|
74
|
+
package_spec = f"agent-cli[{extras_str}]"
|
|
75
|
+
console.print(f"Reinstalling via uv tool: [cyan]{package_spec}[/]")
|
|
76
|
+
cmd = ["uv", "tool", "install", package_spec, "--force"]
|
|
77
|
+
result = subprocess.run(cmd, check=False)
|
|
78
|
+
return result.returncode == 0
|
|
79
|
+
|
|
80
|
+
|
|
51
81
|
def _install_cmd() -> list[str]:
|
|
52
82
|
"""Build the install command with appropriate flags."""
|
|
53
83
|
in_venv = _in_virtualenv()
|
|
@@ -71,6 +101,10 @@ def install_extras(
|
|
|
71
101
|
bool,
|
|
72
102
|
typer.Option("--list", "-l", help="List available extras"),
|
|
73
103
|
] = False,
|
|
104
|
+
all_extras: Annotated[
|
|
105
|
+
bool,
|
|
106
|
+
typer.Option("--all", "-a", help="Install all available extras"),
|
|
107
|
+
] = False,
|
|
74
108
|
) -> None:
|
|
75
109
|
"""Install optional extras (rag, memory, vad, etc.) with pinned versions.
|
|
76
110
|
|
|
@@ -78,6 +112,7 @@ def install_extras(
|
|
|
78
112
|
agent-cli install-extras rag # Install RAG dependencies
|
|
79
113
|
agent-cli install-extras memory vad # Install multiple extras
|
|
80
114
|
agent-cli install-extras --list # Show available extras
|
|
115
|
+
agent-cli install-extras --all # Install all extras
|
|
81
116
|
|
|
82
117
|
"""
|
|
83
118
|
available = _available_extras()
|
|
@@ -89,8 +124,11 @@ def install_extras(
|
|
|
89
124
|
console.print(f" [cyan]{name}[/]: {desc}")
|
|
90
125
|
return
|
|
91
126
|
|
|
127
|
+
if all_extras:
|
|
128
|
+
extras = available
|
|
129
|
+
|
|
92
130
|
if not extras:
|
|
93
|
-
print_error_message("No extras specified. Use --list to see available.")
|
|
131
|
+
print_error_message("No extras specified. Use --list to see available, or --all.")
|
|
94
132
|
raise typer.Exit(1)
|
|
95
133
|
|
|
96
134
|
invalid = [e for e in extras if e not in available]
|
|
@@ -98,6 +136,17 @@ def install_extras(
|
|
|
98
136
|
print_error_message(f"Unknown extras: {invalid}. Use --list to see available.")
|
|
99
137
|
raise typer.Exit(1)
|
|
100
138
|
|
|
139
|
+
# If running from uv tool install, reinstall with extras to persist them
|
|
140
|
+
if _is_uv_tool_install():
|
|
141
|
+
current_extras = _get_current_uv_tool_extras()
|
|
142
|
+
new_extras = sorted(set(current_extras) | set(extras))
|
|
143
|
+
if not _install_via_uv_tool(new_extras):
|
|
144
|
+
print_error_message("Failed to reinstall via uv tool")
|
|
145
|
+
raise typer.Exit(1)
|
|
146
|
+
console.print("[green]Done! Extras will persist across uv tool upgrade.[/]")
|
|
147
|
+
return
|
|
148
|
+
|
|
149
|
+
# Standard pip/uv pip install for non-tool environments
|
|
101
150
|
cmd = _install_cmd()
|
|
102
151
|
|
|
103
152
|
for extra in extras:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent-cli
|
|
3
|
-
Version: 0.66.
|
|
3
|
+
Version: 0.66.2
|
|
4
4
|
Summary: A suite of AI-powered command-line tools for text correction, audio transcription, and voice assistance.
|
|
5
5
|
Project-URL: Homepage, https://github.com/basnijholt/agent-cli
|
|
6
6
|
Author-email: Bas Nijholt <bas@nijho.lt>
|
|
@@ -486,13 +486,14 @@ agent-cli install-extras rag memory vad
|
|
|
486
486
|
|
|
487
487
|
Examples: agent-cli install-extras rag # Install RAG dependencies agent-cli
|
|
488
488
|
install-extras memory vad # Install multiple extras agent-cli install-extras --list
|
|
489
|
-
# Show available extras
|
|
489
|
+
# Show available extras agent-cli install-extras --all # Install all extras
|
|
490
490
|
|
|
491
491
|
╭─ Arguments ────────────────────────────────────────────────────────────────────────────╮
|
|
492
492
|
│ extras [EXTRAS]... Extras to install │
|
|
493
493
|
╰────────────────────────────────────────────────────────────────────────────────────────╯
|
|
494
494
|
╭─ Options ──────────────────────────────────────────────────────────────────────────────╮
|
|
495
495
|
│ --list -l List available extras │
|
|
496
|
+
│ --all -a Install all available extras │
|
|
496
497
|
│ --help -h Show this message and exit. │
|
|
497
498
|
╰────────────────────────────────────────────────────────────────────────────────────────╯
|
|
498
499
|
|
|
@@ -88,7 +88,7 @@ agent_cli/dev/terminals/warp.py,sha256=j-Jvz_BbWYC3QfLrvl4CbDh03c9OGRFmuCzjyB2ud
|
|
|
88
88
|
agent_cli/dev/terminals/zellij.py,sha256=GnQnopimb9XH67CZGHjnbVWpVSWhaLCATGJizCT5TkY,2321
|
|
89
89
|
agent_cli/install/__init__.py,sha256=JQPrOrtdNd1Y1NmQDkb3Nmm1qdyn3kPjhQwy9D8ryjI,124
|
|
90
90
|
agent_cli/install/common.py,sha256=WvnmcjnFTW0d1HZrKVGzj5Tg3q8Txk_ZOdc4a1MBFWI,3121
|
|
91
|
-
agent_cli/install/extras.py,sha256=
|
|
91
|
+
agent_cli/install/extras.py,sha256=_WJxawBwhQ6zcIkLwaK080nvBDY1WhC7mdI9_b-EzyY,5339
|
|
92
92
|
agent_cli/install/hotkeys.py,sha256=bwGoPeEKK6VI-IrKU8Q0RLMW9smkDNU7CdqD3Nbsd-w,1626
|
|
93
93
|
agent_cli/install/services.py,sha256=2s_7ThxaElKCuomBYTn4Z36TF_o_arNeyJ4f8Wh4jEI,2912
|
|
94
94
|
agent_cli/memory/__init__.py,sha256=Q9lomqabThXFx-j_Yu3xKDyKLN4Odck92J6WDP53yUI,610
|
|
@@ -184,8 +184,8 @@ agent_cli/services/asr.py,sha256=V6SV-USnMhK-0aE-pneiktU4HpmLqenmMb-jZ-_74zU,169
|
|
|
184
184
|
agent_cli/services/llm.py,sha256=Kwdo6pbMYI9oykF-RBe1iaL3KsYrNWTLdRSioewmsGQ,7199
|
|
185
185
|
agent_cli/services/tts.py,sha256=exKo-55_670mx8dQOzVSZkv6aWYLv04SVmBcjOlD458,14772
|
|
186
186
|
agent_cli/services/wake_word.py,sha256=j6Z8rsGq_vAdRevy9fkXIgLZd9UWfrIsefmTreNmM0c,4575
|
|
187
|
-
agent_cli-0.66.
|
|
188
|
-
agent_cli-0.66.
|
|
189
|
-
agent_cli-0.66.
|
|
190
|
-
agent_cli-0.66.
|
|
191
|
-
agent_cli-0.66.
|
|
187
|
+
agent_cli-0.66.2.dist-info/METADATA,sha256=1h1lBgxnldp130ukwCNmIY0xC2Jg46dmTs3SKSPkXUE,155374
|
|
188
|
+
agent_cli-0.66.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
189
|
+
agent_cli-0.66.2.dist-info/entry_points.txt,sha256=FUv-fB2atLsPUk_RT4zqnZl1coz4_XHFwRALOKOF38s,97
|
|
190
|
+
agent_cli-0.66.2.dist-info/licenses/LICENSE,sha256=majJU6S9kC8R8bW39NVBHyv32Dq50FL6TDxECG2WVts,1068
|
|
191
|
+
agent_cli-0.66.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|