Skip to content

Add setup subcommands for skill groups and single skills - #206

Merged
ericciarla merged 3 commits into
mainfrom
setup-group-subcommands
Aug 21, 2026
Merged

Add setup subcommands for skill groups and single skills#206
ericciarla merged 3 commits into
mainfrom
setup-group-subcommands

Conversation

@ericciarla

@ericciarla ericciarla commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Gives each skill family — and any individual skill — a short, promotable install command, with a works-out-of-the-box auth story:

npx -y firecrawl-cli@latest setup core             # scrape/search/crawl/interact primitives + index skills
npx -y firecrawl-cli@latest setup build            # app-integration skills
npx -y firecrawl-cli@latest setup workflows        # unchanged
npx -y firecrawl-cli@latest setup developer-index  # any single catalog skill; firecrawl- prefix optional
npx -y firecrawl-cli@latest setup build --browser  # also log in if no API key is found

Subcommands

  • setup skills stays as an alias for core (backwards compatible; its help text previously claimed it installed core/build, but it only ever installed the core set)
  • Fills a real gap: since the init revamp dropped build skills, nothing in the CLI could install the firecrawl-build* family — new BUILD_SKILLS/BUILD_SKILL_SELECTION mirror the five build skills in the catalog
  • Single-skill args resolve against all three families by exact name or with the firecrawl- prefix added; group names win ties (setup build = group, setup firecrawl-build = skill); unknown names print the full subcommand help
  • All installs come from firecrawl/skills by name (layout-independent, so the cli→core catalog rename doesn't affect this), keeping skills.sh install counters consolidated on the catalog

Auth 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):

  • Authenticated → silent, nothing changes
  • --browser → run the browser login directly and persist credentials
  • Interactive TTY without -y → offer the browser login (default yes)
  • Non-interactive / -y → one-line hint only; skills walk agents through setup on first use, so agents, scripts, and CI never hang on a login
  • The bare setup bundle defers the offer until all steps ran, so it never asks twice

Verification: setup.test.ts 55/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_SKILLS is a hardcoded name list like CLI_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

ericciarla and others added 2 commits August 21, 2026 09:10
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>
@ericciarla ericciarla changed the title Add setup core/build group subcommands Add setup subcommands for skill groups and single skills Aug 21, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/commands/setup.ts
await installSkills(options, [CLI_SKILL_SELECTION]);
break;
case 'build':
await installSkills(options, [BUILD_SKILL_SELECTION]);

@cubic-dev-ai cubic-dev-ai Bot Aug 21, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with cubic

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>
@ericciarla ericciarla mentioned this pull request Aug 21, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/commands/setup.ts
async function offerSkillsAuth(options: SetupOptions): Promise<void> {
if (options.skipAuthOffer) return;

if (isAuthenticated()) return;

@cubic-dev-ai cubic-dev-ai Bot Aug 21, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with cubic

@ericciarla
ericciarla merged commit c110d2e into main Aug 21, 2026
4 of 8 checks passed
@ericciarla
ericciarla deleted the setup-group-subcommands branch August 21, 2026 14:31
ericciarla added a commit that referenced this pull request Aug 21, 2026
… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant