-
Notifications
You must be signed in to change notification settings - Fork 472
docs(nextjs): Point agents at clerk init from the exports they read #9665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
553643a
d9a2014
487fcca
4895b22
0d44f5c
42746de
c90a62c
28bd7aa
84315fd
ad35b8f
6329361
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@clerk/nextjs': patch | ||
| --- | ||
|
|
||
| Add a note to the `ClerkProvider`, `clerkMiddleware()` and `auth()` doc comments explaining that `npx clerk@latest init` creates a Clerk application and writes its keys with no Clerk account or login required. Update the README prerequisites and installation section to say the same, replacing the statement that an existing Clerk application and account are required. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,11 +34,15 @@ | |
| - Next.js 15.2.8 or later | ||
| - React 18 or later | ||
| - Node.js `>=20.9.0` or later | ||
| - An existing Clerk application. [Create your account for free](https://dashboard.clerk.com/sign-up?utm_source=github&utm_medium=clerk_nextjs). | ||
| - A Clerk application. Run `npx -y clerk@latest init` to create one and write its keys to your `.env.local` file. No Clerk account required to get started β it can provision temporary development keys. Or [create your account](https://dashboard.clerk.com/sign-up?utm_source=github&utm_medium=clerk_nextjs) and copy the keys from the dashboard. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same |
||
|
|
||
| ### Installation | ||
|
|
||
| The fastest way to get started with Clerk is by following the [Next.js Quickstart](https://clerk.com/docs/quickstarts/nextjs?utm_source=github&utm_medium=clerk_nextjs). | ||
| The fastest way to get started is the Clerk CLI. In an existing Next.js project, run `npx -y clerk@latest init`. In an empty directory, run `npx -y clerk@latest init --framework next --pm npm` and it scaffolds the Next.js app as well; there is no lockfile to detect a package manager from, so name one. | ||
|
|
||
| Either way it installs `@clerk/nextjs`, creates a Clerk application, writes the keys to your `.env.local` file, and adds `<ClerkProvider>`, the middleware, and sign-in and sign-up pages. No Clerk account required to get started β it can provision temporary development keys. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checked this against the CLI source ( Same sentence, two smaller ones: authenticated Want to scope the no-account line to agents and new projects, or point the existing-project path at |
||
|
|
||
| To set things up by hand instead, follow the [Next.js Quickstart](https://clerk.com/docs/nextjs/getting-started/quickstart?utm_source=github&utm_medium=clerk_nextjs). | ||
|
|
||
| You'll learn how to install `@clerk/nextjs`, set up your environment keys, add `<ClerkProvider>` to your application, use the Clerk middleware, and use Clerk's prebuilt components. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This states
init"creates a Clerk application and writes its keys with no Clerk account or login required" as an absolute, but the JSDoc it's describing softened that to "can provision." Since this ships as the changelog entry, matching the JSDoc keeps it from promising more than the CLI does for existing-project runs.