shellscripts 0.25.2__tar.gz → 0.26.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 (73) hide show
  1. {shellscripts-0.25.2/src/shellscripts.egg-info → shellscripts-0.26.0}/PKG-INFO +10 -19
  2. {shellscripts-0.25.2 → shellscripts-0.26.0}/README.md +9 -18
  3. {shellscripts-0.25.2 → shellscripts-0.26.0}/pyproject.toml +1 -1
  4. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/__init__.py +1 -1
  5. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/__init__.py +0 -3
  6. shellscripts-0.26.0/src/shell_scripts/commands/_yolo_common.py +184 -0
  7. shellscripts-0.26.0/src/shell_scripts/commands/agy.py +50 -0
  8. shellscripts-0.26.0/src/shell_scripts/commands/claude.py +50 -0
  9. shellscripts-0.26.0/src/shell_scripts/commands/codex.py +50 -0
  10. shellscripts-0.26.0/src/shell_scripts/commands/copilot.py +51 -0
  11. shellscripts-0.26.0/src/shell_scripts/commands/opencode.py +49 -0
  12. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/req_cmd.py +2 -2
  13. shellscripts-0.26.0/src/shell_scripts/config_cli.py +2341 -0
  14. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/core.py +39 -7
  15. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/version_check.py +2 -2
  16. {shellscripts-0.25.2 → shellscripts-0.26.0/src/shellscripts.egg-info}/PKG-INFO +10 -19
  17. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shellscripts.egg-info/SOURCES.txt +4 -4
  18. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_001_002_core.py +0 -7
  19. shellscripts-0.26.0/tests/test_tst_005_cli_launchers.py +187 -0
  20. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_010_req_cmd.py +4 -4
  21. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_014_pypi_version_source.py +2 -2
  22. shellscripts-0.26.0/tests/test_tst_017_agy_command.py +251 -0
  23. shellscripts-0.26.0/tests/test_tst_018_config_cli.py +1171 -0
  24. shellscripts-0.25.2/src/shell_scripts/commands/agy.py +0 -81
  25. shellscripts-0.25.2/src/shell_scripts/commands/claude.py +0 -56
  26. shellscripts-0.25.2/src/shell_scripts/commands/codex.py +0 -107
  27. shellscripts-0.25.2/src/shell_scripts/commands/copilot.py +0 -54
  28. shellscripts-0.25.2/src/shell_scripts/commands/gemini.py +0 -54
  29. shellscripts-0.25.2/src/shell_scripts/commands/kiro.py +0 -54
  30. shellscripts-0.25.2/src/shell_scripts/commands/opencode.py +0 -54
  31. shellscripts-0.25.2/src/shell_scripts/commands/pi.py +0 -61
  32. shellscripts-0.25.2/tests/test_tst_005_cli_launchers.py +0 -520
  33. shellscripts-0.25.2/tests/test_tst_017_agy_command.py +0 -135
  34. {shellscripts-0.25.2 → shellscripts-0.26.0}/LICENSE +0 -0
  35. {shellscripts-0.25.2 → shellscripts-0.26.0}/setup.cfg +0 -0
  36. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/__main__.py +0 -0
  37. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/_dc_common.py +0 -0
  38. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/bin_links.py +0 -0
  39. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/clean.py +0 -0
  40. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/dicom2jpg.py +0 -0
  41. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/dicomviewer.py +0 -0
  42. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/diff_cmd.py +0 -0
  43. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/doxygen_cmd.py +0 -0
  44. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/edit_cmd.py +0 -0
  45. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/pdf_crop.py +0 -0
  46. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/pdf_merge.py +0 -0
  47. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/pdf_split_by_format.py +0 -0
  48. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/pdf_split_by_toc.py +0 -0
  49. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/pdf_tiler_090.py +0 -0
  50. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/pdf_tiler_100.py +0 -0
  51. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/pdf_toc_clean.py +0 -0
  52. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/tests_cmd.py +0 -0
  53. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/ubuntu_dark_theme.py +0 -0
  54. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/venv_cmd.py +0 -0
  55. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/video2h264.py +0 -0
  56. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/video2h265.py +0 -0
  57. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/view_cmd.py +0 -0
  58. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/vscode_cmd.py +0 -0
  59. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/commands/vsinsider_cmd.py +0 -0
  60. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/config.py +0 -0
  61. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shell_scripts/utils.py +0 -0
  62. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shellscripts.egg-info/dependency_links.txt +0 -0
  63. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shellscripts.egg-info/entry_points.txt +0 -0
  64. {shellscripts-0.25.2 → shellscripts-0.26.0}/src/shellscripts.egg-info/top_level.txt +0 -0
  65. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_004_bin_links_clean.py +0 -0
  66. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_006_dc_common.py +0 -0
  67. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_007_pdf_commands.py +0 -0
  68. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_008_env_commands.py +0 -0
  69. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_011_video_commands.py +0 -0
  70. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_012_workflow_runtime.py +0 -0
  71. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_013_release_pypi_gating.py +0 -0
  72. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_015_pre_release_check.py +0 -0
  73. {shellscripts-0.25.2 → shellscripts-0.26.0}/tests/test_tst_016_release_precheck_gating.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shellscripts
