claudeup 4.19.0 → 4.22.0

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 (180) hide show
  1. package/bin/claudeup.js +43 -19
  2. package/package.json +14 -19
  3. package/scripts/build-binaries.ts +77 -0
  4. package/scripts/check-optional-deps.ts +49 -0
  5. package/scripts/test-isolated.ts +43 -0
  6. package/src/__tests__/cli-router.test.ts +65 -0
  7. package/src/__tests__/conventions-integration.test.ts +745 -0
  8. package/src/__tests__/conventions-manager.test.ts +1172 -0
  9. package/src/__tests__/doctor-bins.test.ts +35 -0
  10. package/src/__tests__/doctor.test.ts +450 -0
  11. package/src/__tests__/dual-write-prevention.test.ts +14 -4
  12. package/src/__tests__/file-locking.test.ts +208 -0
  13. package/src/__tests__/gitignore-prerun.test.ts +1 -0
  14. package/src/__tests__/install-command.test.ts +81 -0
  15. package/src/__tests__/install-plan.test.ts +98 -0
  16. package/src/__tests__/manifest.test.ts +136 -0
  17. package/src/__tests__/marketplace-refresh.test.ts +267 -0
  18. package/src/__tests__/plugin-requires.test.ts +133 -0
  19. package/src/__tests__/plugin-setup.test.ts +7 -0
  20. package/src/__tests__/profile-command.test.ts +116 -0
  21. package/src/__tests__/profile-materializer.test.ts +82 -0
  22. package/src/__tests__/profile-sync.test.ts +136 -0
  23. package/src/__tests__/registry-version-resolution.test.ts +74 -0
  24. package/src/__tests__/resolve-executable.test.ts +42 -0
  25. package/src/__tests__/resolver.test.ts +218 -0
  26. package/src/__tests__/symlink-manager.test.ts +99 -0
  27. package/src/__tests__/toolchain.test.ts +56 -0
  28. package/src/cli/claude.ts +21 -0
  29. package/src/cli/doctor.ts +132 -0
  30. package/src/cli/install.ts +360 -0
  31. package/src/cli/profile.ts +166 -0
  32. package/src/cli/router.ts +107 -0
  33. package/src/cli/update.ts +85 -0
  34. package/src/data/cli-tools.ts +7 -7
  35. package/src/data/gitignore-defaults.ts +4 -0
  36. package/src/data/marketplaces.ts +12 -0
  37. package/src/data/predefined-profiles.ts +3 -4
  38. package/src/main.tsx +11 -154
  39. package/src/prerunner/index.ts +62 -27
  40. package/src/services/claude-cli.ts +19 -22
  41. package/src/services/claude-settings.ts +99 -26
  42. package/src/services/conventions-manager.ts +865 -0
  43. package/src/services/doctor-bins.ts +49 -0
  44. package/src/services/doctor.ts +509 -0
  45. package/src/services/install-plan.ts +107 -0
  46. package/src/services/manifest.ts +166 -0
  47. package/src/services/marketplace-refresh.ts +173 -0
  48. package/src/services/plugin-manager.ts +7 -1
  49. package/src/services/plugin-requires.ts +215 -0
  50. package/src/services/plugin-version-check.ts +9 -4
  51. package/src/services/profile-materializer.ts +61 -0
  52. package/src/services/profile-sync.ts +150 -0
  53. package/src/services/resolver.ts +293 -0
  54. package/src/services/symlink-manager.ts +146 -0
  55. package/src/services/toolchain.ts +97 -0
  56. package/src/services/version-check.ts +10 -11
  57. package/src/types/index.ts +138 -31
  58. package/src/ui/App.tsx +0 -4
  59. package/src/ui/screens/CliToolsScreen.tsx +11 -3
  60. package/src/ui/screens/index.ts +0 -1
  61. package/src/ui/state/reducer.ts +0 -101
  62. package/src/ui/state/types.ts +0 -35
  63. package/src/utils/command-utils.ts +23 -0
  64. package/src/utils/file-locking.ts +144 -0
  65. package/src/data/alias-flags.js +0 -205
  66. package/src/data/cli-tools.js +0 -123
  67. package/src/data/gitignore-defaults.js +0 -24
  68. package/src/data/gitignore-reasons.js +0 -97
  69. package/src/data/gitignore-templates.js +0 -21
  70. package/src/data/marketplaces.js +0 -138
  71. package/src/data/mcp-servers.js +0 -509
  72. package/src/data/predefined-profiles.js +0 -248
  73. package/src/data/settings-catalog.js +0 -625
  74. package/src/data/skill-repos.js +0 -160
  75. package/src/data/statuslines.js +0 -159
  76. package/src/data/statuslines.ts +0 -188
  77. package/src/index.js +0 -4
  78. package/src/index.ts +0 -5
  79. package/src/main.js +0 -170
  80. package/src/prerunner/index.js +0 -252
  81. package/src/services/alias-settings.js +0 -51
  82. package/src/services/alias-shell-writer.js +0 -1018
  83. package/src/services/alias-store.js +0 -129
  84. package/src/services/claude-cli.js +0 -189
  85. package/src/services/claude-runner.js +0 -28
  86. package/src/services/claude-settings.js +0 -1223
  87. package/src/services/gitignore-detector.js +0 -155
  88. package/src/services/gitignore-fixer.js +0 -231
  89. package/src/services/gitignore-prerun.js +0 -46
  90. package/src/services/gitignore-resolver.js +0 -143
  91. package/src/services/gitignore-service.js +0 -117
  92. package/src/services/local-marketplace.js +0 -339
  93. package/src/services/marketplace-fetcher.js +0 -96
  94. package/src/services/marketplace-sync.js +0 -94
  95. package/src/services/mcp-registry.js +0 -87
  96. package/src/services/plugin-manager.js +0 -473
  97. package/src/services/plugin-mcp-config.js +0 -177
  98. package/src/services/plugin-setup.js +0 -499
  99. package/src/services/plugin-version-check.js +0 -262
  100. package/src/services/profiles.js +0 -161
  101. package/src/services/settings-manager.js +0 -243
  102. package/src/services/skills-manager.js +0 -393
  103. package/src/services/skillsmp-client.js +0 -87
  104. package/src/services/update-cache.js +0 -52
  105. package/src/services/version-check.js +0 -99
  106. package/src/types/gitignore.js +0 -6
  107. package/src/types/index.js +0 -1
  108. package/src/ui/App.js +0 -355
  109. package/src/ui/adapters/pluginsAdapter.js +0 -139
  110. package/src/ui/adapters/settingsAdapter.js +0 -111
  111. package/src/ui/adapters/skillsAdapter.js +0 -154
  112. package/src/ui/components/CategoryHeader.js +0 -9
  113. package/src/ui/components/EmptyFilterState.js +0 -4
  114. package/src/ui/components/FlagDetailEditor.js +0 -0
  115. package/src/ui/components/ScopeIndicator.js +0 -30
  116. package/src/ui/components/ScrollableList.js +0 -36
  117. package/src/ui/components/SearchInput.js +0 -19
  118. package/src/ui/components/StyledText.js +0 -39
  119. package/src/ui/components/TabBar.js +0 -19
  120. package/src/ui/components/layout/FooterHints.js +0 -29
  121. package/src/ui/components/layout/Panel.js +0 -6
  122. package/src/ui/components/layout/ProgressBar.js +0 -14
  123. package/src/ui/components/layout/ScopeTabs.js +0 -6
  124. package/src/ui/components/layout/ScreenLayout.js +0 -16
  125. package/src/ui/components/layout/index.js +0 -5
  126. package/src/ui/components/modals/ConfirmModal.js +0 -14
  127. package/src/ui/components/modals/InputModal.js +0 -5
  128. package/src/ui/components/modals/LoadingModal.js +0 -17
  129. package/src/ui/components/modals/MessageModal.js +0 -16
  130. package/src/ui/components/modals/ModalContainer.js +0 -137
  131. package/src/ui/components/modals/SelectModal.js +0 -18
  132. package/src/ui/components/modals/VersionMismatchModal.js +0 -36
  133. package/src/ui/components/modals/index.js +0 -6
  134. package/src/ui/components/primitives/ActionHints.js +0 -13
  135. package/src/ui/components/primitives/DetailSection.js +0 -7
  136. package/src/ui/components/primitives/KeyValueLine.js +0 -8
  137. package/src/ui/components/primitives/ListCategoryRow.js +0 -8
  138. package/src/ui/components/primitives/MetaText.js +0 -8
  139. package/src/ui/components/primitives/ScopeDetail.js +0 -32
  140. package/src/ui/components/primitives/ScopeSquares.js +0 -11
  141. package/src/ui/components/primitives/SelectableRow.js +0 -5
  142. package/src/ui/components/primitives/index.js +0 -8
  143. package/src/ui/hooks/index.js +0 -4
  144. package/src/ui/hooks/useAsyncData.js +0 -77
  145. package/src/ui/hooks/useGitignoreModal.js +0 -74
  146. package/src/ui/hooks/useKeyboard.js +0 -13
  147. package/src/ui/hooks/useKeyboardHandler.js +0 -39
  148. package/src/ui/hooks/useMismatchModal.js +0 -77
  149. package/src/ui/registry.js +0 -1
  150. package/src/ui/renderers/cliToolRenderers.js +0 -54
  151. package/src/ui/renderers/gitignoreRenderers.js +0 -46
  152. package/src/ui/renderers/mcpRenderers.js +0 -26
  153. package/src/ui/renderers/pluginRenderers.js +0 -124
  154. package/src/ui/renderers/profileRenderers.js +0 -177
  155. package/src/ui/renderers/settingsRenderers.js +0 -73
  156. package/src/ui/renderers/skillRenderers.js +0 -138
  157. package/src/ui/screens/AliasScreen.js +0 -1111
  158. package/src/ui/screens/CliToolsScreen.js +0 -338
  159. package/src/ui/screens/EnvVarsScreen.js +0 -152
  160. package/src/ui/screens/GitignoreScreen.js +0 -328
  161. package/src/ui/screens/McpRegistryScreen.js +0 -238
  162. package/src/ui/screens/McpScreen.js +0 -176
  163. package/src/ui/screens/ModelSelectorScreen.js +0 -296
  164. package/src/ui/screens/ModelSelectorScreen.tsx +0 -444
  165. package/src/ui/screens/PluginsScreen.js +0 -769
  166. package/src/ui/screens/ProfilesScreen.js +0 -298
  167. package/src/ui/screens/SkillsScreen.js +0 -549
  168. package/src/ui/screens/StatusLineScreen.js +0 -206
  169. package/src/ui/screens/StatusLineScreen.tsx +0 -416
  170. package/src/ui/screens/index.js +0 -10
  171. package/src/ui/state/AnimationContext.js +0 -34
  172. package/src/ui/state/AppContext.js +0 -162
  173. package/src/ui/state/DimensionsContext.js +0 -71
  174. package/src/ui/state/reducer.js +0 -547
  175. package/src/ui/state/types.js +0 -1
  176. package/src/ui/theme.js +0 -47
  177. package/src/utils/clipboard.js +0 -56
  178. package/src/utils/command-utils.js +0 -19
  179. package/src/utils/fuzzy-search.js +0 -101
  180. package/src/utils/string-utils.js +0 -62
