shellscripts 0.25.2__py3-none-any.whl → 0.26.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.
- shell_scripts/__init__.py +1 -1
- shell_scripts/commands/__init__.py +0 -3
- shell_scripts/commands/_yolo_common.py +184 -0
- shell_scripts/commands/agy.py +26 -57
- shell_scripts/commands/claude.py +27 -33
- shell_scripts/commands/codex.py +26 -83
- shell_scripts/commands/copilot.py +28 -31
- shell_scripts/commands/opencode.py +26 -31
- shell_scripts/commands/req_cmd.py +2 -2
- shell_scripts/config_cli.py +2341 -0
- shell_scripts/core.py +39 -7
- shell_scripts/version_check.py +2 -2
- {shellscripts-0.25.2.dist-info → shellscripts-0.26.2.dist-info}/METADATA +10 -19
- {shellscripts-0.25.2.dist-info → shellscripts-0.26.2.dist-info}/RECORD +18 -20
- shell_scripts/commands/bin_links.py +0 -78
- shell_scripts/commands/gemini.py +0 -54
- shell_scripts/commands/kiro.py +0 -54
- shell_scripts/commands/pi.py +0 -61
- {shellscripts-0.25.2.dist-info → shellscripts-0.26.2.dist-info}/WHEEL +0 -0
- {shellscripts-0.25.2.dist-info → shellscripts-0.26.2.dist-info}/entry_points.txt +0 -0
- {shellscripts-0.25.2.dist-info → shellscripts-0.26.2.dist-info}/licenses/LICENSE +0 -0
- {shellscripts-0.25.2.dist-info → shellscripts-0.26.2.dist-info}/top_level.txt +0 -0
|
@@ -1,54 +1,49 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""@brief OpenCode CLI launcher in
|
|
2
|
+
"""@brief OpenCode CLI launcher in auto-approval mode via the shared launcher.
|
|
3
3
|
|
|
4
|
-
@details
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
7
8
|
"""
|
|
8
9
|
|
|
9
|
-
import
|
|
10
|
+
from shell_scripts.commands._yolo_common import (
|
|
11
|
+
get_yolo_spec,
|
|
12
|
+
print_yolo_help,
|
|
13
|
+
run_yolo_cli,
|
|
14
|
+
)
|
|
10
15
|
|
|
11
|
-
from shell_scripts.utils import require_project_root, require_commands
|
|
12
|
-
|
|
13
|
-
## @var PROGRAM
|
|
14
|
-
# @brief Base CLI program name used in help output.
|
|
15
|
-
# @details Constant identifier for usage-line rendering in command help.
|
|
16
|
-
PROGRAM = "shellscripts"
|
|
17
16
|
## @var DESCRIPTION
|
|
18
17
|
# @brief One-line command description for dispatcher help surfaces.
|
|
19
18
|
# @details Exposed by command registry introspection (`get_all_commands`).
|
|
20
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")
|
|
21
24
|
|
|
22
25
|
|
|
23
|
-
def print_help(version):
|
|
26
|
+
def print_help(version: str) -> None:
|
|
24
27
|
"""@brief Print command-specific help for `opencode`.
|
|
25
28
|
|
|
26
|
-
@details
|
|
27
|
-
|
|
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.
|
|
28
32
|
@param version {str} CLI version string propagated by dispatcher.
|
|
29
33
|
@return {None} Writes help text to stdout.
|
|
30
|
-
@satisfies DES-008
|
|
34
|
+
@satisfies DES-008, REQ-086, REQ-092
|
|
31
35
|
"""
|
|
32
|
-
|
|
33
|
-
print(f"Usage: {PROGRAM} opencode [args...] ({version})")
|
|
34
|
-
print()
|
|
35
|
-
print("opencode options:")
|
|
36
|
-
print(" All arguments are passed through to the OpenCode CLI.")
|
|
37
|
-
print(" --help - Show this help message.")
|
|
36
|
+
print_yolo_help(SPEC.command, version, DESCRIPTION)
|
|
38
37
|
|
|
39
38
|
|
|
40
|
-
def run(args):
|
|
41
|
-
"""@brief Launch OpenCode CLI
|
|
39
|
+
def run(args: list[str]) -> int:
|
|
40
|
+
"""@brief Launch OpenCode CLI in auto-approval mode after validation.
|
|
42
41
|
|
|
43
|
-
@details
|
|
44
|
-
`opencode
|
|
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
45
|
@param args {list[str]} Additional CLI args forwarded to OpenCode.
|
|
46
46
|
@return {int} Child process return code.
|
|
47
47
|
@satisfies REQ-018, REQ-055, REQ-056, REQ-064
|
|
48
48
|
"""
|
|
49
|
-
|
|
50
|
-
require_project_root()
|
|
51
|
-
cmd = ["opencode"] + args
|
|
52
|
-
cmd[0] = require_commands(cmd[0])
|
|
53
|
-
result = subprocess.run(cmd)
|
|
54
|
-
return result.returncode
|
|
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
|
-
`
|
|
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
|
|
271
|
+
f"{target_dir} | installation skipped: target is not a git root"
|
|
272
272
|
)
|
|
273
273
|
|
|
274
274
|
|