3
- Version: 0.25.2
3
+ Version: 0.26.0
4
4
  Summary: Execute useful shell scripts via an uvx-compatible CLI interface.
5
5
  Author: Francesco Rolando
6
6
  License-Expression: GPL-3.0-only
@@ -31,7 +31,7 @@ Dynamic: license-file
31
31
  > * **No Support or Feature Requests:** Please **do not** open issues, bug reports, or feature requests. They will not be addressed or accepted at this stage of development.
32
32
  > * **No Warranty:** This software is provided **"AS IS"**, without warranty of any kind, express or implied. You may use it strictly for **testing and evaluation purposes** at your own sole risk.
33
33
 
34
- # s/shellScripts (0.25.2)
34
+ # s/shellScripts (0.26.0)
35
35
 
36
36
  <p align="center">
37
37
  <img src="https://img.shields.io/badge/python-3.11%2B-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python 3.11+">
@@ -65,7 +65,7 @@ PDF/DICOM utilities, development helpers, and editor integrations, exposed throu
65
65
 
66
66
  ## Feature Highlights
67
67
  - Single CLI entrypoint with command dispatch and grouped built-in help (`shellscripts` and alias `s`).
68
- - Project-context launchers for AI CLIs (`agy`, `claude`, `codex`, `copilot`, `gemini`, `kiro`, `opencode`, `pi`) and IDEs (`vscode`, `vsinsider`).
68
+ - Project-context launchers for AI CLIs (`agy`, `claude`, `codex`, `copilot`, `opencode`) and IDEs (`vscode`, `vsinsider`).
69
69
  - PDF workflow commands for crop, merge, split, TOC cleanup, and tiling.
70
70
  - DICOM helpers (`dicom2jpg`, `dicomviewer`) and video transcoders (`video2h264`, `video2h265`).
71
71
  - Project maintenance and automation commands (`req`, `clean`, `venv`, `tests`, `doxygen`, `ubuntu-dark-theme`).
@@ -76,7 +76,7 @@ PDF/DICOM utilities, development helpers, and editor integrations, exposed throu
76
76
 
77
77
  - Python `>=3.11`.
78
78
  - Astral `uv` is required for install and runtime flows (`uv tool install`, `uvx`, `uv run`).
79
- - Git is required for commands that enforce repository-root execution (`agy`, `claude`, `codex`, `copilot`, `gemini`, `kiro`, `opencode`, `pi`, `clean`, `venv`, `tests`, `doxygen`, `vscode`, `vsinsider`).
79
+ - Git is required for commands that enforce repository-root execution (`agy`, `claude`, `codex`, `copilot`, `opencode`, `clean`, `venv`, `tests`, `doxygen`, `vscode`, `vsinsider`).
80
80
  - Command-specific external tools are required only for related commands:
81
81
  - `req` for the `req` command.
82
82
  - `doxygen` (plus optional `make` and `pdflatex`) for `doxygen`.
@@ -211,14 +211,11 @@ Top-level configuration keys:
211
211
 
212
212
  | Command | Purpose |
213
213
  |---|---|
214
- | `agy` | Launch Antigravity CLI in project context (YOLO mode, pass-through args). |
215
- | `claude` | Launch Claude CLI in project context. |
216
- | `codex` | Launch Codex CLI in project context with auth sync and `CODEX_HOME`. |
217
- | `copilot` | Launch Copilot CLI in project context. |
218
- | `gemini` | Launch Gemini CLI in project context. |
219
- | `kiro` | Launch Kiro CLI in project context. |
220
- | `opencode` | Launch OpenCode CLI in project context. |
221
- | `pi` | Launch pi.dev CLI in project context (forwards all arguments unchanged). |
214
+ | `agy` | Launch Antigravity CLI in YOLO mode (`agy --dangerously-skip-permissions`). |
215
+ | `claude` | Launch Claude CLI in YOLO mode (`claude --dangerously-skip-permissions`). |
216
+ | `codex` | Launch Codex CLI in YOLO mode (`codex --yolo`). |
217
+ | `copilot` | Launch Copilot CLI in YOLO mode (`copilot --yolo`; alternative `--allow-all` documented in help). |
218
+ | `opencode` | Launch OpenCode CLI in auto-approval mode (`opencode --auto`). |
222
219
  | `clean` | Find and delete cache directories under the project root (or a passed directory). |
