Add setup subcommands for skill groups and single skills - #206
Conversation
One short command per skill family:
firecrawl setup core # primitives + index skills ("skills" stays as alias)
firecrawl setup build # app-integration skills (previously not installable via setup)
firecrawl setup workflows # unchanged
The build family had no install path since init dropped it; BUILD_SKILLS
mirrors the five build skills in the catalog. All groups install from the
catalog by name, so skills.sh counters stay consolidated.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
firecrawl setup developer-index # firecrawl- prefix optional firecrawl setup firecrawl-scrape Group subcommands keep precedence, so `setup build` means the group and `setup firecrawl-build` reaches the skill. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found and verified against the latest diff
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/commands/setup.ts">
<violation number="1" location="src/commands/setup.ts:300">
P2: When `npx` is unavailable, `setup build --agent <agent>` ignores the requested agent and links the build skills to every detected harness. Forward `options.agent` to the native fallback so scoped installs remain scoped.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| await installSkills(options, [CLI_SKILL_SELECTION]); | ||
| break; | ||
| case 'build': | ||
| await installSkills(options, [BUILD_SKILL_SELECTION]); |
There was a problem hiding this comment.
P2: When npx is unavailable, setup build --agent <agent> ignores the requested agent and links the build skills to every detected harness. Forward options.agent to the native fallback so scoped installs remain scoped.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/commands/setup.ts, line 296:
<comment>When `npx` is unavailable, `setup build --agent <agent>` ignores the requested agent and links the build skills to every detected harness. Forward `options.agent` to the native fallback so scoped installs remain scoped.</comment>
<file context>
@@ -285,9 +287,14 @@ export async function handleSetupCommand(
await installSkills(options, [CLI_SKILL_SELECTION]);
break;
+ case 'build':
+ await installSkills(options, [BUILD_SKILL_SELECTION]);
+ break;
case 'workflows':
</file context>
After any setup skill install, check for an API key (env var or stored credentials). Authenticated users see nothing. Otherwise: --browser runs the browser login directly, an interactive terminal offers it (default yes), and non-interactive runs print a one-line hint — never a prompt, so agents, scripts, and CI are unaffected. The bundle flow defers the offer until every step has run so it never asks twice. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 4 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/commands/setup.ts">
<violation number="1" location="src/commands/setup.ts:365">
P2: When `FIRECRAWL_API_URL` or global `--api-url` points to a custom server without a key, this still prompts or runs browser login. Check `isCustomApiUrl()` before offering authentication, matching the existing custom-URL behavior.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
| async function offerSkillsAuth(options: SetupOptions): Promise<void> { | ||
| if (options.skipAuthOffer) return; | ||
|
|
||
| if (isAuthenticated()) return; |
There was a problem hiding this comment.
P2: When FIRECRAWL_API_URL or global --api-url points to a custom server without a key, this still prompts or runs browser login. Check isCustomApiUrl() before offering authentication, matching the existing custom-URL behavior.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/commands/setup.ts, line 365:
<comment>When `FIRECRAWL_API_URL` or global `--api-url` points to a custom server without a key, this still prompts or runs browser login. Check `isCustomApiUrl()` before offering authentication, matching the existing custom-URL behavior.</comment>
<file context>
@@ -341,6 +351,53 @@ export async function handleSetupCommand(
+async function offerSkillsAuth(options: SetupOptions): Promise<void> {
+ if (options.skipAuthOffer) return;
+
+ if (isAuthenticated()) return;
+
+ let login = options.browser ?? false;
</file context>
… prettier package-lock.json was accidentally committed in #206 (an npm install artifact — this repo is pnpm-managed). bun prefers it over pnpm-lock.yaml in release-binaries, and its migration fails under --frozen-lockfile. Remove it and gitignore it. setup.ts was formatted by prettier 3.9.6 from that same npm node_modules; CI pins 3.7.4 via pnpm-lock.yaml. Reformatted with 3.7.4. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Gives each skill family — and any individual skill — a short, promotable install command, with a works-out-of-the-box auth story:
Subcommands
setup skillsstays as an alias forcore(backwards compatible; its help text previously claimed it installed core/build, but it only ever installed the core set)firecrawl-build*family — newBUILD_SKILLS/BUILD_SKILL_SELECTIONmirror the five build skills in the catalogfirecrawl-prefix added; group names win ties (setup build= group,setup firecrawl-build= skill); unknown names print the full subcommand helpfirecrawl/skillsby name (layout-independent, so the cli→core catalog rename doesn't affect this), keeping skills.sh install counters consolidated on the catalogAuth offer (never blocks automation)
After any skill install, check for an API key (env var or stored credentials — covers users already set up via init or MCP):
--browser→ run the browser login directly and persist credentials-y→ offer the browser login (default yes)-y→ one-line hint only; skills walk agents through setup on first use, so agents, scripts, and CI never hang on a loginsetupbundle defers the offer until all steps ran, so it never asks twiceVerification:
setup.test.ts55/55 + init tests passing, tsc clean; smoke-tested against a fresh empty $HOME — skill installs land, unauthenticated non-interactive runs print the hint and exit 0.Note:
BUILD_SKILLSis a hardcoded name list likeCLI_SKILLS/WORKFLOW_SKILLS— a new build skill in the monorepo needs a one-line addition here, same as the existing lists.🤖 Generated with Claude Code