agent-cli 0.61.5__py3-none-any.whl → 0.62.0__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.
@@ -253,7 +253,7 @@ async def _async_main(
253
253
  print_with_style("✨ Ready for next command...", style="green")
254
254
 
255
255
 
256
- @app.command("assistant")
256
+ @app.command("assistant", rich_help_panel="Voice Commands")
257
257
  def assistant(
258
258
  *,
259
259
  # --- Provider Selection ---
@@ -208,7 +208,7 @@ async def _async_autocorrect(
208
208
  sys.exit(1)
209
209
 
210
210
 
211
- @app.command("autocorrect")
211
+ @app.command("autocorrect", rich_help_panel="Text Commands")
212
212
  def autocorrect(
213
213
  *,
214
214
  text: str | None = typer.Argument(
agent_cli/agents/chat.py CHANGED
@@ -373,7 +373,7 @@ async def _async_main(
373
373
  raise
374
374
 
375
375
 
376
- @app.command("chat")
376
+ @app.command("chat", rich_help_panel="Voice Commands")
377
377
  def chat(
378
378
  *,
379
379
  # --- Provider Selection ---
@@ -14,7 +14,7 @@ memory_app = typer.Typer(
14
14
  no_args_is_help=True,
15
15
  )
16
16
 
17
- app.add_typer(memory_app, name="memory")
17
+ app.add_typer(memory_app, name="memory", rich_help_panel="Servers")
18
18
 
19
19
 
20
20
  @memory_app.callback()
@@ -17,7 +17,7 @@ from agent_cli.core.utils import (
17
17
  )
18
18
 
19
19
 
20
- @app.command("rag-proxy")
20
+ @app.command("rag-proxy", rich_help_panel="Servers")
21
21
  def rag_proxy(
22
22
  docs_folder: Path = typer.Option( # noqa: B008
23
23
  "./rag_docs",
agent_cli/agents/speak.py CHANGED
@@ -79,7 +79,7 @@ async def _async_main(
79
79
  return text
80
80
 
81
81
 
82
- @app.command("speak")
82
+ @app.command("speak", rich_help_panel="Text Commands")
83
83
  def speak(
84
84
  *,
85
85
  text: str | None = typer.Argument(
@@ -460,7 +460,7 @@ async def _async_main( # noqa: PLR0912, PLR0915, C901
460
460
  )
461
461
 
462
462
 
463
- @app.command("transcribe")
463
+ @app.command("transcribe", rich_help_panel="Voice Commands")
464
464
  def transcribe( # noqa: PLR0912
465
465
  *,
466
466
  extra_instructions: str | None = typer.Option(
@@ -286,7 +286,7 @@ async def _daemon_loop(cfg: DaemonConfig) -> None: # noqa: PLR0912, PLR0915
286
286
  await asyncio.wait(background_tasks, timeout=2.0)
287
287
 
288
288
 
289
- @app.command("transcribe-daemon")
289
+ @app.command("transcribe-daemon", rich_help_panel="Voice Commands")
290
290
  def transcribe_daemon( # noqa: PLR0912
291
291
  *,
292
292
  # Daemon-specific options
@@ -172,7 +172,7 @@ async def _async_main(
172
172
  )
173
173
 
174
174
 
175
- @app.command("voice-edit")
175
+ @app.command("voice-edit", rich_help_panel="Voice Commands")
176
176
  def voice_edit(
177
177
  *,
178
178
  # --- Provider Selection ---
agent_cli/dev/cli.py CHANGED
@@ -122,7 +122,7 @@ app = typer.Typer(
122
122
  rich_markup_mode="markdown",
123
123
  no_args_is_help=True,
124
124
  )
125
- main_app.add_typer(app, name="dev")
125
+ main_app.add_typer(app, name="dev", rich_help_panel="Development")
126
126
 
127
127
 
128
128
  @app.callback()
agent_cli/dev/worktree.py CHANGED
@@ -55,6 +55,15 @@ def is_git_repo(path: Path | None = None) -> bool:
55
55
  return False
56
56
 
57
57
 
58
+ def has_origin_remote(path: Path | None = None) -> bool:
59
+ """Check if the repository has an 'origin' remote configured."""
60
+ try:
61
+ result = _run_git("remote", "get-url", "origin", cwd=path, check=False)
62
+ return result.returncode == 0
63
+ except Exception:
64
+ return False
65
+
66
+
58
67
  def get_repo_root(path: Path | None = None) -> Path | None:
59
68
  """Get the root directory of the git repository."""
60
69
  try:
@@ -461,6 +470,35 @@ def _init_submodules(
461
470
  )
462
471
 
463
472
 
473
+ def _pull_lfs(
474
+ worktree_path: Path,
475
+ *,
476
+ on_log: Callable[[str], None] | None = None,
477
+ capture_output: bool = True,
478
+ ) -> None:
479
+ """Pull Git LFS files in a worktree if LFS is used.
480
+
481
+ Evidence: https://git-lfs.com/ - `git lfs pull` fetches LFS objects.
482
+ This is a no-op if LFS is not used or files are already present.
483
+ """
484
+ # Check if .gitattributes contains LFS filters
485
+ gitattributes = worktree_path / ".gitattributes"
486
+ if not gitattributes.exists():
487
+ return
488
+
489
+ if "filter=lfs" not in gitattributes.read_text():
490
+ return
491
+
492
+ # Check if git-lfs is installed
493
+ if not shutil.which("git-lfs"):
494
+ return
495
+
496
+ if on_log:
497
+ on_log("Pulling Git LFS files...")
498
+
499
+ _run_git("lfs", "pull", cwd=worktree_path, check=False, capture_output=capture_output)
500
+
501
+
464
502
  def _add_worktree(
465
503
  branch_name: str,
466
504
  worktree_path: Path,
@@ -586,8 +624,11 @@ def create_worktree(
586
624
  # Create base directory if needed
587
625
  base_dir.mkdir(parents=True, exist_ok=True)
588
626
 
589
- # Fetch latest refs
590
- if fetch:
627
+ # Check if origin remote exists
628
+ origin_exists = has_origin_remote(repo_root)
629
+
630
+ # Fetch latest refs (only if origin exists)
631
+ if fetch and origin_exists:
591
632
  if on_log:
592
633
  on_log("Running: git fetch origin")
593
634
  _run_git("fetch", "origin", cwd=repo_root, check=False, capture_output=capture_output)
@@ -596,10 +637,10 @@ def create_worktree(
596
637
  from_ref_explicit = from_ref is not None
597
638
 
598
639
  # Determine the reference to create from
599
- # Use origin/{branch} to ensure we're using the freshly-fetched remote ref,
600
- # not a potentially stale local branch
640
+ # Use origin/{branch} if origin exists, otherwise use local branch
601
641
  if from_ref is None:
602
- from_ref = f"origin/{get_default_branch(repo_root)}"
642
+ default_branch = get_default_branch(repo_root)
643
+ from_ref = f"origin/{default_branch}" if origin_exists else default_branch
603
644
 
604
645
  # Check if branch exists remotely or locally
605
646
  remote_exists, local_exists = _check_branch_exists(branch_name, repo_root)
@@ -634,6 +675,13 @@ def create_worktree(
634
675
  capture_output=capture_output,
635
676
  )
636
677
 
678
+ # Pull Git LFS files if the repo uses LFS
679
+ _pull_lfs(
680
+ worktree_path,
681
+ on_log=on_log,
682
+ capture_output=capture_output,
683
+ )
684
+
637
685
  return CreateWorktreeResult(
638
686
  success=True,
639
687
  path=worktree_path,
agent_cli/server/cli.py CHANGED
@@ -34,7 +34,7 @@ app = typer.Typer(
34
34
  rich_markup_mode="markdown",
35
35
  no_args_is_help=True,
36
36
  )
37
- main_app.add_typer(app, name="server")
37
+ main_app.add_typer(app, name="server", rich_help_panel="Servers")
38
38
 
39
39
 
40
40
  @app.callback()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-cli
3
- Version: 0.61.5
3
+ Version: 0.62.0
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>
@@ -128,7 +128,7 @@ Since then I have expanded the tool with many more features, all focused on loca
128
128
  - **[`memory`](docs/commands/memory.md)**: Long-term memory system with `memory proxy` and `memory add`.
129
129
  - **[`rag-proxy`](docs/commands/rag-proxy.md)**: RAG proxy server for chatting with your documents.
130
130
  - **[`dev`](docs/commands/dev.md)**: Parallel development with git worktrees and AI coding agents.
131
- - **[`server`](docs/commands/server.md)**: Local ASR and TTS servers with dual-protocol (Wyoming & OpenAI), TTL-based memory management, and multi-platform acceleration. Whisper uses MLX on Apple Silicon or Faster Whisper on Linux/CUDA. TTS supports Kokoro (GPU) or Piper (CPU).
131
+ - **[`server`](docs/commands/server/index.md)**: Local ASR and TTS servers with dual-protocol (Wyoming & OpenAI), TTL-based memory management, and multi-platform acceleration. Whisper uses MLX on Apple Silicon or Faster Whisper on Linux/CUDA. TTS supports Kokoro (GPU) or Piper (CPU).
132
132
  - **[`transcribe-daemon`](docs/commands/transcribe-daemon.md)**: Continuous background transcription with VAD. Install with `uv tool install "agent-cli[vad]"`.
133
133
 
134
134
  ## Quick Start
@@ -389,7 +389,7 @@ Our installation scripts automatically handle all dependencies:
389
389
  |---------|---------|-----------------|
390
390
  | **[Ollama](https://ollama.ai/)** | Local LLM for text processing | ✅ Yes, with default model |
391
391
  | **[Wyoming Faster Whisper](https://github.com/rhasspy/wyoming-faster-whisper)** | Speech-to-text | ✅ Yes, via `uvx` |
392
- | **[`agent-cli server whisper`](docs/commands/server.md#whisper)** | Speech-to-text (alternative) | ✅ Built-in, `pip install "agent-cli[whisper]"` |
392
+ | **[`agent-cli server whisper`](docs/commands/server/whisper.md)** | Speech-to-text (alternative) | ✅ Built-in, `pip install "agent-cli[whisper]"` |
393
393
  | **[Wyoming Piper](https://github.com/rhasspy/wyoming-piper)** | Text-to-speech | ✅ Yes, via `uvx` |
394
394
  | **[Kokoro-FastAPI](https://github.com/remsky/Kokoro-FastAPI)** | Premium TTS (optional) | ⚙️ Can be added later |
395
395
  | **[Wyoming openWakeWord](https://github.com/rhasspy/wyoming-openwakeword)** | Wake word detection | ✅ Yes, for `assistant` |
@@ -12,15 +12,15 @@ agent_cli/opts.py,sha256=qMK_mLxzGAbX7C2IYuCFvOkLgaxCCMO66I9ps8AdrYo,12114
12
12
  agent_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  agent_cli/agents/__init__.py,sha256=c1rnncDW5pBvP6BiLzFVpLWDNZzFRaUA7-a97avFVAs,321
14
14
  agent_cli/agents/_voice_agent_common.py,sha256=PUAztW84Xf9U7d0C_K5cL7I8OANIE1H6M8dFD_cRqps,4360
15
- agent_cli/agents/assistant.py,sha256=kDlKr2lksG2CuIs0QxtMlgJ9a5G29fCOf-rW3t88l8M,13931
16
- agent_cli/agents/autocorrect.py,sha256=9odC5vNcAIZ_2IFmd8FN1x9gXrAv70HD0mxV0HiB2HU,8859
17
- agent_cli/agents/chat.py,sha256=QRCKh_GRIzivM0lH7i-_CBMjCTPR41tqk6TVQc10H4g,17142
18
- agent_cli/agents/rag_proxy.py,sha256=KboqLvSEAHn6iCCCA-dtrY67XSx30CXrHX9bcWWS6W0,4600
19
- agent_cli/agents/speak.py,sha256=yRrID1lp50XzhUwHBTmUzCNYCWlyy6MybMMCoxYtl3g,6994
20
- agent_cli/agents/transcribe.py,sha256=93-3OFgm9f0KWLIYXSptKY8TGu4t6xSv7r6BDwZ7ncA,24458
21
- agent_cli/agents/transcribe_daemon.py,sha256=mWjqqUTdTTSQn7_i8MFZ5SyoLpMu8Y3232jzQQmJVYI,17546
22
- agent_cli/agents/voice_edit.py,sha256=ovVhOQzWXBqFBZx23Odvv5-0PasxjeQwTccOcNat4RE,11022
23
- agent_cli/agents/memory/__init__.py,sha256=O-7ZPY5H-EV1lWy1LHTLeyXaortfWIzl3z_Ic4GcmTE,753
15
+ agent_cli/agents/assistant.py,sha256=BMF693kUZxM7u7mcI0nVua0EpqFcGlby2cMMZeLT7hY,13965
16
+ agent_cli/agents/autocorrect.py,sha256=R1ZftWDBXbdWCpJUz5JZnUx0u-9ceAJsOxx-yZWW2Ew,8892
17
+ agent_cli/agents/chat.py,sha256=UVuCCb0vTOgKayDUeOfffRw_UeNykXpcQYa3WuWG64s,17176
18
+ agent_cli/agents/rag_proxy.py,sha256=GuoPiQy3A6mgpYud-Ym5XQLRjA5d4cbvGCnnqxF968A,4627
19
+ agent_cli/agents/speak.py,sha256=xTpY1hmAo4Z_5T1fZIJPTZz7tUbkQG12EYAMX_XsaRg,7027
20
+ agent_cli/agents/transcribe.py,sha256=S-nO7hVRsDDO2P-WAIDXvqhdQT9lNKfw3nHjgZmhGxk,24492
21
+ agent_cli/agents/transcribe_daemon.py,sha256=_xlOvNj7FACN9Yq6w-oXmnh5Iciv7ZiZcd-EamhwlWc,17580
22
+ agent_cli/agents/voice_edit.py,sha256=Tcb5vRLIMs26vGBpTOhcg0lbCVUGfxwz1CS0o299_LM,11056
23
+ agent_cli/agents/memory/__init__.py,sha256=gW-0NGksjxTKkSjk4PzlXZIiAoF0sS2mFrRdeGVITf8,780
24
24
  agent_cli/agents/memory/add.py,sha256=VkNd8es2llqTl4TdSAvXXz2G3BmIbWWvhXPwU5JrNnk,6135
25
25
  agent_cli/agents/memory/proxy.py,sha256=SC4aTv8EYM2e6UOnoU-9DFMUwiIK7PapLQc0IIcETbE,6550
26
26
  agent_cli/core/__init__.py,sha256=c_knH7u9QgjsfMIil9NP4bVizHawLUMYoQWU4H9vMlQ,46
@@ -37,10 +37,10 @@ agent_cli/core/utils.py,sha256=MHttXeGiM9qGUNxK0s6vAHthh033TDjaruqocdtMMFY,16802
37
37
  agent_cli/core/vad.py,sha256=67-EBjY-pTOf61VhrjVdDXgaNIBwWFFFccYth_1rQmg,6569
38
38
  agent_cli/core/watch.py,sha256=MKgGxxMe0yLlu78-XXqO4ferCpu_ljNr4MAzOMDsuuo,1951
39
39
  agent_cli/dev/__init__.py,sha256=doTYiUFEBpnOxsQA69HQP9AA4QHBN0DjuHSTGRq5Xbg,551
40
- agent_cli/dev/cli.py,sha256=NzYiIEYc_v7w2KEsSYGWOnNKSnXCaO6hihbfP5XKqJY,51192
40
+ agent_cli/dev/cli.py,sha256=dQwLqrAwLUhg7iAFmlMfdMS60W-WjrWWDD01yxFqrpU,51223
41
41
  agent_cli/dev/project.py,sha256=wJMGKTK1rmw8letrV6l6wcLU1fkQQDjCSEixAnsvyaY,18971
42
42
  agent_cli/dev/registry.py,sha256=c6t3ClyRFPvU4GGXJT79-D-qV4FqY7W_7P-tLT7LKZs,1887
43
- agent_cli/dev/worktree.py,sha256=j0pZvoKDcCy9Jw_-L5DEM3Qk6NxqjwZ8uczT1ZK7rec,25476
43
+ agent_cli/dev/worktree.py,sha256=Yw8jlhkf8BeKFc6pPEazGXnUIvryvYwbUmYxTluXILs,26916
44
44
  agent_cli/dev/coding_agents/__init__.py,sha256=f2SjWB7HwbiW0IDcJmGFFYal1-oNwBNEckdcni5Rf7s,360
45
45
  agent_cli/dev/coding_agents/aider.py,sha256=7iAZj7DG1E3nTw7cJxT05r5ZSzE8EWems1YRi1VpfLg,605
46
46
  agent_cli/dev/coding_agents/base.py,sha256=gMpSHItqjHITomVwHHPaxbZk6TDf0VbvZfVYtt5ptEo,5822
@@ -140,7 +140,7 @@ agent_cli/scripts/nvidia-asr-server/server.py,sha256=kPNQIVF3exblvqMtIVk38Y6sZy2
140
140
  agent_cli/scripts/nvidia-asr-server/shell.nix,sha256=IT20j5YNj_wc7MdXi7ndogGodDNSGwyq8G0bNoZEpmg,1003
141
141
  agent_cli/scripts/nvidia-asr-server/uv.lock,sha256=5WWaqWOuV_moMPC-LIZK-A-Y5oaHr1tUn_vbR-IupzY,728608
142
142
  agent_cli/server/__init__.py,sha256=NZuJHlLHck9KWrepNZHrJONptYCQI9P-uTqknSFI5Ds,71
143
- agent_cli/server/cli.py,sha256=8MSoRwpuc_UdU3bwkNcfQfxQvQvR0juTuEjR9C_3SJ0,22819
143
+ agent_cli/server/cli.py,sha256=Oi-Ca54YusJijOp7TSl4a_9pOeIOKrgZE3Ex833ehis,22846
144
144
  agent_cli/server/common.py,sha256=fD2AZdM716TXcz1T4ZDPpPaKynVOEjbVC1LDDloDmDo,6463
145
145
  agent_cli/server/model_manager.py,sha256=93l_eeZeqnPALyDIK24or61tvded9TbM8tnde0okVjY,9225
146
146
  agent_cli/server/model_registry.py,sha256=KrRV1XxbFYuXu5rJlHFh6PTl_2BKiWnWsaNrf-0c6wQ,6988
@@ -172,8 +172,8 @@ agent_cli/services/asr.py,sha256=V6SV-USnMhK-0aE-pneiktU4HpmLqenmMb-jZ-_74zU,169
172
172
  agent_cli/services/llm.py,sha256=Kwdo6pbMYI9oykF-RBe1iaL3KsYrNWTLdRSioewmsGQ,7199
173
173
  agent_cli/services/tts.py,sha256=exKo-55_670mx8dQOzVSZkv6aWYLv04SVmBcjOlD458,14772
174
174
  agent_cli/services/wake_word.py,sha256=j6Z8rsGq_vAdRevy9fkXIgLZd9UWfrIsefmTreNmM0c,4575
175
- agent_cli-0.61.5.dist-info/METADATA,sha256=WxLELZ247ybi-yyN25vZkJCEG5MpiGMx7KvXiOXNvoo,151903
176
- agent_cli-0.61.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
177
- agent_cli-0.61.5.dist-info/entry_points.txt,sha256=FUv-fB2atLsPUk_RT4zqnZl1coz4_XHFwRALOKOF38s,97
178
- agent_cli-0.61.5.dist-info/licenses/LICENSE,sha256=majJU6S9kC8R8bW39NVBHyv32Dq50FL6TDxECG2WVts,1068
179
- agent_cli-0.61.5.dist-info/RECORD,,
175
+ agent_cli-0.62.0.dist-info/METADATA,sha256=9NRk688EZxkuThkRJOahxw-ZH6Y2yQsVHuYMpK5Qm2A,151909
176
+ agent_cli-0.62.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
177
+ agent_cli-0.62.0.dist-info/entry_points.txt,sha256=FUv-fB2atLsPUk_RT4zqnZl1coz4_XHFwRALOKOF38s,97
178
+ agent_cli-0.62.0.dist-info/licenses/LICENSE,sha256=majJU6S9kC8R8bW39NVBHyv32Dq50FL6TDxECG2WVts,1068
179
+ agent_cli-0.62.0.dist-info/RECORD,,