agent-cli 0.61.2__py3-none-any.whl → 0.70.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/_extras.json +13 -0
- agent_cli/_requirements/.gitkeep +0 -0
- agent_cli/_requirements/audio.txt +79 -0
- agent_cli/_requirements/faster-whisper.txt +215 -0
- agent_cli/_requirements/kokoro.txt +425 -0
- agent_cli/_requirements/llm.txt +183 -0
- agent_cli/_requirements/memory.txt +355 -0
- agent_cli/_requirements/mlx-whisper.txt +222 -0
- agent_cli/_requirements/piper.txt +176 -0
- agent_cli/_requirements/rag.txt +402 -0
- agent_cli/_requirements/server.txt +154 -0
- agent_cli/_requirements/speed.txt +77 -0
- agent_cli/_requirements/vad.txt +155 -0
- agent_cli/agents/assistant.py +3 -1
- agent_cli/agents/autocorrect.py +5 -2
- agent_cli/agents/chat.py +3 -1
- agent_cli/agents/memory/__init__.py +2 -1
- agent_cli/agents/memory/add.py +2 -0
- agent_cli/agents/memory/proxy.py +7 -12
- agent_cli/agents/rag_proxy.py +5 -10
- agent_cli/agents/speak.py +3 -1
- agent_cli/agents/transcribe.py +7 -2
- agent_cli/agents/transcribe_daemon.py +3 -1
- agent_cli/agents/voice_edit.py +3 -1
- agent_cli/cli.py +19 -3
- agent_cli/config_cmd.py +1 -0
- agent_cli/core/chroma.py +4 -4
- agent_cli/core/deps.py +177 -25
- agent_cli/core/openai_proxy.py +9 -4
- agent_cli/core/process.py +2 -2
- agent_cli/core/reranker.py +5 -4
- agent_cli/core/utils.py +5 -3
- agent_cli/core/vad.py +2 -1
- agent_cli/core/watch.py +8 -6
- agent_cli/dev/cli.py +31 -34
- agent_cli/dev/coding_agents/base.py +1 -2
- agent_cli/dev/skill/SKILL.md +141 -0
- agent_cli/dev/skill/examples.md +571 -0
- agent_cli/dev/worktree.py +53 -5
- agent_cli/docs_gen.py +12 -42
- agent_cli/install/__init__.py +1 -1
- agent_cli/install/extras.py +174 -0
- agent_cli/memory/__init__.py +1 -18
- agent_cli/memory/_files.py +4 -1
- agent_cli/memory/_indexer.py +3 -2
- agent_cli/memory/_ingest.py +6 -5
- agent_cli/memory/_retrieval.py +18 -8
- agent_cli/memory/_streaming.py +2 -2
- agent_cli/memory/api.py +1 -1
- agent_cli/memory/client.py +1 -1
- agent_cli/memory/engine.py +1 -1
- agent_cli/rag/__init__.py +0 -19
- agent_cli/rag/_indexer.py +3 -2
- agent_cli/rag/api.py +1 -0
- agent_cli/scripts/.runtime/.gitkeep +0 -0
- agent_cli/scripts/check_plugin_skill_sync.py +50 -0
- agent_cli/scripts/sync_extras.py +138 -0
- agent_cli/server/cli.py +26 -24
- agent_cli/server/common.py +3 -4
- agent_cli/server/tts/api.py +1 -1
- agent_cli/server/whisper/backends/faster_whisper.py +30 -23
- agent_cli/server/whisper/wyoming_handler.py +22 -27
- agent_cli/services/_wyoming_utils.py +4 -2
- agent_cli/services/asr.py +13 -3
- agent_cli/services/llm.py +2 -1
- agent_cli/services/tts.py +5 -2
- agent_cli/services/wake_word.py +6 -3
- {agent_cli-0.61.2.dist-info → agent_cli-0.70.2.dist-info}/METADATA +168 -73
- {agent_cli-0.61.2.dist-info → agent_cli-0.70.2.dist-info}/RECORD +72 -54
- {agent_cli-0.61.2.dist-info → agent_cli-0.70.2.dist-info}/WHEEL +1 -2
- agent_cli-0.61.2.dist-info/top_level.txt +0 -1
- {agent_cli-0.61.2.dist-info → agent_cli-0.70.2.dist-info}/entry_points.txt +0 -0
- {agent_cli-0.61.2.dist-info → agent_cli-0.70.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# This file was autogenerated by uv via the following command:
|
|
2
|
+
# uv export --extra vad --no-dev --no-emit-project --no-hashes
|
|
3
|
+
annotated-types==0.7.0
|
|
4
|
+
# via pydantic
|
|
5
|
+
anyio==4.12.1
|
|
6
|
+
# via httpx
|
|
7
|
+
certifi==2026.1.4
|
|
8
|
+
# via
|
|
9
|
+
# httpcore
|
|
10
|
+
# httpx
|
|
11
|
+
click==8.3.1
|
|
12
|
+
# via
|
|
13
|
+
# typer
|
|
14
|
+
# typer-slim
|
|
15
|
+
colorama==0.4.6 ; sys_platform == 'win32'
|
|
16
|
+
# via click
|
|
17
|
+
coloredlogs==15.0.1
|
|
18
|
+
# via onnxruntime
|
|
19
|
+
dotenv==0.9.9
|
|
20
|
+
# via agent-cli
|
|
21
|
+
filelock==3.20.3
|
|
22
|
+
# via torch
|
|
23
|
+
flatbuffers==25.12.19
|
|
24
|
+
# via onnxruntime
|
|
25
|
+
fsspec==2026.1.0
|
|
26
|
+
# via torch
|
|
27
|
+
h11==0.16.0
|
|
28
|
+
# via httpcore
|
|
29
|
+
httpcore==1.0.9
|
|
30
|
+
# via httpx
|
|
31
|
+
httpx==0.28.1
|
|
32
|
+
# via agent-cli
|
|
33
|
+
humanfriendly==10.0
|
|
34
|
+
# via coloredlogs
|
|
35
|
+
idna==3.11
|
|
36
|
+
# via
|
|
37
|
+
# anyio
|
|
38
|
+
# httpx
|
|
39
|
+
jinja2==3.1.6
|
|
40
|
+
# via torch
|
|
41
|
+
markdown-it-py==4.0.0
|
|
42
|
+
# via rich
|
|
43
|
+
markupsafe==3.0.3
|
|
44
|
+
# via jinja2
|
|
45
|
+
mdurl==0.1.2
|
|
46
|
+
# via markdown-it-py
|
|
47
|
+
mpmath==1.3.0
|
|
48
|
+
# via sympy
|
|
49
|
+
networkx==3.6.1
|
|
50
|
+
# via torch
|
|
51
|
+
numpy==2.3.5
|
|
52
|
+
# via onnxruntime
|
|
53
|
+
nvidia-cublas-cu12==12.8.4.1 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
54
|
+
# via
|
|
55
|
+
# nvidia-cudnn-cu12
|
|
56
|
+
# nvidia-cusolver-cu12
|
|
57
|
+
# torch
|
|
58
|
+
nvidia-cuda-cupti-cu12==12.8.90 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
59
|
+
# via torch
|
|
60
|
+
nvidia-cuda-nvrtc-cu12==12.8.93 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
61
|
+
# via torch
|
|
62
|
+
nvidia-cuda-runtime-cu12==12.8.90 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
63
|
+
# via torch
|
|
64
|
+
nvidia-cudnn-cu12==9.10.2.21 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
65
|
+
# via torch
|
|
66
|
+
nvidia-cufft-cu12==11.3.3.83 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
67
|
+
# via torch
|
|
68
|
+
nvidia-cufile-cu12==1.13.1.3 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
69
|
+
# via torch
|
|
70
|
+
nvidia-curand-cu12==10.3.9.90 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
71
|
+
# via torch
|
|
72
|
+
nvidia-cusolver-cu12==11.7.3.90 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
73
|
+
# via torch
|
|
74
|
+
nvidia-cusparse-cu12==12.5.8.93 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
75
|
+
# via
|
|
76
|
+
# nvidia-cusolver-cu12
|
|
77
|
+
# torch
|
|
78
|
+
nvidia-cusparselt-cu12==0.7.1 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
79
|
+
# via torch
|
|
80
|
+
nvidia-nccl-cu12==2.27.5 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
81
|
+
# via torch
|
|
82
|
+
nvidia-nvjitlink-cu12==12.8.93 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
83
|
+
# via
|
|
84
|
+
# nvidia-cufft-cu12
|
|
85
|
+
# nvidia-cusolver-cu12
|
|
86
|
+
# nvidia-cusparse-cu12
|
|
87
|
+
# torch
|
|
88
|
+
nvidia-nvshmem-cu12==3.3.20 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
89
|
+
# via torch
|
|
90
|
+
nvidia-nvtx-cu12==12.8.90 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
91
|
+
# via torch
|
|
92
|
+
onnxruntime==1.20.1
|
|
93
|
+
# via silero-vad
|
|
94
|
+
packaging==25.0
|
|
95
|
+
# via
|
|
96
|
+
# onnxruntime
|
|
97
|
+
# silero-vad
|
|
98
|
+
protobuf==6.33.4
|
|
99
|
+
# via onnxruntime
|
|
100
|
+
psutil==7.2.1 ; sys_platform == 'win32'
|
|
101
|
+
# via agent-cli
|
|
102
|
+
pydantic==2.12.5
|
|
103
|
+
# via agent-cli
|
|
104
|
+
pydantic-core==2.41.5
|
|
105
|
+
# via pydantic
|
|
106
|
+
pygments==2.19.2
|
|
107
|
+
# via rich
|
|
108
|
+
pyperclip==1.11.0
|
|
109
|
+
# via agent-cli
|
|
110
|
+
pyreadline3==3.5.4 ; sys_platform == 'win32'
|
|
111
|
+
# via humanfriendly
|
|
112
|
+
python-dotenv==1.2.1
|
|
113
|
+
# via dotenv
|
|
114
|
+
rich==14.2.0
|
|
115
|
+
# via
|
|
116
|
+
# agent-cli
|
|
117
|
+
# typer
|
|
118
|
+
# typer-slim
|
|
119
|
+
setproctitle==1.3.7
|
|
120
|
+
# via agent-cli
|
|
121
|
+
setuptools==80.9.0 ; python_full_version >= '3.12'
|
|
122
|
+
# via torch
|
|
123
|
+
shellingham==1.5.4
|
|
124
|
+
# via
|
|
125
|
+
# typer
|
|
126
|
+
# typer-slim
|
|
127
|
+
silero-vad==6.2.0
|
|
128
|
+
# via agent-cli
|
|
129
|
+
sympy==1.14.0
|
|
130
|
+
# via
|
|
131
|
+
# onnxruntime
|
|
132
|
+
# torch
|
|
133
|
+
torch==2.9.1
|
|
134
|
+
# via
|
|
135
|
+
# silero-vad
|
|
136
|
+
# torchaudio
|
|
137
|
+
torchaudio==2.9.1
|
|
138
|
+
# via silero-vad
|
|
139
|
+
triton==3.5.1 ; platform_machine == 'x86_64' and sys_platform == 'linux'
|
|
140
|
+
# via torch
|
|
141
|
+
typer==0.21.1
|
|
142
|
+
# via agent-cli
|
|
143
|
+
typer-slim==0.21.1
|
|
144
|
+
# via agent-cli
|
|
145
|
+
typing-extensions==4.15.0
|
|
146
|
+
# via
|
|
147
|
+
# anyio
|
|
148
|
+
# pydantic
|
|
149
|
+
# pydantic-core
|
|
150
|
+
# torch
|
|
151
|
+
# typer
|
|
152
|
+
# typer-slim
|
|
153
|
+
# typing-inspection
|
|
154
|
+
typing-inspection==0.4.2
|
|
155
|
+
# via pydantic
|
agent_cli/agents/assistant.py
CHANGED
|
@@ -41,6 +41,7 @@ from agent_cli.agents._voice_agent_common import (
|
|
|
41
41
|
from agent_cli.cli import app
|
|
42
42
|
from agent_cli.core import audio, process
|
|
43
43
|
from agent_cli.core.audio import setup_devices
|
|
44
|
+
from agent_cli.core.deps import requires_extras
|
|
44
45
|
from agent_cli.core.utils import (
|
|
45
46
|
InteractiveStopEvent,
|
|
46
47
|
maybe_live,
|
|
@@ -253,7 +254,8 @@ async def _async_main(
|
|
|
253
254
|
print_with_style("✨ Ready for next command...", style="green")
|
|
254
255
|
|
|
255
256
|
|
|
256
|
-
@app.command("assistant")
|
|
257
|
+
@app.command("assistant", rich_help_panel="Voice Commands")
|
|
258
|
+
@requires_extras("audio", "llm")
|
|
257
259
|
def assistant(
|
|
258
260
|
*,
|
|
259
261
|
# --- Provider Selection ---
|
agent_cli/agents/autocorrect.py
CHANGED
|
@@ -9,11 +9,11 @@ import sys
|
|
|
9
9
|
import time
|
|
10
10
|
from typing import TYPE_CHECKING
|
|
11
11
|
|
|
12
|
-
import pyperclip
|
|
13
12
|
import typer
|
|
14
13
|
|
|
15
14
|
from agent_cli import config, opts
|
|
16
15
|
from agent_cli.cli import app
|
|
16
|
+
from agent_cli.core.deps import requires_extras
|
|
17
17
|
from agent_cli.core.utils import (
|
|
18
18
|
console,
|
|
19
19
|
create_status,
|
|
@@ -117,6 +117,8 @@ def _display_result(
|
|
|
117
117
|
) -> None:
|
|
118
118
|
"""Handle output and clipboard copying based on desired verbosity."""
|
|
119
119
|
if clipboard:
|
|
120
|
+
import pyperclip # noqa: PLC0415
|
|
121
|
+
|
|
120
122
|
pyperclip.copy(corrected_text)
|
|
121
123
|
|
|
122
124
|
if simple_output:
|
|
@@ -208,7 +210,8 @@ async def _async_autocorrect(
|
|
|
208
210
|
sys.exit(1)
|
|
209
211
|
|
|
210
212
|
|
|
211
|
-
@app.command("autocorrect")
|
|
213
|
+
@app.command("autocorrect", rich_help_panel="Text Commands")
|
|
214
|
+
@requires_extras("llm")
|
|
212
215
|
def autocorrect(
|
|
213
216
|
*,
|
|
214
217
|
text: str | None = typer.Argument(
|
agent_cli/agents/chat.py
CHANGED
|
@@ -29,6 +29,7 @@ from agent_cli._tools import tools
|
|
|
29
29
|
from agent_cli.cli import app
|
|
30
30
|
from agent_cli.core import process
|
|
31
31
|
from agent_cli.core.audio import setup_devices
|
|
32
|
+
from agent_cli.core.deps import requires_extras
|
|
32
33
|
from agent_cli.core.utils import (
|
|
33
34
|
InteractiveStopEvent,
|
|
34
35
|
console,
|
|
@@ -373,7 +374,8 @@ async def _async_main(
|
|
|
373
374
|
raise
|
|
374
375
|
|
|
375
376
|
|
|
376
|
-
@app.command("chat")
|
|
377
|
+
@app.command("chat", rich_help_panel="Voice Commands")
|
|
378
|
+
@requires_extras("audio", "llm")
|
|
377
379
|
def chat(
|
|
378
380
|
*,
|
|
379
381
|
# --- Provider Selection ---
|
|
@@ -10,11 +10,12 @@ from agent_cli.core.process import set_process_title
|
|
|
10
10
|
memory_app = typer.Typer(
|
|
11
11
|
name="memory",
|
|
12
12
|
help="Memory system operations (add, proxy, etc.).",
|
|
13
|
+
add_completion=True,
|
|
13
14
|
rich_markup_mode="markdown",
|
|
14
15
|
no_args_is_help=True,
|
|
15
16
|
)
|
|
16
17
|
|
|
17
|
-
app.add_typer(memory_app, name="memory")
|
|
18
|
+
app.add_typer(memory_app, name="memory", rich_help_panel="Servers")
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
@memory_app.callback()
|
agent_cli/agents/memory/add.py
CHANGED
|
@@ -13,6 +13,7 @@ import typer
|
|
|
13
13
|
|
|
14
14
|
from agent_cli import opts
|
|
15
15
|
from agent_cli.agents.memory import memory_app
|
|
16
|
+
from agent_cli.core.deps import requires_extras
|
|
16
17
|
from agent_cli.core.utils import console, print_command_line_args
|
|
17
18
|
|
|
18
19
|
if TYPE_CHECKING:
|
|
@@ -110,6 +111,7 @@ def _write_memories(
|
|
|
110
111
|
|
|
111
112
|
|
|
112
113
|
@memory_app.command("add")
|
|
114
|
+
@requires_extras("memory")
|
|
113
115
|
def add(
|
|
114
116
|
memories: list[str] = typer.Argument( # noqa: B008
|
|
115
117
|
None,
|
agent_cli/agents/memory/proxy.py
CHANGED
|
@@ -10,10 +10,12 @@ from rich.logging import RichHandler
|
|
|
10
10
|
|
|
11
11
|
from agent_cli import constants, opts
|
|
12
12
|
from agent_cli.agents.memory import memory_app
|
|
13
|
-
from agent_cli.core.
|
|
13
|
+
from agent_cli.core.deps import requires_extras
|
|
14
|
+
from agent_cli.core.utils import console, print_command_line_args
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
@memory_app.command("proxy")
|
|
18
|
+
@requires_extras("memory")
|
|
17
19
|
def proxy(
|
|
18
20
|
memory_path: Path = typer.Option( # noqa: B008
|
|
19
21
|
"./memory_db",
|
|
@@ -103,17 +105,10 @@ def proxy(
|
|
|
103
105
|
if print_args:
|
|
104
106
|
print_command_line_args(locals())
|
|
105
107
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
from agent_cli.memory.api import create_app # noqa: PLC0415
|
|
111
|
-
except ImportError as exc:
|
|
112
|
-
print_error_message(
|
|
113
|
-
"Memory dependencies are not installed. Please install with "
|
|
114
|
-
"`pip install agent-cli[memory]` or `uv sync --extra memory`.",
|
|
115
|
-
)
|
|
116
|
-
raise typer.Exit(1) from exc
|
|
108
|
+
import uvicorn # noqa: PLC0415
|
|
109
|
+
|
|
110
|
+
from agent_cli.memory._files import ensure_store_dirs # noqa: PLC0415
|
|
111
|
+
from agent_cli.memory.api import create_app # noqa: PLC0415
|
|
117
112
|
|
|
118
113
|
logging.basicConfig(
|
|
119
114
|
level=log_level.upper(),
|
agent_cli/agents/rag_proxy.py
CHANGED
|
@@ -10,6 +10,7 @@ from rich.logging import RichHandler
|
|
|
10
10
|
|
|
11
11
|
from agent_cli import constants, opts
|
|
12
12
|
from agent_cli.cli import app
|
|
13
|
+
from agent_cli.core.deps import requires_extras
|
|
13
14
|
from agent_cli.core.utils import (
|
|
14
15
|
console,
|
|
15
16
|
print_command_line_args,
|
|
@@ -17,7 +18,8 @@ from agent_cli.core.utils import (
|
|
|
17
18
|
)
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
@app.command("rag-proxy")
|
|
21
|
+
@app.command("rag-proxy", rich_help_panel="Servers")
|
|
22
|
+
@requires_extras("rag")
|
|
21
23
|
def rag_proxy(
|
|
22
24
|
docs_folder: Path = typer.Option( # noqa: B008
|
|
23
25
|
"./rag_docs",
|
|
@@ -75,16 +77,9 @@ def rag_proxy(
|
|
|
75
77
|
logging.getLogger("chromadb").setLevel(logging.WARNING)
|
|
76
78
|
logging.getLogger("uvicorn.access").setLevel(logging.WARNING)
|
|
77
79
|
|
|
78
|
-
|
|
79
|
-
import uvicorn # noqa: PLC0415
|
|
80
|
+
import uvicorn # noqa: PLC0415
|
|
80
81
|
|
|
81
|
-
|
|
82
|
-
except ImportError as exc:
|
|
83
|
-
print_error_message(
|
|
84
|
-
"RAG dependencies are not installed. Please install with "
|
|
85
|
-
"`pip install agent-cli[rag]` or `uv sync --extra rag`.",
|
|
86
|
-
)
|
|
87
|
-
raise typer.Exit(1) from exc
|
|
82
|
+
from agent_cli.rag.api import create_app # noqa: PLC0415
|
|
88
83
|
|
|
89
84
|
docs_folder = docs_folder.resolve()
|
|
90
85
|
chroma_path = chroma_path.resolve()
|
agent_cli/agents/speak.py
CHANGED
|
@@ -14,6 +14,7 @@ from agent_cli import config, opts
|
|
|
14
14
|
from agent_cli.cli import app
|
|
15
15
|
from agent_cli.core import process
|
|
16
16
|
from agent_cli.core.audio import setup_devices
|
|
17
|
+
from agent_cli.core.deps import requires_extras
|
|
17
18
|
from agent_cli.core.utils import (
|
|
18
19
|
enable_json_mode,
|
|
19
20
|
get_clipboard_text,
|
|
@@ -79,7 +80,8 @@ async def _async_main(
|
|
|
79
80
|
return text
|
|
80
81
|
|
|
81
82
|
|
|
82
|
-
@app.command("speak")
|
|
83
|
+
@app.command("speak", rich_help_panel="Text Commands")
|
|
84
|
+
@requires_extras("audio")
|
|
83
85
|
def speak(
|
|
84
86
|
*,
|
|
85
87
|
text: str | None = typer.Argument(
|
agent_cli/agents/transcribe.py
CHANGED
|
@@ -12,13 +12,13 @@ from datetime import UTC, datetime, timedelta
|
|
|
12
12
|
from pathlib import Path # noqa: TC003
|
|
13
13
|
from typing import Any, TypedDict
|
|
14
14
|
|
|
15
|
-
import pyperclip
|
|
16
15
|
import typer
|
|
17
16
|
|
|
18
17
|
from agent_cli import config, opts
|
|
19
18
|
from agent_cli.cli import app
|
|
20
19
|
from agent_cli.core import process
|
|
21
20
|
from agent_cli.core.audio import setup_devices
|
|
21
|
+
from agent_cli.core.deps import requires_extras
|
|
22
22
|
from agent_cli.core.utils import (
|
|
23
23
|
enable_json_mode,
|
|
24
24
|
format_short_timedelta,
|
|
@@ -363,6 +363,8 @@ async def _async_main( # noqa: PLR0912, PLR0915, C901
|
|
|
363
363
|
)
|
|
364
364
|
clipboard_snapshot: str | None = None
|
|
365
365
|
if general_cfg.clipboard:
|
|
366
|
+
import pyperclip # noqa: PLC0415
|
|
367
|
+
|
|
366
368
|
clipboard_snapshot = pyperclip.paste()
|
|
367
369
|
pyperclip.copy(transcript)
|
|
368
370
|
LOGGER.info("Copied raw transcript to clipboard before LLM processing.")
|
|
@@ -444,6 +446,8 @@ async def _async_main( # noqa: PLR0912, PLR0915, C901
|
|
|
444
446
|
)
|
|
445
447
|
|
|
446
448
|
if general_cfg.clipboard:
|
|
449
|
+
import pyperclip # noqa: PLC0415
|
|
450
|
+
|
|
447
451
|
pyperclip.copy(transcript)
|
|
448
452
|
LOGGER.info("Copied transcript to clipboard.")
|
|
449
453
|
else:
|
|
@@ -460,7 +464,8 @@ async def _async_main( # noqa: PLR0912, PLR0915, C901
|
|
|
460
464
|
)
|
|
461
465
|
|
|
462
466
|
|
|
463
|
-
@app.command("transcribe")
|
|
467
|
+
@app.command("transcribe", rich_help_panel="Voice Commands")
|
|
468
|
+
@requires_extras("audio", "llm")
|
|
464
469
|
def transcribe( # noqa: PLR0912
|
|
465
470
|
*,
|
|
466
471
|
extra_instructions: str | None = typer.Option(
|
|
@@ -25,6 +25,7 @@ from agent_cli.cli import app
|
|
|
25
25
|
from agent_cli.core import process
|
|
26
26
|
from agent_cli.core.audio import open_audio_stream, setup_devices, setup_input_stream
|
|
27
27
|
from agent_cli.core.audio_format import check_ffmpeg_available, save_audio_as_mp3
|
|
28
|
+
from agent_cli.core.deps import requires_extras
|
|
28
29
|
from agent_cli.core.utils import (
|
|
29
30
|
console,
|
|
30
31
|
print_command_line_args,
|
|
@@ -286,7 +287,8 @@ async def _daemon_loop(cfg: DaemonConfig) -> None: # noqa: PLR0912, PLR0915
|
|
|
286
287
|
await asyncio.wait(background_tasks, timeout=2.0)
|
|
287
288
|
|
|
288
289
|
|
|
289
|
-
@app.command("transcribe-daemon")
|
|
290
|
+
@app.command("transcribe-daemon", rich_help_panel="Voice Commands")
|
|
291
|
+
@requires_extras("audio", "vad", "llm")
|
|
290
292
|
def transcribe_daemon( # noqa: PLR0912
|
|
291
293
|
*,
|
|
292
294
|
# Daemon-specific options
|
agent_cli/agents/voice_edit.py
CHANGED
|
@@ -47,6 +47,7 @@ from agent_cli.agents._voice_agent_common import (
|
|
|
47
47
|
from agent_cli.cli import app
|
|
48
48
|
from agent_cli.core import process
|
|
49
49
|
from agent_cli.core.audio import setup_devices
|
|
50
|
+
from agent_cli.core.deps import requires_extras
|
|
50
51
|
from agent_cli.core.utils import (
|
|
51
52
|
enable_json_mode,
|
|
52
53
|
get_clipboard_text,
|
|
@@ -172,7 +173,8 @@ async def _async_main(
|
|
|
172
173
|
)
|
|
173
174
|
|
|
174
175
|
|
|
175
|
-
@app.command("voice-edit")
|
|
176
|
+
@app.command("voice-edit", rich_help_panel="Voice Commands")
|
|
177
|
+
@requires_extras("audio", "llm")
|
|
176
178
|
def voice_edit(
|
|
177
179
|
*,
|
|
178
180
|
# --- Provider Selection ---
|
agent_cli/cli.py
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import sys
|
|
6
|
+
from pathlib import Path
|
|
5
7
|
from typing import Annotated
|
|
6
8
|
|
|
7
9
|
import typer
|
|
10
|
+
from rich.table import Table
|
|
8
11
|
|
|
9
12
|
from . import __version__
|
|
10
13
|
from .config import load_config, normalize_provider_defaults
|
|
@@ -14,15 +17,28 @@ from .core.utils import console
|
|
|
14
17
|
app = typer.Typer(
|
|
15
18
|
name="agent-cli",
|
|
16
19
|
help="A suite of AI-powered command-line tools for text correction, audio transcription, and voice assistance.",
|
|
17
|
-
add_completion=True,
|
|
18
20
|
context_settings={"help_option_names": ["-h", "--help"]},
|
|
21
|
+
add_completion=True,
|
|
19
22
|
rich_markup_mode="markdown",
|
|
23
|
+
no_args_is_help=True,
|
|
20
24
|
)
|
|
21
25
|
|
|
22
26
|
|
|
23
27
|
def _version_callback(value: bool) -> None:
|
|
24
28
|
if value:
|
|
25
|
-
|
|
29
|
+
path = Path(__file__).parent
|
|
30
|
+
data = [
|
|
31
|
+
("agent-cli version", __version__),
|
|
32
|
+
("agent-cli location", str(path)),
|
|
33
|
+
("Python version", sys.version),
|
|
34
|
+
("Python executable", sys.executable),
|
|
35
|
+
]
|
|
36
|
+
table = Table(show_header=False)
|
|
37
|
+
table.add_column("Property", style="cyan")
|
|
38
|
+
table.add_column("Value", style="magenta")
|
|
39
|
+
for prop, val in data:
|
|
40
|
+
table.add_row(prop, val)
|
|
41
|
+
console.print(table)
|
|
26
42
|
raise typer.Exit
|
|
27
43
|
|
|
28
44
|
|
|
@@ -86,5 +102,5 @@ from .agents import ( # noqa: E402, F401
|
|
|
86
102
|
voice_edit,
|
|
87
103
|
)
|
|
88
104
|
from .dev import cli as dev_cli # noqa: E402, F401
|
|
89
|
-
from .install import hotkeys, services # noqa: E402, F401
|
|
105
|
+
from .install import extras, hotkeys, services # noqa: E402, F401
|
|
90
106
|
from .server import cli as server_cli # noqa: E402, F401
|
agent_cli/config_cmd.py
CHANGED
agent_cli/core/chroma.py
CHANGED
|
@@ -4,10 +4,6 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing import TYPE_CHECKING, Any
|
|
6
6
|
|
|
7
|
-
import chromadb
|
|
8
|
-
from chromadb.config import Settings
|
|
9
|
-
from chromadb.utils import embedding_functions
|
|
10
|
-
|
|
11
7
|
from agent_cli.constants import DEFAULT_OPENAI_EMBEDDING_MODEL
|
|
12
8
|
|
|
13
9
|
if TYPE_CHECKING:
|
|
@@ -28,6 +24,10 @@ def init_collection(
|
|
|
28
24
|
subdir: str | None = None,
|
|
29
25
|
) -> Collection:
|
|
30
26
|
"""Initialize a Chroma collection with OpenAI-compatible embeddings."""
|
|
27
|
+
import chromadb # noqa: PLC0415
|
|
28
|
+
from chromadb.config import Settings # noqa: PLC0415
|
|
29
|
+
from chromadb.utils import embedding_functions # noqa: PLC0415
|
|
30
|
+
|
|
31
31
|
target_path = persistence_path / subdir if subdir else persistence_path
|
|
32
32
|
target_path.mkdir(parents=True, exist_ok=True)
|
|
33
33
|
client = chromadb.PersistentClient(
|