boost-skill-cli 1.0.1__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.
boost_cli/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ """boost — Homebrew for AI coding skills."""
2
+
3
+ __version__ = "1.0.1"
4
+ PRODUCT = "boost"
5
+ TAGLINE = "AI Skill Package Manager"
boost_cli/__main__.py ADDED
@@ -0,0 +1,8 @@
1
+ from __future__ import annotations
2
+
3
+ import sys
4
+
5
+ from .cli import main
6
+
7
+ if __name__ == "__main__":
8
+ sys.exit(main())
boost_cli/cli.py ADDED
@@ -0,0 +1,213 @@
1
+ """boost CLI dispatcher — 72 commands across 8 groups.
2
+
3
+ Each command lives in boost_cli/commands/<module>.py as
4
+ def cmd_<name_with_underscores>(argv: list[str]) -> int
5
+ Modules are imported lazily so `boost --help` stays instant.
6
+ """
7
+ from __future__ import annotations
8
+
9
+ import difflib
10
+ import importlib
11
+ import sys
12
+ from typing import List
13
+
14
+ from . import PRODUCT, TAGLINE, __version__
15
+ from .core import output as out
16
+ from .errors import BoostError
17
+
18
+ # group key -> (icon token, title, description)
19
+ GROUPS = {
20
+ "pkg": ("pkg", "Package Management",
21
+ "Install, remove, update & move skills across agents"),
22
+ "find": ("find", "Discovery & Search",
23
+ "Find the right skill across taps and all of GitHub"),
24
+ "info": ("info", "Skill Information",
25
+ "Inspect, read, and explain what a skill does"),
26
+ "tap": ("tap", "Registry (Taps)",
27
+ "Add, remove, and inspect GitHub skill registries"),
28
+ "ai": ("ai", "Intelligence",
29
+ "AI-powered authoring, merging & behavior preview"),
30
+ "chk": ("chk", "Quality & Health",
31
+ "Validate, audit, and keep your setup healthy"),
32
+ "cfg": ("cfg", "Configuration",
33
+ "Config, scaffolding, policy & integrations"),
34
+ "team": ("team", "Team & Collaboration",
35
+ "Roll out, profile & coordinate skills across a team"),
36
+ }
37
+
38
+ # (name, group, module, summary) — the single source of truth for the
39
+ # command surface. docs/overview.html mirrors this list.
40
+ COMMANDS = [
41
+ # Package Management (12)
42
+ ("install", "pkg", "pkg", "Install a skill from a tap registry"),
43
+ ("uninstall", "pkg", "pkg", "Remove an installed skill, rule, workflow, or config"),
44
+ ("sync", "pkg", "pkg", "Reconcile installed skills & symlinks against the lock file"),
45
+ ("update", "pkg", "pkg", "Sync taps or update installed skills"),
46
+ ("reinstall", "pkg", "pkg", "Reinstall a skill or all skills (force)"),
47
+ ("bundle", "pkg", "pkg", "Export/install skill sets via a Boostfile"),
48
+ ("import", "pkg", "pkg", "Import skills from a GitHub URL or local path"),
49
+ ("migrate", "pkg", "pkg", "Migrate skills between agents or from Skills CLI"),
50
+ ("pin", "pkg", "pkg", "Pin a skill to its current version"),
51
+ ("unpin", "pkg", "pkg", "Allow a pinned skill to update again"),
52
+ ("snapshot", "pkg", "pkg", "Save & restore whole skill environments"),
53
+ ("export", "pkg", "pkg", "Package skills as shareable zip/tar archives"),
54
+ # Discovery & Search (8)
55
+ ("search", "find", "discovery", "Search skills across tap registries (AI-ranked)"),
56
+ ("discover", "find", "discovery", "Browse & search the GitHub-wide skill discovery index"),
57
+ ("recommend", "find", "discovery", "Suggest skills based on your project's tech stack"),
58
+ ("browse", "find", "discovery", "Interactive full-screen TUI with fuzzy search"),
59
+ ("index", "find", "discovery", "Build the discovery registry via GitHub Code Search"),
60
+ ("trending", "find", "discovery", "Show trending skills by install count"),
61
+ ("stats", "find", "discovery", "Install statistics & trend for a single skill"),
62
+ ("count", "find", "discovery", "Quick summary of installed / available / taps"),
63
+ # Skill Information (10)
64
+ ("list", "info", "info", "List installed skills"),
65
+ ("info", "info", "info", "Show detailed info about a skill"),
66
+ ("cat", "info", "info", "Print a skill or rule's contents"),
67
+ ("edit", "info", "info", "Open a skill's SKILL.md in your editor"),
68
+ ("preview", "info", "info", "Render a SKILL.md with rich formatting"),
69
+ ("explain", "info", "info", "Explain what a skill does in plain English"),
70
+ ("log", "info", "info", "Git log for a skill, or boost's activity log"),
71
+ ("home", "info", "info", "Open a skill's GitHub page in the browser"),
72
+ ("deps", "info", "info", "Show dependency & conflict relationships"),
73
+ ("tag", "info", "info", "Custom labels for organizing skills"),
74
+ # Registry (Taps) (4)
75
+ ("tap", "tap", "taps", "Add a GitHub repo as a skill registry"),
76
+ ("untap", "tap", "taps", "Remove a registry tap"),
77
+ ("taps", "tap", "taps", "List all configured registry taps"),
78
+ ("outdated", "tap", "taps", "Show skills with available updates"),
79
+ # Intelligence (8)
80
+ ("distill", "ai", "intelligence", "Merge multiple skills into one deduplicated skill"),
81
+ ("simulate", "ai", "intelligence", "Preview how a skill would change Claude's behavior"),
82
+ ("infer", "ai", "intelligence", "Generate a SKILL.md from your codebase patterns"),
83
+ ("absorb", "ai", "intelligence", "Turn recurring chat-history patterns into a skill"),
84
+ ("evolve", "ai", "intelligence", "Iteratively improve a skill from feedback"),
85
+ ("context", "ai", "intelligence", "Branch-aware skill activation"),
86
+ ("focus", "ai", "intelligence", "Temporarily prioritize skills for a work session"),
87
+ ("impact", "ai", "intelligence", "Measure a skill's influence on code quality"),
88
+ # Quality & Health (14)
89
+ ("doctor", "chk", "quality", "Check installation health & report issues"),
90
+ ("lint", "chk", "quality", "Validate SKILL.md frontmatter & quality"),
91
+ ("audit", "chk", "quality", "Check installed skills against a safety blocklist"),
92
+ ("verify", "chk", "quality", "Validate skill quality & lock-file integrity"),
93
+ ("drift", "chk", "quality", "Detect installed skills diverging from source"),
94
+ ("test", "chk", "quality", "Validate installed skills against quality checks"),
95
+ ("fingerprint", "chk", "quality", "Deterministic hash of the skill environment"),
96
+ ("quarantine", "chk", "quality", "Isolate a problematic skill without uninstalling"),
97
+ ("decay", "chk", "quality", "Flag skills irrelevant to your current stack"),
98
+ ("heal", "chk", "quality", "Self-diagnose & repair the boost environment"),
99
+ ("conflict", "chk", "quality", "Detect contradictory rules between skills"),
100
+ ("changelog", "chk", "quality", "Show a skill's upstream change history"),
101
+ ("attest", "chk", "quality", "Display/verify the install record for skills"),
102
+ ("health", "chk", "quality", "Dashboard of skill-environment health"),
103
+ # Configuration (10)
104
+ ("config", "cfg", "configuration", "Display or modify boost configuration"),
105
+ ("clean", "cfg", "configuration", "Clear stale caches & broken symlinks"),
106
+ ("create", "cfg", "configuration", "Scaffold a new skill from a template"),
107
+ ("policy", "cfg", "configuration", "Manage & enforce skill governance policies"),
108
+ ("onboard", "cfg", "configuration", "Add skill-tracker telemetry to a repo & open a PR"),
109
+ ("completions", "cfg", "configuration", "Generate shell tab-completion scripts"),
110
+ ("schedule", "cfg", "configuration", "Manage automatic skill-sync scheduling"),
111
+ ("serve", "cfg", "configuration", "Serve the skill catalog over HTTP (port 8787)"),
112
+ ("mcp", "cfg", "configuration", "Register boost as an MCP server for Claude Code"),
113
+ ("self-update", "cfg", "configuration", "Update boost itself to the latest version"),
114
+ # Team & Collaboration (6)
115
+ ("cohort", "team", "team", "Controlled skill rollouts & team A/B testing"),
116
+ ("profile", "team", "team", "Named skill profiles for context switching"),
117
+ ("protocol", "team", "team", "Manage the boost:// one-click-install handler"),
118
+ ("pulse", "team", "team", "Team activity feed of skill-management events"),
119
+ ("replay", "team", "team", "View version history & roll back skills"),
120
+ ("who", "team", "team", "Discover who on the team has skill expertise"),
121
+ ]
122
+
123
+ _BY_NAME = {name: (group, module, summary)
124
+ for name, group, module, summary in COMMANDS}
125
+
126
+
127
+ def resolve(name: str):
128
+ return _BY_NAME.get(name)
129
+
130
+
131
+ def print_version() -> None:
132
+ print("%s %s" % (PRODUCT, __version__))
133
+
134
+
135
+ def print_help() -> None:
136
+ print(out.c(PRODUCT, out.BOLD) + " — Homebrew for AI coding skills"
137
+ + out.c(" (%s · v%s)" % (TAGLINE, __version__), out.DIM))
138
+ print()
139
+ print(out.c("Usage:", out.BOLD) + " boost <command> [args] "
140
+ + out.c("boost help <command> for details", out.DIM))
141
+ width = max(len(n) for n, _, _, _ in COMMANDS)
142
+ for gkey, (_icon, title, desc) in GROUPS.items():
143
+ cmds = [(n, s) for n, g, _m, s in COMMANDS if g == gkey]
144
+ print()
145
+ print(out.c("%s" % title, out.BOLD, out.YELLOW)
146
+ + out.c(" — %s" % desc, out.DIM))
147
+ for n, s in cmds:
148
+ print(" " + out.c(n.ljust(width + 2), out.CYAN) + s)
149
+ print()
150
+ print(out.c("%d commands · %d groups" % (len(COMMANDS), len(GROUPS)), out.DIM))
151
+
152
+
153
+ def print_command_help(name: str) -> int:
154
+ meta = resolve(name)
155
+ if not meta:
156
+ return _unknown(name)
157
+ _group, module, summary = meta
158
+ print(out.c("boost %s" % name, out.BOLD) + " — " + summary)
159
+ # delegate to the command's own --help for flags
160
+ return _dispatch(name, ["--help"], soft=True)
161
+
162
+
163
+ def _unknown(name: str) -> int:
164
+ close = difflib.get_close_matches(name, list(_BY_NAME), n=3)
165
+ out.err("unknown command: %s" % name,
166
+ hint=("did you mean: %s?" % ", ".join(close)) if close
167
+ else "see `boost --help`")
168
+ return 2
169
+
170
+
171
+ def _dispatch(name: str, argv: List[str], soft: bool = False) -> int:
172
+ group, module, _summary = _BY_NAME[name]
173
+ mod = importlib.import_module("boost_cli.commands.%s" % module)
174
+ func = getattr(mod, "cmd_%s" % name.replace("-", "_"), None)
175
+ if func is None:
176
+ if soft:
177
+ return 0
178
+ out.err("command %s is not implemented yet" % name)
179
+ return 3
180
+ rc = func(argv)
181
+ return int(rc or 0)
182
+
183
+
184
+ def main(argv: List[str] | None = None) -> int:
185
+ argv = list(sys.argv[1:] if argv is None else argv)
186
+ if not argv or argv[0] in ("-h", "--help"):
187
+ print_help()
188
+ return 0
189
+ if argv[0] in ("-V", "--version", "version"):
190
+ print_version()
191
+ return 0
192
+ if argv[0] == "help":
193
+ if len(argv) > 1:
194
+ return print_command_help(argv[1])
195
+ print_help()
196
+ return 0
197
+ name, rest = argv[0], argv[1:]
198
+ if name not in _BY_NAME:
199
+ return _unknown(name)
200
+ try:
201
+ return _dispatch(name, rest)
202
+ except BoostError as e:
203
+ out.err(e.message, hint=e.hint)
204
+ return 1
205
+ except KeyboardInterrupt:
206
+ print()
207
+ return 130
208
+ except BrokenPipeError:
209
+ try:
210
+ sys.stdout.close()
211
+ except Exception:
212
+ pass
213
+ return 0
File without changes