Tags: clerk/cli
Tags
feat(api): add `clerk api --fapi` for the public Frontend API (#345) * feat(api): add --fapi to call the public Frontend API clerk api spoke only BAPI and PLAPI, so verifying a config change against the instance's public FAPI /v1/environment (what clerk-js consumes) meant dropping to curl and decoding the FAPI domain out of the publishable key by hand. Add --fapi: resolve the FAPI host from the instance's publishable key (via --app/--instance or the linked project) and do an unauthenticated passthrough, reusing the existing lib/fapi.ts client. --fapi and --platform are mutually exclusive. Closes #332 * fix(api): address review feedback on --fapi passthrough - Move dry-run check before resolveFapiHost so --fapi --dry-run avoids the Platform API round-trip; shows <fapi-host> placeholder instead - Import CLERK_JS_API_VERSION from lib/fapi.ts instead of redeclaring it - Warn when --secret-key is provided with --fapi (key is ignored) - Add tests: --fapi no-app NOT_LINKED error, /environment and /v1/environment path normalization, --secret-key warning, --dry-run no network call * fix(api): address remaining review feedback on --fapi passthrough - Refactor fallback branch of resolveInstance to use resolveFetchedApplicationInstance instead of hand-rolling app.instances.find (addresses wyattjoh comment 3) - Bump CLERK_JS_API_VERSION from "5" to "6" to match current clerk-js major (addresses dmoerner comment 6) - Clarify --fapi help text: "unauthenticated endpoints only" instead of "no auth" to avoid implying it skips auth on authenticated endpoints (addresses dmoerner comment 7) * refactor(api): move fapiRequest into lib/fapi.ts Co-locate the FAPI passthrough request with the other FAPI helpers (bootstrapDevBrowser, fetchUserSettings) in lib/fapi.ts, where it already reached for decodePublishableKey and CLERK_JS_API_VERSION. Promote the passthrough response shape to a shared `ApiResponse` type in lib/fetch.ts so the moved function does not have to import upward from commands/. commands/api/fapi.ts keeps the command-layer instance and host resolution. Addresses review feedback on #345. Claude-Session: https://claude.ai/code/session_01QnfBw9qY7u19BvUWyfQGC6
fix(api): keep separator between path and summary in `clerk api ls` (#… …340) * fix(api): keep separator between path and summary in api ls Long endpoint paths (>= the padded column width) glued straight onto the description because padEnd is a no-op once the string meets the target width. Guarantee a two-space separator for over-long paths. Fixes #330 * test(api-ls): add coverage for long path separator behavior Adds a test case with a 54-char path (above the 50-char pathWidth cap) to exercise the `ep.path.length >= pathWidth` branch in printTable, verifying two spaces are emitted between the path and its summary.
fix(agent): don't hint at a sandbox for ordinary network failures (#342) * fix(agent): only hint at a sandbox for permission-like network failures The agent-mode sandbox hint fired on every network failure, including plain unreachable hosts (VPN, DNS, ECONNREFUSED) on a normal host shell, where it was misleading. Require a permission-like error before hinting, and collapse the two-line message to one. Fixes #331 * fix(agent): check error.code and error.cause for permission-like network failures Bun's fetch collapses connectivity failures into a generic message and puts the discriminator on error.code (e.g. ConnectionRefused) and error.cause. Extend isPermissionLikeFailure to also inspect error.code and recursively check error.cause so sandbox detection works for real Bun fetch error shapes. Add test cases covering Bun-style errors with .code and .cause.
feat(init): install the clerk-expo setup skill for Expo projects (#328) * feat(init): install the clerk-expo setup skill for Expo projects The expo entry in FRAMEWORK_SKILL_MAP (added in #86, 2026-04) predates the mobile/clerk-expo setup skill (added to clerk/skills in 2026-05), so Expo inits only got clerk-expo-patterns. The map now supports multiple skills per framework and Expo installs both. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor(init): make framework skill arrays readonly Review feedback on the FRAMEWORK_SKILL_MAP leak: type the map as Record<string, readonly string[]> so immutability is declared at the source and getFrameworkSkills inherits it, instead of copying at runtime. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
build(deps-dev): bump oxlint from 1.69.0 to 1.70.0 (#350) Bumps [oxlint](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxlint) from 1.69.0 to 1.70.0. - [Release notes](https://github.com/oxc-project/oxc/releases) - [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxlint/CHANGELOG.md) - [Commits](https://github.com/oxc-project/oxc/commits/oxlint_v1.70.0/npm/oxlint) --- updated-dependencies: - dependency-name: oxlint dependency-version: 1.70.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
build(deps-dev): bump oxfmt from 0.54.0 to 0.55.0 (#349) Bumps [oxfmt](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxfmt) from 0.54.0 to 0.55.0. - [Release notes](https://github.com/oxc-project/oxc/releases) - [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxfmt/CHANGELOG.md) - [Commits](https://github.com/oxc-project/oxc/commits/oxfmt_v0.55.0/npm/oxfmt) --- updated-dependencies: - dependency-name: oxfmt dependency-version: 0.55.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
PreviousNext