223
220
  | `req` | Run useReq bootstrap on current directory, first-level dirs, or recursively. |
224
221
  | `venv` | Recreate `.venv` and install `requirements.txt` if present. |
@@ -244,18 +241,12 @@ Top-level configuration keys:
244
241
 
245
242
  ### Selected Usage Examples
246
243
 
247
- Launch Antigravity CLI in YOLO mode (command help lists the available AI CLIs in alphabetical order):
244
+ Launch Antigravity CLI in YOLO mode (each YOLO command help documents every registered YOLO CLI option in alphabetical order):
248
245
 
249
246
  ```bash
250
247
  s agy
251
248
  ```
252
249
 
253
- Run pi.dev CLI forwarding all arguments unchanged (no implicit option injection):
254
-
255
- ```bash
256
- s pi --tools read,bash,grep,find
257
- ```
258
-
259
250
  Run useReq bootstrap on first-level child directories:
260
251
 
261
252
  ```bash
@@ -10,7 +10,7 @@
10
10
  > * **No Support or Feature Requests:** Please **do not** open issues, bug reports, or feature requests. They will not be addressed or accepted at this stage of development.
11
11
  > * **No Warranty:** This software is provided **"AS IS"**, without warranty of any kind, express or implied. You may use it strictly for **testing and evaluation purposes** at your own sole risk.
12
12
 
13
- # s/shellScripts (0.25.2)
13
+ # s/shellScripts (0.26.0)
14
14
 
15
15
  <p align="center">
16
16
  <img src="https://img.shields.io/badge/python-3.11%2B-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python 3.11+">
@@ -44,7 +44,7 @@ PDF/DICOM utilities, development helpers, and editor integrations, exposed throu
44
44
 
45
45
  ## Feature Highlights
46
46
  - Single CLI entrypoint with command dispatch and grouped built-in help (`shellscripts` and alias `s`).
47
- - Project-context launchers for AI CLIs (`agy`, `claude`, `codex`, `copilot`, `gemini`, `kiro`, `opencode`, `pi`) and IDEs (`vscode`, `vsinsider`).
47
+ - Project-context launchers for AI CLIs (`agy`, `claude`, `codex`, `copilot`, `opencode`) and IDEs (`vscode`, `vsinsider`).
48
48
  - PDF workflow commands for crop, merge, split, TOC cleanup, and tiling.
49
49
  - DICOM helpers (`dicom2jpg`, `dicomviewer`) and video transcoders (`video2h264`, `video2h265`).
50
50
  - Project maintenance and automation commands (`req`, `clean`, `venv`, `tests`, `doxygen`, `ubuntu-dark-theme`).
@@ -55,7 +55,7 @@ PDF/DICOM utilities, development helpers, and editor integrations, exposed throu
55
55
 
56
56
  - Python `>=3.11`.
57
57
  - Astral `uv` is required for install and runtime flows (`uv tool install`, `uvx`, `uv run`).
58
- - Git is required for commands that enforce repository-root execution (`agy`, `claude`, `codex`, `copilot`, `gemini`, `kiro`, `opencode`, `pi`, `clean`, `venv`, `tests`, `doxygen`, `vscode`, `vsinsider`).
58
+ - Git is required for commands that enforce repository-root execution (`agy`, `claude`, `codex`, `copilot`, `opencode`, `clean`, `venv`, `tests`, `doxygen`, `vscode`, `vsinsider`).
59
59
  - Command-specific external tools are required only for related commands:
60
60
  - `req` for the `req` command.
61
61
  - `doxygen` (plus optional `make` and `pdflatex`) for `doxygen`.
@@ -190,14 +190,11 @@ Top-level configuration keys:
190
190
 
191
191
  | Command | Purpose |
192
192
  |---|---|
193
- | `agy` | Launch Antigravity CLI in project context (YOLO mode, pass-through args). |
194
- | `claude` | Launch Claude CLI in project context. |
195
- | `codex` | Launch Codex CLI in project context with auth sync and `CODEX_HOME`. |
196
- | `copilot` | Launch Copilot CLI in project context. |
197
- | `gemini` | Launch Gemini CLI in project context. |
198
- | `kiro` | Launch Kiro CLI in project context. |
199
- | `opencode` | Launch OpenCode CLI in project context. |
200
- | `pi` | Launch pi.dev CLI in project context (forwards all arguments unchanged). |
193
+ | `agy` | Launch Antigravity CLI in YOLO mode (`agy --dangerously-skip-permissions`). |
194
+ | `claude` | Launch Claude CLI in YOLO mode (`claude --dangerously-skip-permissions`). |
195
+ | `codex` | Launch Codex CLI in YOLO mode (`codex --yolo`). |
196
+ | `copilot` | Launch Copilot CLI in YOLO mode (`copilot --yolo`; alternative `--allow-all` documented in help). |
197
+ | `opencode` | Launch OpenCode CLI in auto-approval mode (`opencode --auto`). |
201
198
  | `clean` | Find and delete cache directories under the project root (or a passed directory). |
202
199
  | `req` | Run useReq bootstrap on current directory, first-level dirs, or recursively. |
203
200
  | `venv` | Recreate `.venv` and install `requirements.txt` if present. |
@@ -223,18 +220,12 @@ Top-level configuration keys:
223
220
 
224
221
  ### Selected Usage Examples
225
222
 
226
- Launch Antigravity CLI in YOLO mode (command help lists the available AI CLIs in alphabetical order):
223
+ Launch Antigravity CLI in YOLO mode (each YOLO command help documents every registered YOLO CLI option in alphabetical order):
227
224
 
228
225
  ```bash
