agent-cli 0.70.5__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.
Files changed (196) hide show
  1. agent_cli/__init__.py +5 -0
  2. agent_cli/__main__.py +6 -0
  3. agent_cli/_extras.json +14 -0
  4. agent_cli/_requirements/.gitkeep +0 -0
  5. agent_cli/_requirements/audio.txt +79 -0
  6. agent_cli/_requirements/faster-whisper.txt +215 -0
  7. agent_cli/_requirements/kokoro.txt +425 -0
  8. agent_cli/_requirements/llm.txt +183 -0
  9. agent_cli/_requirements/memory.txt +355 -0
  10. agent_cli/_requirements/mlx-whisper.txt +222 -0
  11. agent_cli/_requirements/piper.txt +176 -0
  12. agent_cli/_requirements/rag.txt +402 -0
  13. agent_cli/_requirements/server.txt +154 -0
  14. agent_cli/_requirements/speed.txt +77 -0
  15. agent_cli/_requirements/vad.txt +155 -0
  16. agent_cli/_requirements/wyoming.txt +71 -0
  17. agent_cli/_tools.py +368 -0
  18. agent_cli/agents/__init__.py +23 -0
  19. agent_cli/agents/_voice_agent_common.py +136 -0
  20. agent_cli/agents/assistant.py +383 -0
  21. agent_cli/agents/autocorrect.py +284 -0
  22. agent_cli/agents/chat.py +496 -0
  23. agent_cli/agents/memory/__init__.py +31 -0
  24. agent_cli/agents/memory/add.py +190 -0
  25. agent_cli/agents/memory/proxy.py +160 -0
  26. agent_cli/agents/rag_proxy.py +128 -0
  27. agent_cli/agents/speak.py +209 -0
  28. agent_cli/agents/transcribe.py +671 -0
  29. agent_cli/agents/transcribe_daemon.py +499 -0
  30. agent_cli/agents/voice_edit.py +291 -0
  31. agent_cli/api.py +22 -0
  32. agent_cli/cli.py +106 -0
  33. agent_cli/config.py +503 -0
  34. agent_cli/config_cmd.py +307 -0
  35. agent_cli/constants.py +27 -0
  36. agent_cli/core/__init__.py +1 -0
  37. agent_cli/core/audio.py +461 -0
  38. agent_cli/core/audio_format.py +299 -0
  39. agent_cli/core/chroma.py +88 -0
  40. agent_cli/core/deps.py +191 -0
  41. agent_cli/core/openai_proxy.py +139 -0
  42. agent_cli/core/process.py +195 -0
  43. agent_cli/core/reranker.py +120 -0
  44. agent_cli/core/sse.py +87 -0
  45. agent_cli/core/transcription_logger.py +70 -0
  46. agent_cli/core/utils.py +526 -0
  47. agent_cli/core/vad.py +175 -0
  48. agent_cli/core/watch.py +65 -0
  49. agent_cli/dev/__init__.py +14 -0
  50. agent_cli/dev/cli.py +1588 -0
  51. agent_cli/dev/coding_agents/__init__.py +19 -0
  52. agent_cli/dev/coding_agents/aider.py +24 -0
  53. agent_cli/dev/coding_agents/base.py +167 -0
  54. agent_cli/dev/coding_agents/claude.py +39 -0
  55. agent_cli/dev/coding_agents/codex.py +24 -0
  56. agent_cli/dev/coding_agents/continue_dev.py +15 -0
  57. agent_cli/dev/coding_agents/copilot.py +24 -0
  58. agent_cli/dev/coding_agents/cursor_agent.py +48 -0
  59. agent_cli/dev/coding_agents/gemini.py +28 -0
  60. agent_cli/dev/coding_agents/opencode.py +15 -0
  61. agent_cli/dev/coding_agents/registry.py +49 -0
  62. agent_cli/dev/editors/__init__.py +19 -0
  63. agent_cli/dev/editors/base.py +89 -0
  64. agent_cli/dev/editors/cursor.py +15 -0
  65. agent_cli/dev/editors/emacs.py +46 -0
  66. agent_cli/dev/editors/jetbrains.py +56 -0
  67. agent_cli/dev/editors/nano.py +31 -0
  68. agent_cli/dev/editors/neovim.py +33 -0
  69. agent_cli/dev/editors/registry.py +59 -0
  70. agent_cli/dev/editors/sublime.py +20 -0
  71. agent_cli/dev/editors/vim.py +42 -0
  72. agent_cli/dev/editors/vscode.py +15 -0
  73. agent_cli/dev/editors/zed.py +20 -0
  74. agent_cli/dev/project.py +568 -0
  75. agent_cli/dev/registry.py +52 -0
  76. agent_cli/dev/skill/SKILL.md +141 -0
  77. agent_cli/dev/skill/examples.md +571 -0
  78. agent_cli/dev/terminals/__init__.py +19 -0
  79. agent_cli/dev/terminals/apple_terminal.py +82 -0
  80. agent_cli/dev/terminals/base.py +56 -0
  81. agent_cli/dev/terminals/gnome.py +51 -0
  82. agent_cli/dev/terminals/iterm2.py +84 -0
  83. agent_cli/dev/terminals/kitty.py +77 -0
  84. agent_cli/dev/terminals/registry.py +48 -0
  85. agent_cli/dev/terminals/tmux.py +58 -0
  86. agent_cli/dev/terminals/warp.py +132 -0
  87. agent_cli/dev/terminals/zellij.py +78 -0
  88. agent_cli/dev/worktree.py +856 -0
  89. agent_cli/docs_gen.py +417 -0
  90. agent_cli/example-config.toml +185 -0
  91. agent_cli/install/__init__.py +5 -0
  92. agent_cli/install/common.py +89 -0
  93. agent_cli/install/extras.py +174 -0
  94. agent_cli/install/hotkeys.py +48 -0
  95. agent_cli/install/services.py +87 -0
  96. agent_cli/memory/__init__.py +7 -0
  97. agent_cli/memory/_files.py +250 -0
  98. agent_cli/memory/_filters.py +63 -0
  99. agent_cli/memory/_git.py +157 -0
  100. agent_cli/memory/_indexer.py +142 -0
  101. agent_cli/memory/_ingest.py +408 -0
  102. agent_cli/memory/_persistence.py +182 -0
  103. agent_cli/memory/_prompt.py +91 -0
  104. agent_cli/memory/_retrieval.py +294 -0
  105. agent_cli/memory/_store.py +169 -0
  106. agent_cli/memory/_streaming.py +44 -0
  107. agent_cli/memory/_tasks.py +48 -0
  108. agent_cli/memory/api.py +113 -0
  109. agent_cli/memory/client.py +272 -0
  110. agent_cli/memory/engine.py +361 -0
  111. agent_cli/memory/entities.py +43 -0
  112. agent_cli/memory/models.py +112 -0
  113. agent_cli/opts.py +433 -0
  114. agent_cli/py.typed +0 -0
  115. agent_cli/rag/__init__.py +3 -0
  116. agent_cli/rag/_indexer.py +67 -0
  117. agent_cli/rag/_indexing.py +226 -0
  118. agent_cli/rag/_prompt.py +30 -0
  119. agent_cli/rag/_retriever.py +156 -0
  120. agent_cli/rag/_store.py +48 -0
  121. agent_cli/rag/_utils.py +218 -0
  122. agent_cli/rag/api.py +175 -0
  123. agent_cli/rag/client.py +299 -0
  124. agent_cli/rag/engine.py +302 -0
  125. agent_cli/rag/models.py +55 -0
  126. agent_cli/scripts/.runtime/.gitkeep +0 -0
  127. agent_cli/scripts/__init__.py +1 -0
  128. agent_cli/scripts/check_plugin_skill_sync.py +50 -0
  129. agent_cli/scripts/linux-hotkeys/README.md +63 -0
  130. agent_cli/scripts/linux-hotkeys/toggle-autocorrect.sh +45 -0
  131. agent_cli/scripts/linux-hotkeys/toggle-transcription.sh +58 -0
  132. agent_cli/scripts/linux-hotkeys/toggle-voice-edit.sh +58 -0
  133. agent_cli/scripts/macos-hotkeys/README.md +45 -0
  134. agent_cli/scripts/macos-hotkeys/skhd-config-example +5 -0
  135. agent_cli/scripts/macos-hotkeys/toggle-autocorrect.sh +12 -0
  136. agent_cli/scripts/macos-hotkeys/toggle-transcription.sh +37 -0
  137. agent_cli/scripts/macos-hotkeys/toggle-voice-edit.sh +37 -0
  138. agent_cli/scripts/nvidia-asr-server/README.md +99 -0
  139. agent_cli/scripts/nvidia-asr-server/pyproject.toml +27 -0
  140. agent_cli/scripts/nvidia-asr-server/server.py +255 -0
  141. agent_cli/scripts/nvidia-asr-server/shell.nix +32 -0
  142. agent_cli/scripts/nvidia-asr-server/uv.lock +4654 -0
  143. agent_cli/scripts/run-openwakeword.sh +11 -0
  144. agent_cli/scripts/run-piper-windows.ps1 +30 -0
  145. agent_cli/scripts/run-piper.sh +24 -0
  146. agent_cli/scripts/run-whisper-linux.sh +40 -0
  147. agent_cli/scripts/run-whisper-macos.sh +6 -0
  148. agent_cli/scripts/run-whisper-windows.ps1 +51 -0
  149. agent_cli/scripts/run-whisper.sh +9 -0
  150. agent_cli/scripts/run_faster_whisper_server.py +136 -0
  151. agent_cli/scripts/setup-linux-hotkeys.sh +72 -0
  152. agent_cli/scripts/setup-linux.sh +108 -0
  153. agent_cli/scripts/setup-macos-hotkeys.sh +61 -0
  154. agent_cli/scripts/setup-macos.sh +76 -0
  155. agent_cli/scripts/setup-windows.ps1 +63 -0
  156. agent_cli/scripts/start-all-services-windows.ps1 +53 -0
  157. agent_cli/scripts/start-all-services.sh +178 -0
  158. agent_cli/scripts/sync_extras.py +138 -0
  159. agent_cli/server/__init__.py +3 -0
  160. agent_cli/server/cli.py +721 -0
  161. agent_cli/server/common.py +222 -0
  162. agent_cli/server/model_manager.py +288 -0
  163. agent_cli/server/model_registry.py +225 -0
  164. agent_cli/server/proxy/__init__.py +3 -0
  165. agent_cli/server/proxy/api.py +444 -0
  166. agent_cli/server/streaming.py +67 -0
  167. agent_cli/server/tts/__init__.py +3 -0
  168. agent_cli/server/tts/api.py +335 -0
  169. agent_cli/server/tts/backends/__init__.py +82 -0
  170. agent_cli/server/tts/backends/base.py +139 -0
  171. agent_cli/server/tts/backends/kokoro.py +403 -0
  172. agent_cli/server/tts/backends/piper.py +253 -0
  173. agent_cli/server/tts/model_manager.py +201 -0
  174. agent_cli/server/tts/model_registry.py +28 -0
  175. agent_cli/server/tts/wyoming_handler.py +249 -0
  176. agent_cli/server/whisper/__init__.py +3 -0
  177. agent_cli/server/whisper/api.py +413 -0
  178. agent_cli/server/whisper/backends/__init__.py +89 -0
  179. agent_cli/server/whisper/backends/base.py +97 -0
  180. agent_cli/server/whisper/backends/faster_whisper.py +225 -0
  181. agent_cli/server/whisper/backends/mlx.py +270 -0
  182. agent_cli/server/whisper/languages.py +116 -0
  183. agent_cli/server/whisper/model_manager.py +157 -0
  184. agent_cli/server/whisper/model_registry.py +28 -0
  185. agent_cli/server/whisper/wyoming_handler.py +203 -0
  186. agent_cli/services/__init__.py +343 -0
  187. agent_cli/services/_wyoming_utils.py +64 -0
  188. agent_cli/services/asr.py +506 -0
  189. agent_cli/services/llm.py +228 -0
  190. agent_cli/services/tts.py +450 -0
  191. agent_cli/services/wake_word.py +142 -0
  192. agent_cli-0.70.5.dist-info/METADATA +2118 -0
  193. agent_cli-0.70.5.dist-info/RECORD +196 -0
  194. agent_cli-0.70.5.dist-info/WHEEL +4 -0
  195. agent_cli-0.70.5.dist-info/entry_points.txt +4 -0
  196. agent_cli-0.70.5.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,56 @@
