cc-toolbox 6.1.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.
- cc_toolbox/__init__.py +1 -0
- cc_toolbox/cli.py +59 -0
- cc_toolbox/install_claude.py +4479 -0
- cc_toolbox/setup_environment.py +13243 -0
- cc_toolbox-6.1.0.dist-info/METADATA +181 -0
- cc_toolbox-6.1.0.dist-info/RECORD +9 -0
- cc_toolbox-6.1.0.dist-info/WHEEL +4 -0
- cc_toolbox-6.1.0.dist-info/entry_points.txt +2 -0
- cc_toolbox-6.1.0.dist-info/licenses/LICENSE +9 -0
cc_toolbox/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Scripts package for Claude Code Toolbox."""
|
cc_toolbox/cli.py
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Subcommand dispatcher for the cc-toolbox distribution.
|
|
3
|
+
|
|
4
|
+
Exposes the console-script entry point that routes ``cc-toolbox setup``
|
|
5
|
+
to setup_environment.main() and ``cc-toolbox install`` to
|
|
6
|
+
install_claude.main(). This is the ONLY module permitted to import both
|
|
7
|
+
standalone scripts; neither standalone script may import this module (see the
|
|
8
|
+
Standalone Script Policy in CLAUDE.md). Relative imports let the same file
|
|
9
|
+
serve as ``scripts.cli`` in the repository and ``cc_toolbox.cli``
|
|
10
|
+
inside the built wheel.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
USAGE = '''usage: cc-toolbox <command> [args...]
|
|
16
|
+
|
|
17
|
+
commands:
|
|
18
|
+
setup Configure a Claude Code environment from a YAML configuration
|
|
19
|
+
install Install Claude Code only, without environment configuration
|
|
20
|
+
'''
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def main() -> None:
|
|
24
|
+
"""Dispatch the subcommand to the matching standalone script's main().
|
|
25
|
+
|
|
26
|
+
Raises:
|
|
27
|
+
SystemExit: With code 0 for help output and code 2 for a missing or
|
|
28
|
+
unknown subcommand.
|
|
29
|
+
"""
|
|
30
|
+
argv = sys.argv[1:]
|
|
31
|
+
if not argv:
|
|
32
|
+
print(USAGE, file=sys.stderr)
|
|
33
|
+
raise SystemExit(2)
|
|
34
|
+
command = argv[0]
|
|
35
|
+
if command in ('-h', '--help'):
|
|
36
|
+
print(USAGE)
|
|
37
|
+
raise SystemExit(0)
|
|
38
|
+
if command not in ('setup', 'install'):
|
|
39
|
+
print(f'error: unknown command {command!r}\n\n{USAGE}', file=sys.stderr)
|
|
40
|
+
raise SystemExit(2)
|
|
41
|
+
# Neither delegate accepts an argv parameter; both read sys.argv directly,
|
|
42
|
+
# so the subcommand token must be stripped or setup's argparse would read
|
|
43
|
+
# it as the positional config argument.
|
|
44
|
+
sys.argv = [f'{sys.argv[0]} {command}', *argv[1:]]
|
|
45
|
+
if command == 'setup':
|
|
46
|
+
# Deferred import: the delegate modules are large and only one is needed per run.
|
|
47
|
+
from .setup_environment import main as setup_main
|
|
48
|
+
|
|
49
|
+
setup_main()
|
|
50
|
+
return
|
|
51
|
+
# install_claude.main() answers -h/--help itself with its own usage text
|
|
52
|
+
# (its env-var contract), so the request is delegated, not intercepted.
|
|
53
|
+
from .install_claude import main as install_main
|
|
54
|
+
|
|
55
|
+
install_main()
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
if __name__ == '__main__':
|
|
59
|
+
main()
|