@@ -1,205 +0,0 @@
1
- /**
2
- * Catalog of `claude` CLI flags that the Alias tab can compose into a managed
3
- * shell alias. Verified against `claude --help` output and binary string scan
4
- * of the shipped Claude Code 2.1.x binary.
5
- *
6
- * The catalog drives both the UI editor for each flag and the renderer that
7
- * emits the final `alias claude='claude …'` string per shell.
8
- */
9
- /**
10
- * Tokens supported in `templated: true` flag values. Description text is
11
- * shown to the user; the actual shell-substitution code lives in the writer
12
- * because it needs per-shell variants.
13
- *
14
- * Intentionally excludes `{hash}` for v1 — its only portable form is
15
- * `od -An -N4 -tx1 /dev/urandom | tr -d ' \n'`, which looks frightening in a
16
- * shell rc file. Users who want randomness can pair this prefix with bare
17
- * `--remote-control` (which already auto-generates a unique suffix).
18
- */
19
- export const TEMPLATE_TOKENS = [
20
- { token: "{folder}", description: "current directory's basename" },
21
- { token: "{day}", description: "day of month, zero-padded (01-31)" },
22
- { token: "{month}", description: "month, zero-padded (01-12)" },
23
- { token: "{year}", description: "4-digit year" },
24
- ];
25
- export const FLAG_GROUPS = [
26
- { id: "danger", label: "Permissions" },
27
- { id: "session", label: "Session" },
28
- { id: "context", label: "Context" },
29
- { id: "channels", label: "Development channels" },
30
- { id: "debug", label: "Debug" },
31
- { id: "integration", label: "Integrations" },
32
- { id: "worktree", label: "Worktree" },
33
- ];
34
- export const ALIAS_FLAGS = [
35
- {
36
- id: "dangerously-skip-permissions",
37
- label: "Skip permission checks",
38
- flag: "--dangerously-skip-permissions",
39
- kind: "boolean",
40
- group: "danger",
41
- description: "Bypass all permission checks. Recommended only for sandboxes with no internet access.",
42
- },
43
- {
44
- id: "allow-dangerously-skip-permissions",
45
- label: "Allow skip-permissions opt-in",
46
- flag: "--allow-dangerously-skip-permissions",
47
- kind: "boolean",
48
- group: "danger",
49
- description: "Enable the skip-permissions option without making it the default.",
50
- },
51
- {
52
- id: "remote-control",
53
- label: "Remote control",
54
- flag: "--remote-control",
55
- kind: "boolean",
56
- group: "session",
57
- description: "Start an interactive session with Remote Control enabled. Claude Code auto-generates a unique session name; use --remote-control-session-name-prefix to customize it.",
58
- },
59
- {
60
- id: "remote-control-session-name-prefix",
61
- label: "Remote control name prefix",
62
- flag: "--remote-control-session-name-prefix",
63
- kind: "text",
64
- templated: true,
65
- group: "session",
66
- description: "Prefix for auto-generated Remote Control session names. Default: hostname. Supports template tokens that expand on each shell invocation: {folder} (basename of $PWD), {day}, {month}, {year}. Example: dev-{folder}-{day} → dev-myproject-15.",
67
- },
68
- {
69
- id: "ide",
70
- label: "Auto-connect to IDE",
71
- flag: "--ide",
72
- kind: "boolean",
73
- group: "integration",
74
- description: "Automatically connect to IDE on startup if exactly one valid IDE is available.",
75
- },
76
- {
77
- id: "chrome",
78
- label: "Chrome integration",
79
- flag: "--chrome",
80
- triStateOff: "--no-chrome",
81
- kind: "tri-state",
82
- group: "integration",
83
- description: "Enable or disable Claude in Chrome integration. Unset leaves the project default in place.",
84
- },
85
- {
86
- id: "effort",
87
- label: "Effort level",
88
- flag: "--effort",
89
- kind: "select",
90
- group: "session",
91
- description: "Effort level for the current session.",
92
- options: [
93
- { label: "low", value: "low" },
94
- { label: "medium", value: "medium" },
95
- { label: "high", value: "high" },
96
- { label: "xhigh", value: "xhigh" },
97
- { label: "max", value: "max" },
98
- ],
99
- },
100
- {
101
- id: "system-prompt",
102
- label: "System prompt",
103
- flag: "--system-prompt",
104
- kind: "text",
105
- group: "context",
106
- xorGroup: "system-prompt",
107
- description: "System prompt text to use for the session. Mutually exclusive with --system-prompt-file.",
108
- },
109
- {
110
- id: "system-prompt-file",
111
- label: "System prompt file",
112
- flag: "--system-prompt-file",
113
- kind: "text",
114
- group: "context",
115
- xorGroup: "system-prompt",
116
- description: "Path to a file whose contents replace the default system prompt. Mutually exclusive with --system-prompt.",
117
- },
118
- {
119
- id: "append-system-prompt",
120
- label: "Append system prompt",
121
- flag: "--append-system-prompt",
122
- kind: "text",
123
- group: "context",
124
- description: "Text appended to the default system prompt. Composes with --system-prompt.",
125
- },
126
- {
127
- id: "append-system-prompt-file",
128
- label: "Append system prompt file",
129
- flag: "--append-system-prompt-file",
130
- kind: "text",
131
- group: "context",
132
- description: "Path to a file whose contents are appended to the default system prompt.",
133
- },
134
- {
135
- id: "channels",
136
- label: "Channels (approved)",
137
- flag: "--channels",
138
- kind: "text-list",
139
- group: "channels",
140
- description: "Approved channel plugins/MCP servers to run this session (the allowlist). Channels derived from --dangerously-load appear in a separate section here and are unioned in on write; add your own approved channels on top.",
141
- defaultValues: [],
142
- },
143
- {
144
- id: "dangerously-load-development-channels",
145
- label: "Load development channels",
146
- flag: "--dangerously-load-development-channels",
147
- kind: "text-list",
148
- group: "channels",
149
- description: "Sideload development channels not on the approved allowlist (local dev only). Also shown under --channels and unioned into it on write. Default seed: claudish (the only magus plugin currently shipping channels).",
150
- defaultValues: ["plugin:claudish@magus"],
151
- },
152
- {
153
- id: "debug",
154
- label: "Debug categories",
155
- flag: "--debug",
156
- shortFlag: "-d",
157
- kind: "multi-with-custom",
158
- group: "debug",
159
- description: "Enable debug mode with optional category filter. Pick from common categories or add custom tokens (including negations like !file).",
160
- picklist: [
161
- "api",
162
- "hooks",
163
- "mcp",
164
- "tools",
165
- "plugins",
166
- "skills",
167
- "settings",
168
- "permissions",
169
- "auth",
170
- "cache",
171
- "statsig",
172
- "file",
173
- "1p",
174
- ],
175
- defaultValues: [],
176
- },
177
- {
178
- id: "worktree",
179
- label: "Use worktree",
180
- flag: "--worktree",
181
- kind: "boolean",
182
- group: "worktree",
183
- description: "Create a git worktree for the session. Prerequisite for --tmux.",
184
- },
185
- {
186
- id: "tmux",
187
- label: "tmux session",
188
- flag: "--tmux",
189
- kind: "select",
190
- group: "worktree",
191
- requires: "worktree",
192
- description: "Create a tmux session for the worktree. Requires --worktree. iTerm2 native panes when available; classic for traditional tmux.",
193
- options: [
194
- { label: "auto (iTerm2 native)", value: "" },
195
- { label: "classic", value: "classic" },
196
- ],
197
- },
198
- ];
199
- /** Look up a flag by id. Throws if missing — keeps callers honest. */
200
- export function getFlagById(id) {
201
- const f = ALIAS_FLAGS.find((flag) => flag.id === id);
202
- if (!f)
203
- throw new Error(`Unknown alias flag id: ${id}`);
204
- return f;
205
- }
@@ -1,123 +0,0 @@
1
- export const cliTools = [
2
- {
3
- name: "claudeup",
4
- displayName: "claudeup",
5
- description: "TUI tool for managing Claude Code plugins, MCPs, and configuration",
6
- installCommand: "npm install -g claudeup",
7
- checkCommand: "claudeup --version",
8
- website: "https://github.com/MadAppGang/magus/tree/main/tools/claudeup",
9
- category: "ai-coding",
10
- packageManager: "npm",
11
- packageName: "claudeup",
12
- },
13
- {
14
- name: "mnemex",
15
- displayName: "Mnemex",
16
- description: "AST-aware code search with PageRank, callers/callees, and semantic embeddings",
17
- installCommand: "npm install -g mnemex",
18
- checkCommand: "mnemex --version",
19
- website: "https://github.com/MadAppGang/mnemex",
20
- category: "ai-coding",
21
- packageManager: "npm",
22
- packageName: "mnemex",
23
- },
24
- {
25
- name: "claudish",
26
- displayName: "Claudish",
27
- description: "Run Claude Code with OpenRouter models (Grok, GPT-5, Gemini)",
28
- installCommand: "npm install -g claudish",
29
- checkCommand: "claudish --version",
30
- website: "https://github.com/MadAppGang/claudish",
31
- category: "ai-coding",
32
- packageManager: "npm",
33
- packageName: "claudish",
34
- },
35
- {
36
- name: "claude",
37
- displayName: "Claude Code",
38
- description: "Anthropic official agentic coding tool",
39
- installCommand: "npm install -g @anthropic-ai/claude-code",
40
- checkCommand: "claude --version",
41
- website: "https://claude.ai/code",
42
- category: "ai-coding",
43
- packageManager: "npm",
44
- packageName: "@anthropic-ai/claude-code",
45
- },
46
- {
47
- name: "codex",
48
- displayName: "OpenAI Codex",
49
- description: "Lightweight coding agent from OpenAI that runs in your terminal",
50
- installCommand: "npm install -g @openai/codex",
51
- checkCommand: "codex --version",
52
- website: "https://github.com/openai/codex",
53
- category: "ai-coding",
54
- packageManager: "npm",
55
- packageName: "@openai/codex",
56
- },
57
- {
58
- name: "gemini",
59
- displayName: "Gemini CLI",
60
- description: "Google AI agent with 1M token context, free tier available",
61
- installCommand: "npm install -g @google/gemini-cli",
62
- checkCommand: "gemini --version",
63
- website: "https://github.com/google-gemini/gemini-cli",
64
- category: "ai-coding",
65
- packageManager: "npm",
66
- packageName: "@google/gemini-cli",
67
- },
68
- {
69
- name: "qwen",
70
- displayName: "Qwen Code",
71
- description: "Alibaba coding agent optimized for Qwen3-Coder models",
72
- installCommand: "npm install -g @qwen-code/qwen-code",
73
- checkCommand: "qwen --version",
74
- website: "https://github.com/QwenLM/qwen-code",
75
- category: "ai-coding",
76
- packageManager: "npm",
77
- packageName: "@qwen-code/qwen-code",
78
- },
79
- {
80
- name: "cline",
81
- displayName: "Cline",
82
- description: "Autonomous coding agent with plan & act, checkpoints, browser use",
83
- installCommand: "npm install -g cline",
84
- checkCommand: "cline --version",
85
- website: "https://cline.bot",
86
- category: "ai-coding",
87
- packageManager: "npm",
88
- packageName: "cline",
89
- },
90
- {
91
- name: "opencode",
92
- displayName: "OpenCode",
93
- description: "Open source AI coding agent trusted by 400k+ developers",
94
- installCommand: "npm install -g opencode-ai",
95
- checkCommand: "opencode --version",
96
- website: "https://opencode.ai",
97
- category: "ai-coding",
98
- packageManager: "npm",
99
- packageName: "opencode-ai",
100
- },
101
- {
102
- name: "aider",
103
- displayName: "Aider",
104
- description: "AI pair programming - works with Claude, GPT-4, local models",
105
- installCommand: "pip install aider-install && aider-install",
106
- checkCommand: "aider --version",
107
- website: "https://aider.chat",
108
- category: "ai-coding",
109
- packageManager: "pip",
110
- packageName: "aider-chat",
111
- },
112
- {
113
- name: "crush",
114
- displayName: "Crush",
115
- description: "AI coding assistant from Charm with terminal-native UX",
116
- installCommand: "npm install -g @charmland/crush",
117
- checkCommand: "crush --version",
118
- website: "https://github.com/charmbracelet/crush",
119
- category: "ai-coding",
120
- packageManager: "npm",
121
- packageName: "@charmland/crush",
122
- },
123
- ];
@@ -1,24 +0,0 @@
1
- /**
2
- * Conservative built-in defaults. These ship inside claudeup and apply to
3
- * every project unless overridden by a global or project manifest. Kept narrow
4
- * on purpose — broader patterns (node_modules, .env, .DS_Store, …) live in the
5
- * "common-dev" template which users opt into via `extends`.
6
- */
7
- export const BUILTIN_DEFAULTS = {
8
- ignore: [
9
- ".claude/settings.local.json",
10
- ".claude/scheduled_tasks.lock",
11
- ".claude/cache/",
12
- ".claude/.statusline-worktree-*",
13
- "ai-docs/sessions/",
14
- ".mnemex/",
15
- ".claudemem/",
16
- "gtd/sessions/",
17
- ".agents/",
18
- ],
19
- track: [
20
- ".claude/settings.json",
21
- ".mcp.json",
22
- "plugin.json",
23
- ],
24
- };
@@ -1,97 +0,0 @@
1
- const RULE_REASONS = new Map([
2
- [
3
- key("ignore", ".claude/settings.local.json"),
4
- "Personal Claude settings belong to each developer and should not be shared.",
5
- ],
6
- [
7
- key("ignore", ".claude/scheduled_tasks.lock"),
8
- "Runtime lock files are local process state and should be regenerated locally.",
9
- ],
10
- [
11
- key("ignore", ".claude/cache/"),
12
- "Claude cache contents are local generated data and can grow quickly.",
13
- ],
14
- [
15
- key("ignore", ".claude/.statusline-worktree-*"),
16
- "Statusline worktree markers are local runtime state.",
17
- ],
18
- [
19
- key("ignore", "ai-docs/sessions/"),
20
- "Session transcripts and scratch notes are local working artifacts.",
21
- ],
22
- [
23
- key("ignore", ".mnemex/"),
24
- "Local memory/index data is machine-specific and regenerated by tooling.",
25
- ],
26
- [
27
- key("ignore", ".claudemem/"),
28
- "Local claudemem indexes are generated from the repo and should not be committed.",
29
- ],
30
- [
31
- key("ignore", "gtd/sessions/"),
32
- "Local GTD session artifacts are personal workflow state.",
33
- ],
34
- [
35
- key("ignore", ".agents/"),
36
- "Local agent workspaces and runtime artifacts should stay out of team history.",
37
- ],
38
- [
39
- key("ignore", "node_modules/"),
40
- "Installed dependencies are restored from the package manager lockfile.",
41
- ],
42
- [
43
- key("ignore", ".env"),
44
- "Environment files commonly contain local secrets and machine-specific values.",
45
- ],
46
- [
47
- key("ignore", ".env.local"),
48
- "Local environment overrides commonly contain secrets or developer-specific values.",
49
- ],
50
- [
51
- key("ignore", ".DS_Store"),
52
- "macOS Finder metadata is machine-generated noise.",
53
- ],
54
- [
55
- key("ignore", "dist/"),
56
- "Distribution output is generated from source during builds.",
57
- ],
58
- [
59
- key("ignore", "build/"),
60
- "Build output is generated from source during builds.",
61
- ],
62
- [
63
- key("ignore", "*.log"),
64
- "Log files are runtime output and usually contain noisy local details.",
65
- ],
66
- [
67
- key("ignore", "coverage/"),
68
- "Coverage reports are generated by test runs.",
69
- ],
70
- [
71
- key("ignore", ".cache/"),
72
- "Tool cache contents are local generated data.",
73
- ],
74
- [
75
- key("track", ".claude/settings.json"),
76
- "Team Claude settings should be committed so everyone gets the same project behavior.",
77
- ],
78
- [
79
- key("track", ".mcp.json"),
80
- "Team MCP configuration should be committed so shared tools are discoverable.",
81
- ],
82
- [
83
- key("track", "plugin.json"),
84
- "The plugin manifest is source metadata required by the plugin system.",
85
- ],
86
- ]);
87
- export function getGitignoreRuleReason(action, pattern) {
88
- const reason = RULE_REASONS.get(key(action, pattern));
89
- if (reason)
90
- return reason;
91
- return action === "ignore"
92
- ? "A managed rule says this path should stay out of git."
93
- : "A managed rule says this path should stay tracked in git.";
94
- }
95
- function key(action, pattern) {
96
- return `${action}:${pattern}`;
97
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * Opt-in templates a user manifest can pull in via `extends`. Kept separate
3
- * from BUILTIN_DEFAULTS so the active baseline stays minimal — these only
4
- * apply when explicitly requested.
5
- */
6
- export const BUILTIN_TEMPLATES = {
7
- "common-dev": {
8
- ignore: [
9
- "node_modules/",
10
- ".env",
11
- ".env.local",
12
- ".DS_Store",
13
- "dist/",
14
- "build/",
15
- "*.log",
16
- "coverage/",
17
- ".cache/",
18
- ],
19
- track: [],
20
- },
21
- };
@@ -1,138 +0,0 @@
1
- import { formatMarketplaceName } from "../utils/string-utils.js";
2
- /**
3
- * Known repo aliases — GitHub redirects the old repo to the new one,
4
- * so these should be treated as identical for deduplication.
5
- */
6
- const REPO_ALIASES = {
7
- "madappgang/claude-code": "madappgang/magus",
8
- };
9
- /** Normalize a repo string through known aliases. */
10
- function normalizeRepo(repo) {
11
- const lower = repo.toLowerCase();
12
- return REPO_ALIASES[lower] || lower;
13
- }
14
- /**
15
- * Deprecated marketplace names that should be hidden if the canonical
16
- * marketplace is already present. Maps deprecated name → canonical name.
17
- */
18
- export const deprecatedMarketplaces = {
19
- "mag-claude-plugins": "magus",
20
- "MadAppGang-claude-code": "magus",
21
- superpowers: "superpowers-marketplace",
22
- };
23
- export const defaultMarketplaces = [
24
- {
25
- name: "magus",
26
- displayName: "Magus",
27
- source: {
28
- source: "github",
29
- repo: "MadAppGang/magus",
30
- },
31
- description: "Professional plugins for frontend, backend, and code analysis",
32
- official: false,
33
- featured: true, // Always show plugins (expanded by default)
34
- },
35
- {
36
- name: "claude-plugins-official",
37
- displayName: "Anthropic Official",
38
- source: {
39
- source: "github",
40
- repo: "anthropics/claude-plugins-official",
41
- },
42
- description: "Official Anthropic-managed directory of high quality Claude Code plugins",
43
- official: true,
44
- },
45
- {
46
- name: "superpowers-marketplace",
47
- displayName: "Superpowers",
48
- source: {
49
- source: "github",
50
- repo: "obra/superpowers-marketplace",
51
- },
52
- description: "Curated Claude Code plugins for skills and workflows",
53
- featured: true,
54
- },
55
- {
56
- name: "claude-code-plugins",
57
- displayName: "Anthropic Deprecated",
58
- source: {
59
- source: "github",
60
- repo: "anthropics/claude-code",
61
- },
62
- description: "Legacy demo plugins from Anthropic (deprecated - use Official instead)",
63
- official: true,
64
- deprecated: true,
65
- },
66
- ];
67
- export function getMarketplaceByName(name) {
68
- return defaultMarketplaces.find((m) => m.name === name);
69
- }
70
- // Get all available marketplaces from local cache + hardcoded defaults
71
- // Local cache is primary source of truth, defaults are fallback
72
- // Deduplicates by normalized repo URL to avoid showing same marketplace twice
73
- export function getAllMarketplaces(localMarketplaces) {
74
- const all = new Map();
75
- const seenRepos = new Set();
76
- // Primary source: local cache (what's actually cloned)
77
- if (localMarketplaces) {
78
- for (const [name, local] of localMarketplaces) {
79
- const repo = normalizeRepo(local.gitRepo || "");
80
- // Skip deprecated marketplaces if their canonical replacement exists
81
- // (or will be added from defaults)
82
- const canonical = deprecatedMarketplaces[name];
83
- if (canonical) {
84
- // If canonical already in the map or in defaults, skip this entry
85
- if (all.has(canonical) ||
86
- defaultMarketplaces.some((m) => m.name === canonical)) {
87
- continue;
88
- }
89
- }
90
- // Skip if another marketplace already claimed this repo URL
91
- if (repo && seenRepos.has(repo))
92
- continue;
93
- if (repo)
94
- seenRepos.add(repo);
95
- // Check if this marketplace has defaults (for official/featured flags)
96
- const defaultMp = defaultMarketplaces.find((m) => m.name === name);
97
- all.set(name, {
98
- name,
99
- // Prefer default displayName over stale local clone data
100
- displayName: defaultMp?.displayName || local.name || formatMarketplaceName(name),
101
- source: {
102
- source: "github",
103
- repo: defaultMp?.source.repo || local.gitRepo || "",
104
- },
105
- description: defaultMp?.description || local.description || "",
106
- official: defaultMp?.official ?? repo.toLowerCase().includes("anthropics/"),
107
- featured: defaultMp?.featured,
108
- deprecated: defaultMp?.deprecated,
109
- });
110
- }
111
- }
112
- // Fallback: hardcoded defaults (only if their repo isn't already represented)
113
- for (const mp of defaultMarketplaces) {
114
- const repo = normalizeRepo(mp.source.repo || "");
115
- if (!all.has(mp.name) && !seenRepos.has(repo)) {
116
- all.set(mp.name, mp);
117
- if (repo)
118
- seenRepos.add(repo);
119
- }
120
- }
121
- // Sort: Magus first, deprecated last, then alphabetically
122
- return Array.from(all.values()).sort((a, b) => {
123
- // Magus (MadAppGang) always first
124
- const aIsMag = a.source.repo?.toLowerCase().includes("madappgang/");
125
- const bIsMag = b.source.repo?.toLowerCase().includes("madappgang/");
126
- if (aIsMag && !bIsMag)
127
- return -1;
128
- if (!aIsMag && bIsMag)
129
- return 1;
130
- // Deprecated entries always last
131
- if (a.deprecated && !b.deprecated)
132
- return 1;
133
- if (!a.deprecated && b.deprecated)
134
- return -1;
135
- // Then alphabetically by display name
136
- return (a.displayName || a.name).localeCompare(b.displayName || b.name);
137
- });
138
- }