1
+ """JetBrains IDE editor adapters."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+
7
+ from .base import Editor
8
+
9
+
10
+ class _JetBrainsEditor(Editor):
11
+ """Base class for JetBrains IDEs with common detection logic."""
12
+
13
+ def detect(self) -> bool:
14
+ """Detect if running inside a JetBrains IDE's terminal.
15
+
16
+ JetBrains IDEs set TERMINAL_EMULATOR=JetBrains-JediTerm.
17
+ Source: https://github.com/JetBrains/jediterm/issues/253
18
+ """
19
+ return os.environ.get("TERMINAL_EMULATOR") == "JetBrains-JediTerm"
20
+
21
+
22
+ def _create_jetbrains_editor(
23
+ name: str,
24
+ command: str,
25
+ install_url: str,
26
+ alt_commands: tuple[str, ...] = (),
27
+ ) -> type[_JetBrainsEditor]:
28
+ """Factory to create JetBrains editor classes with minimal boilerplate."""
29
+
30
+ class _Editor(_JetBrainsEditor):
31
+ pass
32
+
33
+ _Editor.name = name
34
+ _Editor.command = command
35
+ _Editor.alt_commands = alt_commands
36
+ _Editor.install_url = install_url
37
+ _Editor.__name__ = name.replace("-", "_").title().replace("_", "")
38
+ _Editor.__qualname__ = _Editor.__name__
39
+ return _Editor
40
+
41
+
42
+ # JetBrains IDE definitions: (name, command, url, alt_commands)
43
+ _JETBRAINS_IDES = [
44
+ ("idea", "idea", "https://www.jetbrains.com/idea/", ()),
45
+ ("pycharm", "pycharm", "https://www.jetbrains.com/pycharm/", ("charm",)),
46
+ ("webstorm", "webstorm", "https://www.jetbrains.com/webstorm/", ()),
47
+ ("goland", "goland", "https://www.jetbrains.com/go/", ()),
48
+ ("rustrover", "rustrover", "https://www.jetbrains.com/rust/", ()),
49
+ ]
50
+
51
+ # Generate editor classes
52
+ IntelliJIdea = _create_jetbrains_editor(*_JETBRAINS_IDES[0])
53
+ PyCharm = _create_jetbrains_editor(*_JETBRAINS_IDES[1])
54
+ WebStorm = _create_jetbrains_editor(*_JETBRAINS_IDES[2])
55
+ GoLand = _create_jetbrains_editor(*_JETBRAINS_IDES[3])
56
+ RustRover = _create_jetbrains_editor(*_JETBRAINS_IDES[4])
@@ -0,0 +1,31 @@
1
+ """Nano editor adapter."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING
6
+
7
+ from .base import Editor
8
+
9
+ if TYPE_CHECKING:
10
+ from pathlib import Path
11
+
12
+
13
+ class Nano(Editor):
14
+ """Nano - Simple terminal text editor."""
15
+
16
+ name = "nano"
17
+ command = "nano"
18
+ install_url = "https://www.nano-editor.org"
19
+ # Nano has no integrated terminal, detection always returns False (default)
20
+
21
+ def open_command(self, path: Path) -> list[str]:
22
+ """Return the command to open a directory in Nano.
23
+
24
+ Uses 'cd <path> && nano .' pattern to ensure nano's working
25
+ directory is set correctly.
26
+ """
27
+ exe = self.get_executable()
28
+ if exe is None:
29
+ msg = f"{self.name} is not installed"
30
+ raise RuntimeError(msg)
31
+ return ["sh", "-c", f'cd "{path}" && {exe} .']
@@ -0,0 +1,33 @@
1
+ """Neovim editor adapter."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING
6
+
7
+ from .base import Editor
8
+
9
+ if TYPE_CHECKING:
10
+ from pathlib import Path
11
+
12
+
13
+ class Neovim(Editor):
14
+ """Neovim - Hyperextensible Vim-based text editor."""
15
+
16
+ name = "neovim"
17
+ command = "nvim"
18
+ alt_commands = ("neovim",)
19
+ install_url = "https://neovim.io"
20
+ detect_env_vars = ("NVIM",)
21
+ # No detect_term_program - Neovim doesn't set TERM_PROGRAM (uses $NVIM)
22
+
23
+ def open_command(self, path: Path) -> list[str]:
24
+ """Return the command to open a directory in Neovim.
25
+
26
+ Uses 'cd <path> && nvim .' pattern to ensure neovim's working
27
+ directory is set correctly (matches GTR behavior).
28
+ """
29
+ exe = self.get_executable()
30
+ if exe is None:
31
+ msg = f"{self.name} is not installed"
32
+ raise RuntimeError(msg)
33
+ return ["sh", "-c", f'cd "{path.as_posix()}" && {exe} .']
@@ -0,0 +1,59 @@
1
+ """Registry for editor adapters."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from agent_cli.dev.registry import Registry
6
+
7
+ from .base import Editor # noqa: TC001
8
+ from .cursor import Cursor
9
+ from .emacs import Emacs
10
+ from .jetbrains import GoLand, IntelliJIdea, PyCharm, RustRover, WebStorm
11
+ from .nano import Nano
12
+ from .neovim import Neovim
13
+ from .sublime import SublimeText
14
+ from .vim import Vim
15
+ from .vscode import VSCode
16
+ from .zed import Zed
17
+
18
+ # All available editors (in priority order for detection)
19
+ _EDITORS: list[type[Editor]] = [
20
+ # Modern AI-focused editors first
21
+ Cursor,
22
+ VSCode,
23
+ Zed,
24
+ # JetBrains IDEs
25
+ PyCharm,
26
+ IntelliJIdea,
27
+ WebStorm,
28
+ GoLand,
29
+ RustRover,
30
+ # Terminal editors
31
+ Neovim,
32
+ Vim,
33
+ Nano,
34
+ Emacs,
35
+ # Other GUI editors
36
+ SublimeText,
37
+ ]
38
+
39
+ _registry: Registry[Editor] = Registry(_EDITORS)
40
+
41
+
42
+ def get_all_editors() -> list[Editor]:
43
+ """Get instances of all registered editors."""
44
+ return _registry.get_all()
45
+
46
+
47
+ def get_available_editors() -> list[Editor]:
48
+ """Get all installed/available editors."""
49
+ return _registry.get_available()
50
+
51
+
52
+ def detect_current_editor() -> Editor | None:
53
+ """Detect which editor's integrated terminal we're running in."""
54
+ return _registry.detect_current()
55
+
56
+
57
+ def get_editor(name: str) -> Editor | None:
58
+ """Get an editor by name."""
59
+ return _registry.get_by_name(name)
@@ -0,0 +1,20 @@
1
+ """Sublime Text editor adapter."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from .base import Editor
6
+
7
+
8
+ class SublimeText(Editor):
9
+ """Sublime Text - A sophisticated text editor for code.
10
+
11
+ Note: Sublime Text does not have a built-in integrated terminal.
12
+ Terminal packages (like Terminus) may be used but don't set
13
+ specific environment variables for detection.
14
+ """
15
+
16
+ name = "sublime"
17
+ command = "subl"
18
+ alt_commands = ("sublime_text", "sublime")
19
+ install_url = "https://www.sublimetext.com"
20
+ # No detect_term_program - Sublime has no native integrated terminal
@@ -0,0 +1,42 @@
1
+ """Vim editor adapter."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING
6
+
7
+ from .base import Editor
8
+
9
+ if TYPE_CHECKING:
10
+ from pathlib import Path
11
+
12
+
13
+ class Vim(Editor):
14
+ """Vim - The ubiquitous text editor.
15
+
16
+ Note: Vim does not have an integrated terminal in the traditional sense.
17
+ VIM and VIMRUNTIME env vars are used BY vim to locate runtime files,
18
+ NOT set to indicate running inside vim. Detection always returns False.
19
+
20
+ Evidence: https://vimdoc.sourceforge.net/htmldoc/starting.html
21
+ Quote: "The environment variable '$VIM' is used to locate various user
22
+ files for Vim" and "$VIMRUNTIME is used to locate various support
23
+ files, such as the on-line documentation"
24
+ """
25
+
26
+ name = "vim"
27
+ command = "vim"
28
+ alt_commands = ("vi",)
29
+ install_url = "https://www.vim.org"
30
+ # No detection - vim has no integrated terminal that sets env vars
31
+
32
+ def open_command(self, path: Path) -> list[str]:
33
+ """Return the command to open a directory in Vim.
34
+
35
+ Uses 'cd <path> && vim .' pattern to ensure vim's working
36
+ directory is set correctly (matches GTR behavior).
37
+ """
38
+ exe = self.get_executable()
39
+ if exe is None:
40
+ msg = f"{self.name} is not installed"
41
+ raise RuntimeError(msg)
42
+ return ["sh", "-c", f'cd "{path.as_posix()}" && {exe} .']
@@ -0,0 +1,15 @@
1
+ """VS Code editor adapter."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from .base import Editor
6
+
7
+
8
+ class VSCode(Editor):
9
+ """Visual Studio Code editor."""
10
+
11
+ name = "vscode"
12
+ command = "code"
13
+ alt_commands = ("code-insiders",)
14
+ install_url = "https://code.visualstudio.com"
15
+ detect_term_program = "vscode"
@@ -0,0 +1,20 @@
1
+ """Zed editor adapter."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from .base import Editor
6
+
7
+
8
+ class Zed(Editor):
9
+ """Zed - A high-performance, multiplayer code editor.
10
+
11
+ Detection via ZED_TERM=true (source code) or TERM_PROGRAM=zed (v0.145.0+).
12
+ """
13
+
14
+ name = "zed"
15
+ command = "zed"
16
+ install_url = "https://zed.dev"
17
+ # ZED_TERM=true set in terminal.rs insert_zed_terminal_env()
18
+ detect_env_vars = ("ZED_TERM",)
19
+ # TERM_PROGRAM=zed added in v0.145.0 (PR #14213)
20
+ detect_term_program = "zed"