229
226
  s agy
230
227
  ```
231
228
 
232
- Run pi.dev CLI forwarding all arguments unchanged (no implicit option injection):
233
-
234
- ```bash
235
- s pi --tools read,bash,grep,find
236
- ```
237
-
238
229
  Run useReq bootstrap on first-level child directories:
239
230
 
240
231
  ```bash
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "shellscripts"
7
- version = "0.25.2"
7
+ version = "0.26.0"
8
8
  description = "Execute useful shell scripts via an uvx-compatible CLI interface."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -1,4 +1,4 @@
1
- __version__ = "0.25.2"
1
+ __version__ = "0.26.0"
2
2
 
3
3
  from .core import main # noqa: F401
4
4
 
@@ -20,10 +20,7 @@ _COMMAND_MODULES = {
20
20
  "claude": "shell_scripts.commands.claude",
21
21
  "codex": "shell_scripts.commands.codex",
22
22
  "copilot": "shell_scripts.commands.copilot",
23
- "gemini": "shell_scripts.commands.gemini",
24
- "kiro": "shell_scripts.commands.kiro",
25
23
  "opencode": "shell_scripts.commands.opencode",
26
- "pi": "shell_scripts.commands.pi",
27
24
  "dicom2jpg": "shell_scripts.commands.dicom2jpg",
28
25
  "dicomviewer": "shell_scripts.commands.dicomviewer",
29
26
  "diff": "shell_scripts.commands.diff_cmd",
@@ -0,0 +1,184 @@
1
+ #!/usr/bin/env python3
2
+ """@brief Shared registry-based launcher for YOLO-mode external AI CLIs.
3
+
4
+ @details Defines the declarative `YoloCliSpec` registry plus the shared inline
5
+ help renderer and subprocess runner consumed by thin YOLO command modules.
6
+ Adding a new YOLO CLI requires exactly one `YoloCliSpec` record plus one thin
7
+ command module exposing `DESCRIPTION`, `print_help(version)`, and `run(args)`.
8
+ @satisfies DES-030, DES-031, REQ-055, REQ-056, REQ-064
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ import subprocess
14
+ from dataclasses import dataclass
15
+
16
+ from shell_scripts.utils import require_commands
17
+
18
+ ## @var PROGRAM
19
+ # @brief Base CLI program name used in help output.
20
+ # @details Constant identifier for usage-line rendering in command help.
21
+ PROGRAM = "shellscripts"
22
+
23
+
24
+ @dataclass(frozen=True)
25
+ class YoloCliSpec:
26
+ """@brief Declarative definition of one YOLO-mode external AI CLI.
27
+
28
+ @details Immutable registry record; a command module becomes a YOLO
29
+ launcher by binding exactly one instance of this record.
30
+ @satisfies DES-030
31
+ """
32
+
33
+ ## @var command
34
+ # @brief Dispatcher command token exposed by the CLI registry.
35
+ command: str
36
+ ## @var executable
37
+ # @brief External executable token resolved and validated before launch.
38
+ executable: str
39
+ ## @var option
40
+ # @brief YOLO-mode option inserted immediately after the executable.
41
+ option: str
42
+ ## @var note
43
+ # @brief Behavioral note rendered in inline help for `option`.
44
+ note: str
45
+ ## @var alternative
46
+ # @brief Documented-but-not-executed alternative option; empty when none.
47
+ alternative: str = ""
48
+ ## @var alternative_note
49
+ # @brief Behavioral note rendered in inline help for `alternative`.
50
+ alternative_note: str = ""
51
+
52
+
53
+ ## @var YOLO_CLI_REGISTRY
54
+ # @brief Alphabetically ordered registry of YOLO-mode AI CLI definitions.
55
+ # @details Rendered verbatim in every YOLO command inline help in this order;
56
+ # appending one record extends the registry and every help surface.
57
+ # @satisfies DES-030, REQ-086
58
+ YOLO_CLI_REGISTRY: tuple[YoloCliSpec, ...] = (
59
+ YoloCliSpec(
60
+ command="agy",
61
+ executable="agy",
62
+ option="--dangerously-skip-permissions",
63
+ note="Official Antigravity flag used instead of --yolo.",
64
+ ),
65
+ YoloCliSpec(
66
+ command="claude",
67
+ executable="claude",
68
+ option="--dangerously-skip-permissions",
69
+ note=(
70
+ "Ignores all approval, policy, and rule prompts"
71
+ " for the entire session."
72
+ ),
73
+ ),
74
+ YoloCliSpec(
75
+ command="codex",
76
+ executable="codex",
77
+ option="--yolo",
78
+ note=(
79
+ "Skips confirmation prompts and entirely disables"
80
+ " the security sandbox."
81
+ ),
82
+ ),
83
+ YoloCliSpec(
84
+ command="copilot",
85
+ executable="copilot",
86
+ option="--yolo",
87
+ note="Skips confirmation prompts for the entire session.",
88
+ alternative="--allow-all",
89
+ alternative_note=(
90
+ "Accepted alternative granting access to all paths and tools."
91
+ ),
92
+ ),
93
+ YoloCliSpec(
94
+ command="opencode",
95
+ executable="opencode",
96
+ option="--auto",
97
+ note=(
98
+ "Approves every request that is not explicitly denied; "
99
+ "no formal --yolo flag exists."
100
+ ),
101
+ ),
102
+ )
103
+
104
+ ## @var YOLO_CLI_INDEX
105
+ # @brief O(1) command-token lookup index over `YOLO_CLI_REGISTRY`.
106
+ # @satisfies DES-030
107
+ YOLO_CLI_INDEX: dict[str, YoloCliSpec] = {
108
+ spec.command: spec for spec in YOLO_CLI_REGISTRY
109
+ }
110
+
111
+
112
+ def get_yolo_spec(command: str) -> YoloCliSpec:
113
+ """@brief Resolve the declarative YOLO CLI record for one command token.
114
+
115
+ @details Performs O(1) dictionary lookup on `YOLO_CLI_INDEX`.
116
+ Time complexity O(1).
117
+ @param command {str} Dispatcher command token (for example `codex`).
118
+ @return {YoloCliSpec} Registry record bound to the command token.
119
+ @throws {KeyError} If the command token is not registered.
120
+ @satisfies DES-030
121
+ """
122
+ return YOLO_CLI_INDEX[command]
123
+
124
+
125
+ def print_yolo_help(command: str, version: str, description: str) -> None:
126
+ """@brief Render YOLO command help documenting the full YOLO CLI registry.
127
+
128
+ @details Emits the command description, usage line, executed YOLO option
129
+ with its behavioral note, optional documented alternative option, and the
130
+ complete registry listing with every executed option and note in ascending
131
+ alphabetical command order; does not mutate process state.
132
+ Time complexity O(n) over registered YOLO CLI record count.
133
+ @param command {str} Dispatcher command token whose help is rendered.
134
+ @param version {str} CLI version string propagated by dispatcher.
135
+ @param description {str} One-line command description for the help header.
136
+ @return {None} Writes help text to stdout.
137
+ @satisfies DES-008, REQ-086, REQ-092, REQ-093
138
+ """
139
+ spec = get_yolo_spec(command)
140
+ print(description)
141
+ print(f"Usage: {PROGRAM} {spec.command} [args...] ({version})")
142
+ print()
143
+ print(f"{spec.command} YOLO mode:")
144
+ print(f" Executed command: {spec.executable} {spec.option} [args...]")
145
+ print(f" {spec.option} - {spec.note}")
146
+ if spec.alternative:
147
+ print(
148
+ f" {spec.alternative} - {spec.alternative_note}"
149
+ " (accepted alternative; never appended automatically)."
150
+ )
151
+ print(" --help - Show this help message.")
152
+ print()
153
+ print("Registered YOLO CLIs (alphabetical order):")
154
+ for entry in YOLO_CLI_REGISTRY:
155
+ print(f" {entry.command:<9} {entry.executable} {entry.option}")
156
+ print(f" {entry.note}")
157
+ if entry.alternative:
158
+ print(
159
+ f" Alternative: {entry.alternative}"
160
+ f" - {entry.alternative_note}"
161
+ )
162
+
163
+
164
+ def run_yolo_cli(command: str, args: list[str]) -> int:
165
+ """@brief Launch one registered YOLO CLI after executable validation.
166
+
167
+ @details Resolves the registry record, validates executable availability
168
+ for the record executable, builds the command vector
169
+ `[resolved_executable, option] + args`, then executes it through blocking
170
+ `subprocess.run` with inherited stdio. Performs no Git repository root
171
+ validation and emits no project-root error output. Time complexity O(n)
172
+ over forwarded argument count.
173
+ @param command {str} Registered dispatcher command token.
174
+ @param args {list[str]} Additional CLI args forwarded to the external CLI.
175
+ @return {int} Child process return code.
176
+ @throws {KeyError} If the command token is not registered.
177
+ @satisfies REQ-014, REQ-015, REQ-017, REQ-018, REQ-085,
178
+ REQ-055, REQ-056, REQ-064
179
+ """
180
+ spec = get_yolo_spec(command)
181
+ cmd = [spec.executable, spec.option] + args
182
+ cmd[0] = require_commands(cmd[0])
183
+ result = subprocess.run(cmd)
184
+ return result.returncode
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env python3
2
+ """@brief Antigravity CLI launcher in YOLO mode via the shared registry launcher.
3
+
4
+ @details Thin YOLO command module binding the `agy` registry record and
5
+ delegating project-root enforcement, executable validation, inline help
6
+ rendering, and blocking subprocess invocation to `_yolo_common`.
7
+ @satisfies REQ-085, DES-030, DES-031, DES-008
8
+ """
9
+
10
+ from shell_scripts.commands._yolo_common import (
11
+ get_yolo_spec,
12
+ print_yolo_help,
13
+ run_yolo_cli,
14
+ )
15
+
16
+ ## @var DESCRIPTION
17
+ # @brief One-line command description for dispatcher help surfaces.
18
+ # @details Exposed by command registry introspection (`get_all_commands`).
19
+ DESCRIPTION = "Launch Antigravity CLI in the project context."
20
+ ## @var SPEC
21
+ # @brief Declarative YOLO CLI record bound to the `agy` command token.
22
+ # @satisfies DES-030, REQ-085
23
+ SPEC = get_yolo_spec("agy")
24
+
25
+
26
+ def print_help(version: str) -> None:
27
+ """@brief Print command-specific help for `agy`.
28
+
29
+ @details Delegates to the shared YOLO help renderer, which emits the
30
+ executed option documentation and the alphabetical YOLO CLI registry.
31
+ Time complexity O(n) over registered YOLO CLI record count.
32
+ @param version {str} CLI version string propagated by dispatcher.
33
+ @return {None} Writes help text to stdout.
34
+ @satisfies DES-008, REQ-086, REQ-092
35
+ """
36
+ print_yolo_help(SPEC.command, version, DESCRIPTION)
37
+
38
+
39
+ def run(args: list[str]) -> int:
40
+ """@brief Launch Antigravity CLI in YOLO mode after executable validation.
41
+
42
+ @details Delegates to the shared YOLO runner executing
43
+ `agy --dangerously-skip-permissions` plus pass-through args through
44
+ blocking subprocess run with inherited stdio. Time complexity O(n) over
45
+ forwarded argument count.
46
+ @param args {list[str]} Additional CLI args forwarded to Antigravity.
47
+ @return {int} Child process return code.
48
+ @satisfies REQ-085, REQ-055, REQ-056, REQ-064
49
+ """
50
+ return run_yolo_cli(SPEC.command, args)
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env python3
2
+ """@brief Claude CLI launcher in YOLO mode via the shared registry launcher.
3
+
4
+ @details Thin YOLO command module binding the `claude` registry record and
5
+ delegating project-root enforcement, PATH-based executable validation, inline
6
+ help rendering, and blocking subprocess invocation to `_yolo_common`.
7
+ @satisfies REQ-017, DES-030, DES-031, DES-008
8
+ """
9
+
10
+ from shell_scripts.commands._yolo_common import (
11
+ get_yolo_spec,
12
+ print_yolo_help,
13
+ run_yolo_cli,
14
+ )
15
+
16
+ ## @var DESCRIPTION
17
+ # @brief One-line command description for dispatcher help surfaces.
18
+ # @details Exposed by command registry introspection (`get_all_commands`).
19
+ DESCRIPTION = "Launch Claude CLI with skip-permissions in the project context."
20
+ ## @var SPEC
21
+ # @brief Declarative YOLO CLI record bound to the `claude` command token.
22
+ # @satisfies DES-030, REQ-017
23
+ SPEC = get_yolo_spec("claude")
24
+
25
+
26
+ def print_help(version: str) -> None:
27
+ """@brief Print command-specific help for `claude`.
28
+
29
+ @details Delegates to the shared YOLO help renderer, which emits the
30
+ executed option documentation and the alphabetical YOLO CLI registry.
31
+ Time complexity O(n) over registered YOLO CLI record count.
32
+ @param version {str} CLI version string propagated by dispatcher.
33
+ @return {None} Writes help text to stdout.
34
+ @satisfies DES-008, REQ-086, REQ-092
35
+ """
36
+ print_yolo_help(SPEC.command, version, DESCRIPTION)
37
+
38
+
39
+ def run(args: list[str]) -> int:
40
+ """@brief Launch Claude CLI in YOLO mode after executable validation.
41
+
42
+ @details Delegates to the shared YOLO runner executing the PATH-resolved
43
+ `claude --dangerously-skip-permissions` plus pass-through args through
44
+ blocking subprocess run with inherited stdio. Time complexity O(n) over
45
+ forwarded argument count.
46
+ @param args {list[str]} Additional CLI args forwarded to Claude.
47
+ @return {int} Child process return code.
48
+ @satisfies REQ-017, REQ-055, REQ-056, REQ-064
49
+ """
50
+ return run_yolo_cli(SPEC.command, args)
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env python3
2
+ """@brief Codex CLI launcher in YOLO mode via the shared registry launcher.
3
+
4
+ @details Thin YOLO command module binding the `codex` registry record and
5
+ delegating project-root enforcement, executable validation, inline help
6
+ rendering, and blocking subprocess invocation to `_yolo_common`. Performs no
7
+ auth-file synchronization and no `CODEX_HOME` environment mutation.
8
+ @satisfies REQ-014, DES-030, DES-031, DES-008
9
+ """
10
+
11
+ from shell_scripts.commands._yolo_common import (
12
+ get_yolo_spec,
13
+ print_yolo_help,
14
+ run_yolo_cli,
15
+ )
16
+
17
+ ## @var DESCRIPTION
18
+ # @brief One-line command description for dispatcher help surfaces.
19
+ # @details Exposed by command registry introspection (`get_all_commands`).
20
+ DESCRIPTION = "Launch OpenAI Codex CLI in the project context."
21
+ ## @var SPEC
22
+ # @brief Declarative YOLO CLI record bound to the `codex` command token.
23
+ # @satisfies DES-030, REQ-014
24
+ SPEC = get_yolo_spec("codex")
25
+
26
+
27
+ def print_help(version: str) -> None:
28
+ """@brief Print command-specific help for `codex`.
29
+
30
+ @details Delegates to the shared YOLO help renderer, which emits the
31
+ executed option documentation and the alphabetical YOLO CLI registry.
32
+ Time complexity O(n) over registered YOLO CLI record count.
33
+ @param version {str} CLI version string propagated by dispatcher.
34
+ @return {None} Writes help text to stdout.
35
+ @satisfies DES-008, REQ-086, REQ-092
36
+ """
37
+ print_yolo_help(SPEC.command, version, DESCRIPTION)
38
+
39
+
40
+ def run(args: list[str]) -> int:
41
+ """@brief Launch Codex CLI in YOLO mode after executable validation.
42
+
43
+ @details Delegates to the shared YOLO runner executing
44
+ `codex --yolo` plus pass-through args through blocking subprocess run
45
+ with inherited stdio. Time complexity O(n) over forwarded argument count.
46
+ @param args {list[str]} Additional CLI args forwarded to Codex.
47
+ @return {int} Child process return code.
48
+ @satisfies REQ-014, REQ-055, REQ-056, REQ-064
49
+ """
50
+ return run_yolo_cli(SPEC.command, args)
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env python3
2
+ """@brief GitHub Copilot CLI launcher in YOLO mode via the shared launcher.
3
+
4
+ @details Thin YOLO command module binding the `copilot` registry record and
5
+ delegating project-root enforcement, executable validation, inline help
6
+ rendering, and blocking subprocess invocation to `_yolo_common`. The accepted
7
+ alternative `--allow-all` option is documented in inline help only.
8
+ @satisfies REQ-015, REQ-093, DES-030, DES-031, DES-008
9
+ """
10
+
11
+ from shell_scripts.commands._yolo_common import (
12
+ get_yolo_spec,
13
+ print_yolo_help,
14
+ run_yolo_cli,
15
+ )
16
+
17
+ ## @var DESCRIPTION
18
+ # @brief One-line command description for dispatcher help surfaces.
19
+ # @details Exposed by command registry introspection (`get_all_commands`).
20
+ DESCRIPTION = "Launch GitHub Copilot CLI in the project context."
21
+ ## @var SPEC
22
+ # @brief Declarative YOLO CLI record bound to the `copilot` command token.
23
+ # @satisfies DES-030, REQ-015, REQ-093
24
+ SPEC = get_yolo_spec("copilot")
25
+
26
+
27
+ def print_help(version: str) -> None:
28
+ """@brief Print command-specific help for `copilot`.
29
+
30
+ @details Delegates to the shared YOLO help renderer, which emits the
31
+ executed option documentation, the accepted `--allow-all` alternative,
32
+ and the alphabetical YOLO CLI registry.
33
+ Time complexity O(n) over registered YOLO CLI record count.
34
+ @param version {str} CLI version string propagated by dispatcher.
35
+ @return {None} Writes help text to stdout.
36
+ @satisfies DES-008, REQ-086, REQ-092, REQ-093
37
+ """
38
+ print_yolo_help(SPEC.command, version, DESCRIPTION)
39
+
40
+
41
+ def run(args: list[str]) -> int:
42
+ """@brief Launch Copilot CLI in YOLO mode after executable validation.
43
+
44
+ @details Delegates to the shared YOLO runner executing
45
+ `copilot --yolo` plus pass-through args through blocking subprocess run
46
+ with inherited stdio. Time complexity O(n) over forwarded argument count.
47
+ @param args {list[str]} Additional CLI args forwarded to Copilot.
48
+ @return {int} Child process return code.
49
+ @satisfies REQ-015, REQ-055, REQ-056, REQ-064
50
+ """
51
+ return run_yolo_cli(SPEC.command, args)
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env python3
2
+ """@brief OpenCode CLI launcher in auto-approval mode via the shared launcher.
3
+
4
+ @details Thin YOLO command module binding the `opencode` registry record and
5
+ delegating project-root enforcement, executable validation, inline help
6
+ rendering, and blocking subprocess invocation to `_yolo_common`.
7
+ @satisfies REQ-018, DES-030, DES-031, DES-008
8
+ """
9
+
10
+ from shell_scripts.commands._yolo_common import (
11
+ get_yolo_spec,
12
+ print_yolo_help,
13
+ run_yolo_cli,
14
+ )
15
+
16
+ ## @var DESCRIPTION
17
+ # @brief One-line command description for dispatcher help surfaces.
18
+ # @details Exposed by command registry introspection (`get_all_commands`).
19
+ DESCRIPTION = "Launch OpenCode CLI in the project context."
20
+ ## @var SPEC
21
+ # @brief Declarative YOLO CLI record bound to the `opencode` command token.
22
+ # @satisfies DES-030, REQ-018
23
+ SPEC = get_yolo_spec("opencode")
24
+
25
+
26
+ def print_help(version: str) -> None:
27
+ """@brief Print command-specific help for `opencode`.
28
+
29
+ @details Delegates to the shared YOLO help renderer, which emits the
30
+ executed option documentation and the alphabetical YOLO CLI registry.
31
+ Time complexity O(n) over registered YOLO CLI record count.
32
+ @param version {str} CLI version string propagated by dispatcher.
33
+ @return {None} Writes help text to stdout.
34
+ @satisfies DES-008, REQ-086, REQ-092
35
+ """
36
+ print_yolo_help(SPEC.command, version, DESCRIPTION)
37
+
38
+
39
+ def run(args: list[str]) -> int:
40
+ """@brief Launch OpenCode CLI in auto-approval mode after validation.
41
+
42
+ @details Delegates to the shared YOLO runner executing
43
+ `opencode --auto` plus pass-through args through blocking subprocess run
44
+ with inherited stdio. Time complexity O(n) over forwarded argument count.
45
+ @param args {list[str]} Additional CLI args forwarded to OpenCode.
46
+ @return {int} Child process return code.
47
+ @satisfies REQ-018, REQ-055, REQ-056, REQ-064
48
+ """
49
+ return run_yolo_cli(SPEC.command, args)
@@ -259,7 +259,7 @@ def _print_install_skipped(target_dir: Path) -> None:
259
259
  """@brief Emit skip evidence when target directory is not Git root.
260
260
 
261
261
  @details Prints one parser-stable line containing `skip` and token
262
- `skippata` to document installation omission for non-root directories in
262
+ `skipped` to document installation omission for non-root directories in
263
263
  current-directory and `--dirs` modes. Time complexity is O(1).
264
264
  @param target_dir {Path} Directory skipped from cleanup and installation.
265
265
  @return {None} Writes one stdout line.
@@ -268,7 +268,7 @@ def _print_install_skipped(target_dir: Path) -> None:
268
268
 
269
269
  print(
270
270
  "install | skip | "
271
- f"{target_dir} | installation skippata: target is not a git root"
271
+ f"{target_dir} | installation skipped: target is not a git root"
272
272
  )
273
273
 
274
274