diff --git a/.changeset/init-needs-no-account.md b/.changeset/init-needs-no-account.md new file mode 100644 index 00000000000..13a6bc01c3c --- /dev/null +++ b/.changeset/init-needs-no-account.md @@ -0,0 +1,5 @@ +--- +'@clerk/shared': patch +--- + +The missing and invalid key errors now say that `npx clerk@latest init` does not need a Clerk account and writes temporary dev keys. Readers previously saw `init` listed beside `link`, `env pull` and the Dashboard link, and assumed signing up was required before any of the steps would work. diff --git a/packages/shared/src/__tests__/error.spec.ts b/packages/shared/src/__tests__/error.spec.ts index 2e4b7e09cea..0588a852a94 100644 --- a/packages/shared/src/__tests__/error.spec.ts +++ b/packages/shared/src/__tests__/error.spec.ts @@ -26,6 +26,12 @@ describe('ErrorThrower', () => { ); }); + it('says init needs no signup, so agents do not read it as requiring an account', () => { + expect(() => errorThrower.throwMissingPublishableKeyError()).toThrow( + "'npx clerk@latest init' does not need a Clerk account and writes temporary dev keys.", + ); + }); + it('names the missing key so the secret key error is distinguishable from the publishable key error', () => { expect(() => errorThrower.throwMissingSecretKeyError()).toThrow( '@clerk/test-package: Missing secretKey.\n\nTo use an existing Clerk app, run:\nnpx clerk@latest link\nnpx clerk@latest env pull', diff --git a/packages/shared/src/errors/keySetupGuidance.ts b/packages/shared/src/errors/keySetupGuidance.ts index cda3ba1e7ca..28b9a0ab31e 100644 --- a/packages/shared/src/errors/keySetupGuidance.ts +++ b/packages/shared/src/errors/keySetupGuidance.ts @@ -10,6 +10,8 @@ const dashboardFallback = `Or copy keys from https://dashboard.clerk.com/~/api-k export const keySetupGuidance = `To create a new Clerk app, run: npx clerk@latest init +'npx clerk@latest init' does not need a Clerk account and writes temporary dev keys. + ${existingAppSteps} ${dashboardFallback}`;