ccsilo 0.1.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 (182) hide show
  1. ccsilo-0.1.0/PKG-INFO +657 -0
  2. ccsilo-0.1.0/README.md +620 -0
  3. ccsilo-0.1.0/ccsilo/__init__.py +40 -0
  4. ccsilo-0.1.0/ccsilo/__main__.py +501 -0
  5. ccsilo-0.1.0/ccsilo/_utils.py +177 -0
  6. ccsilo-0.1.0/ccsilo/binary_patcher/__init__.py +44 -0
  7. ccsilo-0.1.0/ccsilo/binary_patcher/bun_compat.py +136 -0
  8. ccsilo-0.1.0/ccsilo/binary_patcher/codesign.py +37 -0
  9. ccsilo-0.1.0/ccsilo/binary_patcher/elf_resize.py +156 -0
  10. ccsilo-0.1.0/ccsilo/binary_patcher/index.py +207 -0
  11. ccsilo-0.1.0/ccsilo/binary_patcher/js_patch.py +104 -0
  12. ccsilo-0.1.0/ccsilo/binary_patcher/macho_resize.py +158 -0
  13. ccsilo-0.1.0/ccsilo/binary_patcher/pe_resize.py +74 -0
  14. ccsilo-0.1.0/ccsilo/binary_patcher/prompts.py +184 -0
  15. ccsilo-0.1.0/ccsilo/binary_patcher/repack.py +34 -0
  16. ccsilo-0.1.0/ccsilo/binary_patcher/replace_entry.py +73 -0
  17. ccsilo-0.1.0/ccsilo/binary_patcher/strip_bun_wrapper.py +28 -0
  18. ccsilo-0.1.0/ccsilo/binary_patcher/theme.py +131 -0
  19. ccsilo-0.1.0/ccsilo/binary_patcher/unpack_and_patch.py +249 -0
  20. ccsilo-0.1.0/ccsilo/bun_extract/__init__.py +19 -0
  21. ccsilo-0.1.0/ccsilo/bun_extract/constants.py +49 -0
  22. ccsilo-0.1.0/ccsilo/bun_extract/elf.py +12 -0
  23. ccsilo-0.1.0/ccsilo/bun_extract/extract.py +162 -0
  24. ccsilo-0.1.0/ccsilo/bun_extract/macho.py +148 -0
  25. ccsilo-0.1.0/ccsilo/bun_extract/parser.py +232 -0
  26. ccsilo-0.1.0/ccsilo/bun_extract/pe.py +46 -0
  27. ccsilo-0.1.0/ccsilo/bun_extract/replace.py +47 -0
  28. ccsilo-0.1.0/ccsilo/bun_extract/types.py +57 -0
  29. ccsilo-0.1.0/ccsilo/bundler.py +376 -0
  30. ccsilo-0.1.0/ccsilo/cli/__init__.py +11 -0
  31. ccsilo-0.1.0/ccsilo/cli/handlers.py +162 -0
  32. ccsilo-0.1.0/ccsilo/cli/parsers.py +214 -0
  33. ccsilo-0.1.0/ccsilo/cli/payloads.py +101 -0
  34. ccsilo-0.1.0/ccsilo/data/download-index.seed.json +95 -0
  35. ccsilo-0.1.0/ccsilo/download_index.py +119 -0
  36. ccsilo-0.1.0/ccsilo/download_picker.py +244 -0
  37. ccsilo-0.1.0/ccsilo/downloader.py +393 -0
  38. ccsilo-0.1.0/ccsilo/extractor.py +116 -0
  39. ccsilo-0.1.0/ccsilo/model_proxy.py +404 -0
  40. ccsilo-0.1.0/ccsilo/patch_workflow.py +255 -0
  41. ccsilo-0.1.0/ccsilo/patcher.py +434 -0
  42. ccsilo-0.1.0/ccsilo/patches/__init__.py +195 -0
  43. ccsilo-0.1.0/ccsilo/patches/_pinned_default.py +3 -0
  44. ccsilo-0.1.0/ccsilo/patches/_registry.py +93 -0
  45. ccsilo-0.1.0/ccsilo/patches/_versions.py +131 -0
  46. ccsilo-0.1.0/ccsilo/patches/agents_md.py +101 -0
  47. ccsilo-0.1.0/ccsilo/patches/allow_custom_agent_models.py +66 -0
  48. ccsilo-0.1.0/ccsilo/patches/auto_accept_plan_mode.py +49 -0
  49. ccsilo-0.1.0/ccsilo/patches/filter_scroll_escape_sequences.py +67 -0
  50. ccsilo-0.1.0/ccsilo/patches/hide_ctrl_g.py +28 -0
  51. ccsilo-0.1.0/ccsilo/patches/hide_startup_banner.py +50 -0
  52. ccsilo-0.1.0/ccsilo/patches/hide_startup_clawd.py +46 -0
  53. ccsilo-0.1.0/ccsilo/patches/input_border_box.py +76 -0
  54. ccsilo-0.1.0/ccsilo/patches/mcp_startup.py +59 -0
  55. ccsilo-0.1.0/ccsilo/patches/model_customizations.py +60 -0
  56. ccsilo-0.1.0/ccsilo/patches/opusplan1m.py +118 -0
  57. ccsilo-0.1.0/ccsilo/patches/patches_applied_indication.py +23 -0
  58. ccsilo-0.1.0/ccsilo/patches/prompt_overlays.py +31 -0
  59. ccsilo-0.1.0/ccsilo/patches/remember_skill.py +42 -0
  60. ccsilo-0.1.0/ccsilo/patches/session_memory.py +110 -0
  61. ccsilo-0.1.0/ccsilo/patches/show_more_items.py +47 -0
  62. ccsilo-0.1.0/ccsilo/patches/statusline_update_throttle.py +73 -0
  63. ccsilo-0.1.0/ccsilo/patches/suppress_line_numbers.py +89 -0
  64. ccsilo-0.1.0/ccsilo/patches/suppress_model_launch_notice.py +45 -0
  65. ccsilo-0.1.0/ccsilo/patches/suppress_native_installer_warning.py +36 -0
  66. ccsilo-0.1.0/ccsilo/patches/suppress_prompt_caching_warning.py +44 -0
  67. ccsilo-0.1.0/ccsilo/patches/suppress_rate_limit_options.py +30 -0
  68. ccsilo-0.1.0/ccsilo/patches/system_prompts.py +156 -0
  69. ccsilo-0.1.0/ccsilo/patches/themes.py +29 -0
  70. ccsilo-0.1.0/ccsilo/patches/thinking_visibility.py +30 -0
  71. ccsilo-0.1.0/ccsilo/patches/token_count_rounding.py +46 -0
  72. ccsilo-0.1.0/ccsilo/providers/__init__.py +63 -0
  73. ccsilo-0.1.0/ccsilo/providers/config.py +168 -0
  74. ccsilo-0.1.0/ccsilo/providers/loader.py +214 -0
  75. ccsilo-0.1.0/ccsilo/providers/mcp_catalog.py +150 -0
  76. ccsilo-0.1.0/ccsilo/providers/model_discovery.py +73 -0
  77. ccsilo-0.1.0/ccsilo/providers/registry/9router.json +55 -0
  78. ccsilo-0.1.0/ccsilo/providers/registry/alibaba.json +56 -0
  79. ccsilo-0.1.0/ccsilo/providers/registry/anthropic.json +56 -0
  80. ccsilo-0.1.0/ccsilo/providers/registry/ccr-oauth.json +68 -0
  81. ccsilo-0.1.0/ccsilo/providers/registry/ccrouter.json +67 -0
  82. ccsilo-0.1.0/ccsilo/providers/registry/cerebras.json +58 -0
  83. ccsilo-0.1.0/ccsilo/providers/registry/custom.json +52 -0
  84. ccsilo-0.1.0/ccsilo/providers/registry/deepseek.json +57 -0
  85. ccsilo-0.1.0/ccsilo/providers/registry/gatewayz.json +56 -0
  86. ccsilo-0.1.0/ccsilo/providers/registry/kimi.json +56 -0
  87. ccsilo-0.1.0/ccsilo/providers/registry/lmstudio.json +64 -0
  88. ccsilo-0.1.0/ccsilo/providers/registry/local-custom.json +60 -0
  89. ccsilo-0.1.0/ccsilo/providers/registry/minimax-cn.json +57 -0
  90. ccsilo-0.1.0/ccsilo/providers/registry/minimax.json +72 -0
  91. ccsilo-0.1.0/ccsilo/providers/registry/mirror.json +56 -0
  92. ccsilo-0.1.0/ccsilo/providers/registry/nanogpt.json +56 -0
  93. ccsilo-0.1.0/ccsilo/providers/registry/ollama.json +66 -0
  94. ccsilo-0.1.0/ccsilo/providers/registry/omlx.json +64 -0
  95. ccsilo-0.1.0/ccsilo/providers/registry/openrouter.json +56 -0
  96. ccsilo-0.1.0/ccsilo/providers/registry/poe.json +56 -0
  97. ccsilo-0.1.0/ccsilo/providers/registry/vercel.json +58 -0
  98. ccsilo-0.1.0/ccsilo/providers/registry/zai.json +94 -0
  99. ccsilo-0.1.0/ccsilo/providers/schema.py +331 -0
  100. ccsilo-0.1.0/ccsilo/tui/__init__.py +471 -0
  101. ccsilo-0.1.0/ccsilo/tui/_const.py +34 -0
  102. ccsilo-0.1.0/ccsilo/tui/_runtime.py +21 -0
  103. ccsilo-0.1.0/ccsilo/tui/busy.py +97 -0
  104. ccsilo-0.1.0/ccsilo/tui/dashboard.py +215 -0
  105. ccsilo-0.1.0/ccsilo/tui/dispatch.py +693 -0
  106. ccsilo-0.1.0/ccsilo/tui/keys.py +114 -0
  107. ccsilo-0.1.0/ccsilo/tui/nav.py +305 -0
  108. ccsilo-0.1.0/ccsilo/tui/options.py +6 -0
  109. ccsilo-0.1.0/ccsilo/tui/options_dashboard.py +217 -0
  110. ccsilo-0.1.0/ccsilo/tui/options_setup.py +214 -0
  111. ccsilo-0.1.0/ccsilo/tui/options_tweaks.py +303 -0
  112. ccsilo-0.1.0/ccsilo/tui/options_variant.py +527 -0
  113. ccsilo-0.1.0/ccsilo/tui/render_frame.py +429 -0
  114. ccsilo-0.1.0/ccsilo/tui/render_labels.py +963 -0
  115. ccsilo-0.1.0/ccsilo/tui/rendering.py +4 -0
  116. ccsilo-0.1.0/ccsilo/tui/setup_actions.py +951 -0
  117. ccsilo-0.1.0/ccsilo/tui/state.py +229 -0
  118. ccsilo-0.1.0/ccsilo/tui/themes.py +191 -0
  119. ccsilo-0.1.0/ccsilo/tui/variant_actions.py +224 -0
  120. ccsilo-0.1.0/ccsilo/variant_tweaks.py +30 -0
  121. ccsilo-0.1.0/ccsilo/variants/__init__.py +121 -0
  122. ccsilo-0.1.0/ccsilo/variants/ascii/cerebras.txt +31 -0
  123. ccsilo-0.1.0/ccsilo/variants/ascii/deepseek.txt +22 -0
  124. ccsilo-0.1.0/ccsilo/variants/ascii/minimax-cn.txt +14 -0
  125. ccsilo-0.1.0/ccsilo/variants/ascii/minimax.txt +14 -0
  126. ccsilo-0.1.0/ccsilo/variants/ascii/ollama.txt +40 -0
  127. ccsilo-0.1.0/ccsilo/variants/ascii/openrouter.txt +36 -0
  128. ccsilo-0.1.0/ccsilo/variants/ascii/zai.txt +21 -0
  129. ccsilo-0.1.0/ccsilo/variants/build.py +491 -0
  130. ccsilo-0.1.0/ccsilo/variants/builder.py +156 -0
  131. ccsilo-0.1.0/ccsilo/variants/ccrouter.py +385 -0
  132. ccsilo-0.1.0/ccsilo/variants/constants.py +24 -0
  133. ccsilo-0.1.0/ccsilo/variants/install.py +320 -0
  134. ccsilo-0.1.0/ccsilo/variants/lifecycle.py +541 -0
  135. ccsilo-0.1.0/ccsilo/variants/model.py +231 -0
  136. ccsilo-0.1.0/ccsilo/variants/model_updates.py +101 -0
  137. ccsilo-0.1.0/ccsilo/variants/splash.py +176 -0
  138. ccsilo-0.1.0/ccsilo/variants/tweaks.py +376 -0
  139. ccsilo-0.1.0/ccsilo/variants/wrapper.py +413 -0
  140. ccsilo-0.1.0/ccsilo/workspace/__init__.py +146 -0
  141. ccsilo-0.1.0/ccsilo/workspace/artifacts.py +424 -0
  142. ccsilo-0.1.0/ccsilo/workspace/models.py +70 -0
  143. ccsilo-0.1.0/ccsilo/workspace/patches.py +358 -0
  144. ccsilo-0.1.0/ccsilo/workspace/paths.py +183 -0
  145. ccsilo-0.1.0/ccsilo/workspace/settings.py +61 -0
  146. ccsilo-0.1.0/ccsilo.egg-info/PKG-INFO +657 -0
  147. ccsilo-0.1.0/ccsilo.egg-info/SOURCES.txt +180 -0
  148. ccsilo-0.1.0/ccsilo.egg-info/dependency_links.txt +1 -0
  149. ccsilo-0.1.0/ccsilo.egg-info/entry_points.txt +2 -0
  150. ccsilo-0.1.0/ccsilo.egg-info/requires.txt +10 -0
  151. ccsilo-0.1.0/ccsilo.egg-info/top_level.txt +1 -0
  152. ccsilo-0.1.0/pyproject.toml +61 -0
  153. ccsilo-0.1.0/setup.cfg +4 -0
  154. ccsilo-0.1.0/tests/test_binary_patcher_apply.py +202 -0
  155. ccsilo-0.1.0/tests/test_binary_patcher_bun_compat.py +57 -0
  156. ccsilo-0.1.0/tests/test_binary_patcher_js_patch.py +118 -0
  157. ccsilo-0.1.0/tests/test_binary_patcher_prompts.py +116 -0
  158. ccsilo-0.1.0/tests/test_binary_patcher_repack.py +308 -0
  159. ccsilo-0.1.0/tests/test_binary_patcher_strip_bun_wrapper.py +39 -0
  160. ccsilo-0.1.0/tests/test_binary_patcher_theme.py +126 -0
  161. ccsilo-0.1.0/tests/test_binary_patcher_unpack_and_patch.py +269 -0
  162. ccsilo-0.1.0/tests/test_bun_extract.py +281 -0
  163. ccsilo-0.1.0/tests/test_bun_extract_replace.py +68 -0
  164. ccsilo-0.1.0/tests/test_bundler.py +229 -0
  165. ccsilo-0.1.0/tests/test_codesign.py +56 -0
  166. ccsilo-0.1.0/tests/test_download_index.py +26 -0
  167. ccsilo-0.1.0/tests/test_download_picker.py +43 -0
  168. ccsilo-0.1.0/tests/test_downloader.py +331 -0
  169. ccsilo-0.1.0/tests/test_extractor.py +96 -0
  170. ccsilo-0.1.0/tests/test_integration_real_binary.py +75 -0
  171. ccsilo-0.1.0/tests/test_model_proxy.py +196 -0
  172. ccsilo-0.1.0/tests/test_package.py +27 -0
  173. ccsilo-0.1.0/tests/test_patch_release_check.py +246 -0
  174. ccsilo-0.1.0/tests/test_patcher.py +600 -0
  175. ccsilo-0.1.0/tests/test_prompt_extractor.py +406 -0
  176. ccsilo-0.1.0/tests/test_prompt_version_extraction.py +353 -0
  177. ccsilo-0.1.0/tests/test_providers.py +582 -0
  178. ccsilo-0.1.0/tests/test_suggest_prompt_metadata.py +347 -0
  179. ccsilo-0.1.0/tests/test_tui.py +2845 -0
  180. ccsilo-0.1.0/tests/test_variant_tweaks.py +269 -0
  181. ccsilo-0.1.0/tests/test_variants.py +2288 -0
  182. ccsilo-0.1.0/tests/test_workspace.py +461 -0
ccsilo-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,657 @@
1
+ Metadata-Version: 2.4
2
+ Name: ccsilo
3
+ Version: 0.1.0
4
+ Summary: Isolated Claude Code silos with provider-specific patching
5
+ Author: whit3rabbit
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/whit3rabbit/ccsilo
8
+ Project-URL: Repository, https://github.com/whit3rabbit/ccsilo
9
+ Project-URL: Issues, https://github.com/whit3rabbit/ccsilo/issues
10
+ Project-URL: Documentation, https://github.com/whit3rabbit/ccsilo#readme
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Environment :: Console
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Operating System :: MacOS
22
+ Classifier: Operating System :: Microsoft :: Windows
23
+ Classifier: Operating System :: POSIX :: Linux
24
+ Classifier: Topic :: Software Development :: Build Tools
25
+ Classifier: Topic :: Utilities
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ Requires-Dist: ratatui>=0.4.2
29
+ Requires-Dist: tqdm>=4.66.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: build>=1.2.0; extra == "dev"
32
+ Requires-Dist: pytest>=7.4.0; extra == "dev"
33
+ Requires-Dist: ruff>=0.8.0; extra == "dev"
34
+ Requires-Dist: tree-sitter>=0.25.0; extra == "dev"
35
+ Requires-Dist: tree-sitter-javascript>=0.25.0; extra == "dev"
36
+ Requires-Dist: twine>=5.0.0; extra == "dev"
37
+
38
+ # ccsilo
39
+
40
+ > [!IMPORTANT]
41
+ > This project is not affiliated with Anthropic or Claude Code. It is for research and controlled local patching of Claude Code packaged binaries. Do not use it to silently mutate a global Claude Code install.
42
+
43
+ `ccsilo` creates isolated Claude Code silos with provider-specific patching. Think ccmirror/tweakcc-style workflows first: it creates isolated commands, routes them through provider presets, applies curated UI/system/prompt tweaks, manages local setup config, and can build patched binaries from selected tweaks.
44
+
45
+ The extractor/repacker is still here, but it is the advanced layer. Most users should use the TUI to create a setup, then run the generated wrapper command.
46
+
47
+ Based in part on work by https://github.com/vicnaum/bun-demincer. Theme and prompt anchor logic is attributed in [docs/THIRD_PARTY_NOTICES.md](docs/THIRD_PARTY_NOTICES.md).
48
+
49
+ ## Quick Start
50
+
51
+ Stable install, once the package is published to PyPI:
52
+
53
+ ```bash
54
+ pipx install ccsilo
55
+ ccsilo --provider mirror install --yes
56
+ mirror --version
57
+ ```
58
+
59
+ Provider setup in one command:
60
+
61
+ ```bash
62
+ ccsilo --provider kimi install --credential-env KIMI_API_KEY --yes
63
+ kimi --version
64
+ ```
65
+
66
+ If `ccsilo` is not found after a pipx install:
67
+
68
+ ```bash
69
+ pipx ensurepath
70
+ ```
71
+
72
+ Then restart your shell.
73
+
74
+ To run once from GitHub before the first PyPI release, or without keeping an installed command:
75
+
76
+ ```bash
77
+ pipx run --spec git+https://github.com/whit3rabbit/ccsilo.git ccsilo
78
+ ```
79
+
80
+ If you already use `uv`, the equivalent one-shot command is:
81
+
82
+ ```bash
83
+ uv tool run --from git+https://github.com/whit3rabbit/ccsilo.git ccsilo
84
+ ```
85
+
86
+ From a developer checkout:
87
+
88
+ ```bash
89
+ .venv/bin/python -m pip install -e .
90
+ .venv/bin/python -m ccsilo
91
+ ```
92
+
93
+ Running `ccsilo` with no arguments in a TTY opens the TUI. If no setups exist, it starts the first-run setup wizard. If setups already exist, it opens `Manage Setup`.
94
+
95
+ The fastest path:
96
+
97
+ 1. Choose a provider preset, for example `mirror`, `kimi`, `openrouter`, `ccrouter`, or `lmstudio`.
98
+ 2. Choose a setup name. This becomes the local wrapper command name.
99
+ 3. Choose a Claude Code native binary version, usually `latest`.
100
+ 4. Configure credentials. Use an environment variable, or store an API key in the setup-local `secrets.env`.
101
+ 5. Pick optional MCP servers. Provider-owned MCP servers are enabled automatically.
102
+ 6. Set model aliases if the provider needs them.
103
+ 7. Choose recommended tweaks, review, then create the setup.
104
+ 8. Run it from `Manage Setup`, from the installed provider command, from the workspace wrapper, or with `ccsilo variant run <setup-id> -- ...`.
105
+
106
+ Inspect the resolved command and workspace paths:
107
+
108
+ ```bash
109
+ ccsilo paths
110
+ ```
111
+
112
+ ## Where Files Go
113
+
114
+ By default, installed usage stores managed setups in the platform user data directory:
115
+
116
+ | Platform | Default workspace |
117
+ |----------|-------------------|
118
+ | macOS | `~/Library/Application Support/ccsilo` |
119
+ | Linux | `${XDG_DATA_HOME:-~/.local/share}/ccsilo` |
120
+ | Windows | `%APPDATA%\ccsilo` |
121
+
122
+ Set `CCSILO_WORKSPACE=/path/to/workspace` to use a project-local or disposable workspace. For repository development, this keeps the old local layout:
123
+
124
+ ```bash
125
+ CCSILO_WORKSPACE="$PWD/.ccsilo" .venv/bin/python -m ccsilo
126
+ ```
127
+
128
+ The workspace contains:
129
+
130
+ ```text
131
+ <workspace>/
132
+ variants/<setup-id>/variant.json
133
+ variants/<setup-id>/native/
134
+ variants/<setup-id>/config/
135
+ variants/<setup-id>/tweakcc/config.json
136
+ variants/<setup-id>/secrets.env
137
+ downloads/native/
138
+ downloads/npm/
139
+ patches/tweak-profiles/
140
+ patched/native/
141
+ bin/<setup-id>
142
+ ```
143
+
144
+ Important paths:
145
+
146
+ | Path | Purpose |
147
+ |------|---------|
148
+ | `<workspace>/bin/<setup-id>` | Wrapper command for the finished setup. |
149
+ | `<workspace>/variants/<setup-id>/variant.json` | Setup manifest: provider, source version, selected tweaks, model overrides, MCP choices, and wrapper paths. |
150
+ | `<workspace>/variants/<setup-id>/config/` | Isolated Claude Code config for the setup. |
151
+ | `<workspace>/variants/<setup-id>/secrets.env` | Optional setup-local credential file, only written when you choose stored credentials. |
152
+ | `<workspace>/downloads/native/` | Checksum-verified downloaded or imported native Claude Code binaries. |
153
+ | `<workspace>/patches/tweak-profiles/` | Saved Dashboard tweak selections. |
154
+ | `<workspace>/patched/native/` | Dashboard-built patched native binaries. |
155
+
156
+ Deleting a setup removes its setup directory and wrapper command. Shared downloads and caches are not removed.
157
+
158
+ ## Running A Finished Setup
159
+
160
+ From the TUI, select a setup in `Manage Setup`, then choose `Run Claude`.
161
+
162
+ From a shell, run the generated wrapper:
163
+
164
+ ```bash
165
+ ccsilo variant run my-setup -- --version
166
+ ccsilo variant run my-setup -- --print "hello"
167
+ ```
168
+
169
+ Or run the workspace wrapper directly:
170
+
171
+ ```bash
172
+ "$(ccsilo paths --json | python -c 'import json,sys; print(json.load(sys.stdin)["workspace"])')/bin/my-setup" --version
173
+ ```
174
+
175
+ To install a stable command into a home PATH directory:
176
+
177
+ ```bash
178
+ ccsilo variant install my-setup
179
+ ccsilo variant install my-setup --alias claude-kimi
180
+ ccsilo variant install my-setup --bin-dir ~/.local/bin --yes
181
+ ```
182
+
183
+ `variant install` creates a managed symlink to the setup wrapper. It refuses to overwrite non-symlinks or symlinks owned by something else.
184
+
185
+ Provider shortcuts can create or update the default setup for a provider and install the command in one step. By default, the installed command is the provider key, for example `kimi`, `zai`, or `ccrouter`.
186
+
187
+ ```bash
188
+ ccsilo --provider kimi install --credential-env KIMI_API_KEY
189
+ ccsilo --provider zai install --credential-env Z_AI_API_KEY
190
+ ccsilo install --provider openrouter --credential-env OPENROUTER_API_KEY --alias claude-openrouter
191
+ ccsilo --provider kimi update
192
+ ccsilo --provider kimi uninstall --yes
193
+ ```
194
+
195
+ ## How To Uninstall
196
+
197
+ Remove one provider setup:
198
+
199
+ ```bash
200
+ ccsilo --provider kimi uninstall --yes
201
+ ```
202
+
203
+ Remove managed symlinks and the current workspace:
204
+
205
+ ```bash
206
+ ccsilo uninstall --yes
207
+ ```
208
+
209
+ Remove the `ccsilo` command installed by pipx:
210
+
211
+ ```bash
212
+ pipx uninstall ccsilo
213
+ ```
214
+
215
+ ## Troubleshooting PATH
216
+
217
+ Use `ccsilo paths` to see the active workspace and whether `ccsilo` is on PATH.
218
+
219
+ If `ccsilo` itself is missing after pipx install, run `pipx ensurepath` and restart your shell.
220
+
221
+ If a setup command such as `kimi` is missing, rerun the provider install with `--yes` to create `~/.local/bin`, or pass an explicit bin directory:
222
+
223
+ ```bash
224
+ ccsilo --provider kimi install --credential-env KIMI_API_KEY --yes
225
+ ccsilo --provider kimi install --credential-env KIMI_API_KEY --bin-dir ~/.local/bin --yes
226
+ ```
227
+
228
+ ## TUI Guide
229
+
230
+ Navigate with arrow keys, `Tab` or `Right` to move tabs, `Left` to move back through tabs, `Enter` to activate, `Space` to toggle, and `Esc` or `Backspace` to go back.
231
+
232
+ | Tab | What it is for |
233
+ |-----|----------------|
234
+ | Manage Setup | Create, run, health-check, upgrade, edit models, edit tweaks, delete, search, filter, and sort setups. |
235
+ | Dashboard | Build a patched native binary from a selected source and curated tweak set. |
236
+ | Inspect | View Bun bundle metadata for a selected native download and delete cached native artifacts. |
237
+ | Extract | Extract or unpack a selected native download to disk. |
238
+ | Patch | Apply workspace patch packages to a source binary. |
239
+
240
+ Common setup keys:
241
+
242
+ | Key | Action |
243
+ |-----|--------|
244
+ | `n` | Create a new setup |
245
+ | `x` | Run selected setup after leaving the TUI |
246
+ | `u` | Upgrade selected setup |
247
+ | `h` | Health-check selected setup |
248
+ | `m` | Edit model aliases |
249
+ | `t` | Edit tweaks |
250
+ | `d` | Delete selected setup |
251
+ | `/` | Search setups |
252
+ | `p` | Cycle provider filter |
253
+ | `s` | Cycle setup sort |
254
+ | `c` | Copy setup command path |
255
+ | `g` | Copy setup config path |
256
+ | `l` | Open last action logs |
257
+ | `?` | Open help |
258
+ | `q` | Quit |
259
+
260
+ Themes for the TUI itself are `hacker-bbs` (default), `unicorn`, `dark`, `light`, and `high-contrast`.
261
+
262
+ ## Providers
263
+
264
+ Provider presets configure endpoint environment variables, credentials, optional prompt overlays, theme labels, MCP config, and model defaults. `mirror` is the clean isolated Claude Code setup with no alternate provider.
265
+
266
+ | Key | Display name | Auth | Credential env | Best use |
267
+ |-----|--------------|------|----------------|----------|
268
+ | `mirror` | Mirror Claude Code | none | not required | Isolated first-party Claude Code config with clean defaults. |
269
+ | `ccrouter` | CC Router | auth token | `CCROUTER_AUTH_TOKEN` | Local Claude Code Router service at `127.0.0.1:3456`. |
270
+ | `ccr-oauth` | CCR OAuth Proxy | auth token | `CCROUTER_AUTH_TOKEN` | Managed CCR plus Architect Mode, keeping `claude-*` calls on Claude Code OAuth/session auth. |
271
+ | `kimi` | Kimi Code | API key | `KIMI_API_KEY` | Kimi coding models through Kimi Code. |
272
+ | `minimax` | MiniMax Cloud | API key | `MINIMAX_API_KEY` | MiniMax cloud endpoint. |
273
+ | `minimax-cn` | MiniMax China | API key | `MINIMAX_CN_API_KEY` | MiniMax China Anthropic-compatible endpoint. |
274
+ | `zai` | Zai Cloud | API key | `Z_AI_API_KEY` | GLM models through Z.ai Coding Plan. |
275
+ | `deepseek` | DeepSeek | API key | `DEEPSEEK_API_KEY` | DeepSeek Anthropic API. |
276
+ | `alibaba` | Alibaba Cloud | API key | `ALIBABA_CLOUD_API_KEY` | DashScope Anthropic-compatible API. |
277
+ | `poe` | Poe | auth token | `POE_API_KEY` | Claude through Poe Anthropic-compatible API. |
278
+ | `openrouter` | OpenRouter | auth token | `OPENROUTER_API_KEY` | OpenRouter gateway. |
279
+ | `vercel` | Vercel AI Gateway | auth token | `VERCEL_AI_GATEWAY_KEY` | Vercel AI Gateway. |
280
+ | `ollama` | Ollama | auth token | `OLLAMA_API_KEY` | Local or cloud models through Ollama. |
281
+ | `nanogpt` | NanoGPT | auth token | `NANOGPT_API_KEY` | NanoGPT model gateway. |
282
+ | `9router` | 9Router | API key | `NINEROUTER_API_KEY` | Local 9Router fallback and format translation. |
283
+ | `cerebras` | Cerebras (via CCRouter) | auth token | `CEREBRAS_API_KEY` | Cerebras through local Claude Code Router. |
284
+ | `anthropic` | Anthropic Console | API key | `ANTHROPIC_API_KEY` | First-party Anthropic Console API key. |
285
+ | `gatewayz` | GatewayZ | auth token | `GATEWAYZ_API_KEY` | GatewayZ AI Gateway. |
286
+ | `custom` | Custom | API key | `ANTHROPIC_API_KEY` | Bring your own Anthropic-compatible endpoint. |
287
+ | `lmstudio` | LM Studio | auth token | `LM_API_TOKEN` | Local OpenAI-compatible models through LM Studio. |
288
+ | `omlx` | oMLX | auth token | `OMLX_API_KEY` | Local MLX-powered models through oMLX. |
289
+ | `local-custom` | Custom Local Endpoint | auth token | `LOCAL_LLM_API_KEY` | Custom local Anthropic or OpenAI-compatible endpoint. |
290
+
291
+ List provider details from the CLI:
292
+
293
+ ```bash
294
+ ccsilo variant providers
295
+ ccsilo variant providers --json
296
+ ccsilo variant mcp
297
+ ccsilo variant mcp --provider kimi
298
+ ```
299
+
300
+ ### CC Router
301
+
302
+ The `ccrouter` provider can manage Claude Code Router inside the setup workspace. By default, ccsilo installs CCR locally under the setup, copies `~/.claude-code-router/config.json` into the setup when it exists, assigns an isolated local port, and runs CCR with `HOME` pointed at the setup-local home.
303
+
304
+ ```bash
305
+ ccsilo variant create --name ccrouter --provider ccrouter
306
+ ccsilo variant create --name ccrouter --provider ccrouter --ccrouter-config empty
307
+ ccsilo variant create --name ccrouter --provider ccrouter --ccrouter-package @musistudio/claude-code-router@2.0.0
308
+ ccsilo variant create --name ccrouter --provider ccrouter --ccrouter-port 4567
309
+ ccsilo variant create --name ccrouter --provider ccrouter --no-ccrouter-autostart
310
+ ```
311
+
312
+ Managed CCR config lives at:
313
+
314
+ ```text
315
+ .ccsilo/variants/<setup-id>/ccr-home/.claude-code-router/config.json
316
+ ```
317
+
318
+ Use `--ccrouter-mode external` when you want to install, configure, and start CCR yourself:
319
+
320
+ ```bash
321
+ npm install -g @musistudio/claude-code-router
322
+ ccr start
323
+ ccsilo variant create --name ccrouter --provider ccrouter --ccrouter-mode external
324
+ ```
325
+
326
+ For managed setups, edit the setup-local CCR config instead of the global CCR config. The wrapper starts the local `ccr` service when needed and runs the patched Claude binary directly. It does not call `ccr code`. See [docs/CCR.md](docs/CCR.md) for the longer flow.
327
+
328
+ `ccr-oauth` plus the Architect Mode tweak can use a planner model in plan mode and worker models otherwise:
329
+
330
+ ```bash
331
+ ccsilo variant create \
332
+ --name architect \
333
+ --provider ccr-oauth \
334
+ --model-proxy architect \
335
+ --tweak opusplan1m
336
+ ```
337
+
338
+ This requires a Claude Code account and login. `claude-*` planner requests use the normal Claude Code OAuth/session path, while non-Claude worker aliases are forwarded to the configured provider backend.
339
+
340
+ ## Supported Sources And Binaries
341
+
342
+ The wrapper command is the recommended runtime. Direct binary paths are managed implementation details unless you are doing advanced extraction or patch development.
343
+
344
+ | Source or binary | Supported container | Main workflow | Notes |
345
+ |------------------|---------------------|---------------|-------|
346
+ | Downloaded native Claude Code binary | macOS Mach-O, Linux ELF, Windows PE | TUI setup creation, Dashboard builds, CLI `download` | Cached under `<workspace>/downloads/native/<version>/<platform>/<sha256>/`. |
347
+ | Imported local native binary | Mach-O, ELF, or PE matching `--source-platform` | CLI-only `variant create/update --source-binary` | Requires a concrete semver in `--claude-version`. The original file is copied into the managed cache. |
348
+ | NPM tarball | Anthropic NPM package tarball | CLI `download --npm` | Separate cache, mainly useful for advanced inspection/source comparison. Requires `npm`. |
349
+ | Extracted bundle directory | `.bundle_manifest.json` plus extracted modules | `extract`, `unpack`, `pack`, legacy patch manifests | Advanced workflow for bundle research and controlled patch packages. |
350
+ | Dashboard patched binary | Same native platform as selected source | Dashboard tab | Written under `<workspace>/patched/native/`; a setup wrapper is still the normal thing to run. |
351
+
352
+ Normal setup creation and Dashboard builds use centralized downloads. The TUI loads the local download index first, then refreshes the live Claude Code version index once at startup. If no live index is available, the packaged seed index is used until refresh succeeds.
353
+
354
+ Native downloads are checksum-verified before storage. On non-Windows systems, stored native binaries and wrappers are marked executable.
355
+
356
+ ## Tweaks
357
+
358
+ Setup tweaks can change the native binary, the unpacked Node fallback, prompt overlays, wrapper environment, or setup launch arguments. Dashboard tweaks are for standalone patched binary builds. Env tweaks only affect wrapper environment.
359
+
360
+ Badges:
361
+
362
+ | Badge | Meaning |
363
+ |-------|---------|
364
+ | Setup default | Enabled by default in new setups when applicable. |
365
+ | Setup | Available in setup tweak selection. |
366
+ | Dashboard | Available in Dashboard binary builds. |
367
+ | Env | Wrapper environment tweak, not a regex patch. |
368
+
369
+ <details>
370
+ <summary>Full tweak reference</summary>
371
+
372
+ | ID | Name | Group | Availability | Description |
373
+ |----|------|-------|--------------|-------------|
374
+ | `themes` | Custom themes | ui | Setup default, Setup | Inject custom theme entries into Claude Code's theme registry. |
375
+ | `prompt-overlays` | Prompt overlays | prompts | Setup default, Setup | Inject provider-specific overlay text after known prompt anchors. |
376
+ | `show-more-items-in-select-menus` | Show more items in select menus | ui | Setup, Dashboard | Increase visible options to show more items on screen. |
377
+ | `model-customizations` | Custom Claude models in picker | ui | Setup, Dashboard | Add extended Claude model entries to the model picker. |
378
+ | `hide-startup-banner` | Hide startup banner | ui | Setup default, Setup, Dashboard | Hide the welcome banner shown before the first message. |
379
+ | `hide-startup-clawd` | Hide ASCII startup banner | ui | Setup default, Setup, Dashboard | Hide the ASCII startup mascot. |
380
+ | `hide-ctrl-g-to-edit` | Hide Ctrl+G edit hint | ui | Setup, Dashboard | Hide the input footer edit hint. |
381
+ | `suppress-line-numbers` | Suppress line numbers in file reads | ui | Setup, Dashboard | Strip per-line line-number prefixes from file-read output. |
382
+ | `suppress-model-launch-notice` | Suppress model launch notice | ui | Setup default, Setup, Dashboard | Hide startup notices announcing newly available Claude models. |
383
+ | `suppress-native-installer-warning` | Suppress native installer warning | ui | Setup default, Setup, Dashboard | Remove the warning that prompts NPM users to install the native binary. |
384
+ | `suppress-prompt-caching-warning` | Suppress prompt caching warning | ui | Setup default, Setup, Dashboard | Hide the warning shown when prompt caching is disabled by env vars. |
385
+ | `suppress-rate-limit-options` | Suppress rate limit options | ui | Setup, Dashboard | Disable the injected `/rate-limit-options` opener when rate limits are reached. |
386
+ | `thinking-visibility` | Thinking block visibility | thinking | Setup, Dashboard | Show model thinking blocks without the transcript-mode visibility toggle. |
387
+ | `input-box-border` | Input box border | ui | Setup, Dashboard | Remove the rounded border around the main prompt input box. |
388
+ | `filter-scroll-escape-sequences` | Filter scroll escape sequences | system | Setup, Dashboard | Filter stdout escape sequences that set or reset scroll regions. |
389
+ | `agents-md` | AGENTS.md support | system | Setup, Dashboard | Read `AGENTS.md` and configured alternative instruction filenames when `CLAUDE.md` is absent. |
390
+ | `session-memory` | Session memory | prompts | Setup, Dashboard | Enable session memory extraction and past-session search with env-configurable thresholds. |
391
+ | `remember-skill` | Remember skill | prompts | Setup | Register the built-in `/remember` skill for older Claude Code versions that do not bundle it. |
392
+ | `opusplan1m` | Architect Mode | ui | Setup, Dashboard | Add an Architect Mode alias that uses a planner model in plan mode and a worker model otherwise. |
393
+ | `mcp-non-blocking` | MCP non-blocking | tools | Setup default, Setup, Dashboard | Avoid blocking Claude Code startup while MCP servers connect. |
394
+ | `mcp-batch-size` | MCP batch size | tools | Setup default, Setup, Dashboard | Raise MCP server startup batch size. Defaults to 10 unless configured. |
395
+ | `rtk-shell-prefix` | RTK shell prefix | prompts | Setup default, Setup | Add prompt guidance to prefix shell commands with `rtk` when available. |
396
+ | `dangerously-skip-permissions` | Dangerously skip permissions | tools | Setup default, Setup | Launch the wrapper with `--dangerously-skip-permissions`. Use only when you understand the risk. |
397
+ | `token-count-rounding` | Token count rounding | ui | Setup, Dashboard | Round displayed token counts to the configured base. Defaults to 1000. |
398
+ | `statusline-update-throttle` | Statusline update throttling correction | ui | Setup, Dashboard | Replace flawed statusline debounce behavior with throttle pacing. Defaults to 300ms. |
399
+ | `auto-accept-plan-mode` | Auto-accept plan mode | ui | Setup, Dashboard | Auto-accept the "Ready to code?" plan-mode prompt. |
400
+ | `allow-custom-agent-models` | Allow custom agent models | ui | Setup, Dashboard | Relax subagent model validation so arbitrary string values are accepted. |
401
+ | `patches-applied-indication` | Patches-applied indication | ui | Setup, Dashboard | Append the provider label after `(Claude Code)` in the version banner. |
402
+ | `context-limit` | Context limit | env | Setup, Env | Set `CLAUDE_CODE_CONTEXT_LIMIT` in the wrapper. |
403
+ | `file-read-limit` | File read limit | env | Setup, Env | Set `CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS` in the wrapper. |
404
+ | `subagent-model` | Subagent model | env | Setup, Env | Set `CLAUDE_CODE_SUBAGENT_MODEL` in the wrapper. |
405
+ | `disable-telemetry` | Disable telemetry | env | Setup, Env | Opt out of Statsig telemetry. |
406
+ | `disable-error-reporting` | Disable error reporting | env | Setup, Env | Disable Sentry error reporting. |
407
+ | `disable-feedback-command` | Disable feedback command | env | Setup, Env | Hide the feedback command. |
408
+ | `disable-feedback-survey` | Disable feedback survey | env | Setup, Env | Disable session quality surveys. |
409
+ | `disable-prompt-caching` | Disable prompt caching | env | Setup, Env | Disable prompt caching for all models. |
410
+ | `disable-auto-compact` | Disable auto compact | env | Setup, Env | Disable automatic compaction while leaving manual compact available. |
411
+ | `disable-all-compact` | Disable all compact | env | Setup, Env | Disable automatic and manual compaction. |
412
+ | `disable-growthbook` | Disable GrowthBook | env | Setup, Env | Disable GrowthBook feature flag fetching. |
413
+ | `disable-nonessential-traffic` | Disable nonessential traffic | env | Setup, Env | Disable updater, feedback, error reporting, and telemetry traffic. |
414
+ | `skip-prompt-history` | Skip prompt history | env | Setup, Env | Skip writing prompt history and session transcripts. |
415
+ | `disable-auto-memory` | Disable auto memory | env | Setup, Env | Disable Claude Code auto memory. |
416
+ | `disable-cron` | Disable scheduled tasks | env | Setup, Env | Disable scheduled tasks and cron tools. |
417
+ | `subprocess-env-scrub` | Scrub subprocess env | env | Setup, Env | Strip provider credentials from subprocess environments. |
418
+ | `mcp-allowlist-env` | MCP allowlist env | env | Setup, Env | Start stdio MCP servers with a safe baseline environment plus configured env. |
419
+ | `disable-experimental-betas` | Disable experimental betas | env | Setup, Env | Strip Anthropic beta headers and beta tool-schema fields from API requests. |
420
+
421
+ </details>
422
+
423
+ For non-`mirror` providers, new setups also select these env-backed defaults: `disable-telemetry`, `disable-error-reporting`, `disable-feedback-command`, `disable-feedback-survey`, and `disable-prompt-caching`.
424
+
425
+ ## Setup CLI
426
+
427
+ The installed command is `ccsilo`. From a checkout, the canonical equivalent is `.venv/bin/python -m ccsilo`.
428
+
429
+ ```bash
430
+ ccsilo variant providers
431
+ ccsilo variant mcp
432
+ ccsilo variant create --name my-cc --provider kimi
433
+ ccsilo variant create --name my-cc --provider kimi --credential-env KIMI_API_KEY
434
+ ccsilo variant create --name local --provider lmstudio --api-key token --store-secret
435
+ ccsilo variant create --name offline --provider mirror --claude-version 2.1.123 --source-binary /path/to/claude
436
+ ccsilo variant list
437
+ ccsilo variant show my-cc --json
438
+ ccsilo variant apply my-cc
439
+ ccsilo variant update my-cc
440
+ ccsilo variant update offline --claude-version 2.1.124 --source-binary /path/to/claude
441
+ ccsilo variant update --all
442
+ ccsilo variant doctor my-cc
443
+ ccsilo variant doctor --all
444
+ ccsilo variant run my-cc -- [args...]
445
+ ccsilo variant install my-cc
446
+ ccsilo variant remove my-cc --yes
447
+ ccsilo --provider kimi install
448
+ ccsilo --provider zai install --credential-env Z_AI_API_KEY
449
+ ccsilo --provider kimi update
450
+ ccsilo --provider kimi uninstall --yes
451
+ ```
452
+
453
+ Create options:
454
+
455
+ | Flag | Description |
456
+ |------|-------------|
457
+ | `--name` | Setup name, also used as wrapper command. |
458
+ | `--provider` | Provider preset key. |
459
+ | `--claude-version` | Target version, `latest`, or `stable`. |
460
+ | `--source-binary` | Advanced: import a local Claude Code native binary instead of downloading. Requires concrete `--claude-version`. |
461
+ | `--source-platform` | Advanced: platform key for `--source-binary`. Defaults to the current host platform. |
462
+ | `--patch-profile` | Apply a saved patch profile. |
463
+ | `--tweak` | Curated tweak id, repeatable. |
464
+ | `--mcp` | Optional MCP server id, repeatable. |
465
+ | `--base-url` | Override the provider endpoint URL. |
466
+ | `--credential-env` | Environment variable for provider credentials. |
467
+ | `--api-key` | API key stored locally, requires `--store-secret`. |
468
+ | `--store-secret` | Store `--api-key` in setup-local `secrets.env`. |
469
+ | `--bin-dir` | Wrapper output directory. |
470
+ | `--install` | Install the setup command into a home PATH directory during creation. |
471
+ | `--extra-env` | Additional `KEY=VALUE` env entries, repeatable. |
472
+ | `--force` | Overwrite an existing setup. |
473
+ | Model overrides | `--opus`, `--sonnet`, `--haiku`, `--default`, `--small-fast`, `--subagent`. |
474
+
475
+ `--source-binary` is intentionally CLI-only. It is not shown in the TUI first-run wizard because it is an escape hatch for controlled local builds, not the normal setup path.
476
+
477
+ Rules for local source binaries:
478
+
479
+ - `--claude-version` must be a concrete semver such as `2.1.123`. `latest` and `stable` are rejected.
480
+ - `--source-platform` may be omitted. When omitted, ccsilo uses the current host platform key.
481
+ - The binary must parse as a Bun standalone binary. Mach-O requires a `darwin-*` platform, ELF requires `linux-*`, and PE requires `win32-*`.
482
+ - Rebuilds use the imported managed copy, not the original path.
483
+ - If the managed copy is missing or its hash changes, re-import it with `variant update <name> --claude-version <version> --source-binary <path>`.
484
+ - `variant update --all --source-binary ...` is rejected. Local binary replacement is only allowed for one setup at a time.
485
+
486
+ ## Downloads And Cache
487
+
488
+ ```bash
489
+ ccsilo download
490
+ ccsilo download --latest
491
+ ccsilo download 2.1.123
492
+ ccsilo download --npm 2.1.123
493
+ ```
494
+
495
+ When `--outdir` is omitted, downloads go into the centralized workspace cache. Use `--outdir` only when you intentionally want the legacy output layout outside the workspace:
496
+
497
+ ```bash
498
+ ccsilo download 2.1.123 --outdir ./downloads
499
+ ```
500
+
501
+ Native cache layout:
502
+
503
+ ```text
504
+ <workspace>/downloads/native/<version>/<platform>/<sha256>/claude
505
+ ```
506
+
507
+ NPM tarball cache layout:
508
+
509
+ ```text
510
+ <workspace>/downloads/npm/<version>/<sha256>/<tarball>.tgz
511
+ ```
512
+
513
+ ## Advanced Binary And Patch Commands
514
+
515
+ These commands are for research, fixture work, patch development, and controlled binary workflows. They are not the normal way to run a finished setup.
516
+
517
+ ### Inspect
518
+
519
+ ```bash
520
+ ccsilo inspect /path/to/claude
521
+ ccsilo inspect /path/to/claude --json
522
+ ```
523
+
524
+ ### Extract And Unpack
525
+
526
+ ```bash
527
+ ccsilo extract /path/to/claude ./extracted_files
528
+ ccsilo extract /path/to/claude ./extracted_files --include-sourcemaps
529
+ ccsilo unpack /path/to/claude --out ./extracted_files
530
+ ```
531
+
532
+ Extraction writes module files plus `.bundle_manifest.json`. The manifest records platform, module struct size, entry point, byte count, section metadata, and per-module offsets needed by repack.
533
+
534
+ ### Replace Entry JS
535
+
536
+ ```bash
537
+ ccsilo replace-entry /path/to/claude ./entry.js --out ./claude-patched
538
+ ```
539
+
540
+ This resizes only the Bun entry module and repacks the binary through `binary_patcher.repack_binary`.
541
+
542
+ ### Apply Binary Theme And Prompt Patches
543
+
544
+ ```bash
545
+ ccsilo apply-binary /path/to/claude --config ./config.json
546
+ ccsilo apply-binary /path/to/claude --config ./config.json --overlays ./overlays.json
547
+ ```
548
+
549
+ `config.json` may provide themes as either `{"themes": [...]}` or `{"settings": {"themes": [...]}}`. Prompt overlay misses are reported in the structured JSON result and are not fatal. Theme anchor misses return `anchor-not-found`.
550
+
551
+ On Mach-O binaries, patches that would grow the bundled entry JS may use the unpacked Node runtime fallback in setup workflows. Low-level `apply-binary` reports unsupported growth instead of silently rewriting a risky binary.
552
+
553
+ ### Patch Manifests
554
+
555
+ ```bash
556
+ ccsilo patch init ./my_patch
557
+ ccsilo patch apply ./my_patch ./extracted_files
558
+ ccsilo patch apply ./my_patch ./extracted_files --check
559
+ ccsilo patch apply ./my_patch ./extracted_files --binary /path/to/claude --source-version 1.2.3
560
+ ```
561
+
562
+ Creates or applies text patch manifests against extracted bundle files. `--check` validates without writing. `--binary` and `--source-version` override source metadata for cross-version patches.
563
+
564
+ ### Pack
565
+
566
+ ```bash
567
+ ccsilo pack ./modified_files /path/to/original_claude ./new_claude
568
+ ```
569
+
570
+ Rebuilds raw Bun bytes from `.bundle_manifest.json`, parses the base binary, and delegates container rewriting to `binary_patcher.repack_binary`.
571
+
572
+ ## Python API
573
+
574
+ ```python
575
+ from ccsilo import (
576
+ apply_patches,
577
+ download_binary,
578
+ download_npm,
579
+ extract_all,
580
+ pack_bundle,
581
+ parse_bun_binary,
582
+ replace_entry_js,
583
+ replace_module,
584
+ )
585
+ ```
586
+
587
+ The core model is `BunBinaryInfo` and `BunModule` from `ccsilo.bun_extract.types`.
588
+
589
+ ## Development
590
+
591
+ Install from a clone:
592
+
593
+ ```bash
594
+ .venv/bin/python -m pip install -e .
595
+ .venv/bin/python -m pip install -e '.[dev]'
596
+ ```
597
+
598
+ Run checks:
599
+
600
+ ```bash
601
+ .venv/bin/python -m pytest -q
602
+ ruff check ccsilo tests tools
603
+ ```
604
+
605
+ Build and publish release artifacts with the checklist in [docs/RELEASE.md](docs/RELEASE.md).
606
+
607
+ The default test suite does not download real Claude Code binaries. Run gated integration tests explicitly when you need live binary coverage:
608
+
609
+ ```bash
610
+ CCSILO_RUN_REAL_BINARY_TEST=1 .venv/bin/python -m pytest -q tests/test_integration_real_binary.py
611
+ CCSILO_RUN_REAL_BINARY_TEST=1 CCSILO_REAL_BINARY_VERSION=2.1.119 .venv/bin/python -m pytest -q tests/test_integration_real_binary.py
612
+ ```
613
+
614
+ Docker runtime smoke is preferred for release-prep patch proof:
615
+
616
+ ```bash
617
+ tools/run_patch_smoke_docker.sh --all --max-versions 10 --run-smoke --smoke-timeout 60
618
+ ```
619
+
620
+ ### Prompt Catalogs
621
+
622
+ Prompt catalogs live under `prompts/<version>.json`.
623
+
624
+ ```bash
625
+ .venv/bin/python tools/extract_prompt_versions.py --since-existing-latest
626
+ .venv/bin/python tools/extract_prompt_versions.py --missing
627
+ .venv/bin/python tools/extract_prompt_versions.py --missing --max-versions 5
628
+ .venv/bin/python tools/extract_prompt_versions.py --versions 2.1.130 2.1.129 --force-prompts
629
+ ```
630
+
631
+ The extractor downloads each native binary, extracts the bundled entry JS, extracts prompt strings, validates the prompt JSON schema, and writes `prompts/<version>.json`. New versions inherit prompt metadata from the nearest older local prompt catalog when same-version metadata is unavailable.
632
+
633
+ ### Architecture
634
+
635
+ ```text
636
+ ccsilo/
637
+ __main__.py CLI entry point, variant dispatcher, and TUI launch
638
+ cli/ argparse tree, command handlers, JSON payload helpers
639
+ tui/ setup manager, dashboard, rendering, state, navigation, keys
640
+ workspace/ workspace paths, artifacts, patch profiles, settings
641
+ variants/ setup lifecycle, builder, tweaks, wrapper, installs
642
+ providers/ provider registry, env builder, MCP config, model discovery
643
+ patches/ curated tweak registry and regex patch modules
644
+ bun_extract/ Bun standalone parser, extract, same-size replacement
645
+ binary_patcher/ native patching, entry replacement, repack, codesign, fallback
646
+ patch_workflow.py dashboard and workspace patch package workflows
647
+ patcher.py legacy extracted-text patch manifests
648
+ downloader.py native and NPM download helpers
649
+ ```
650
+
651
+ ```text
652
+ tools/
653
+ prompt_extractor.py Tree-sitter prompt extractor
654
+ extract_prompt_versions.py Batch prompt extraction and validation
655
+ check_patch_releases.py Patch compatibility report generator
656
+ run_patch_smoke_docker.sh Docker runtime smoke helper
657
+ ```