Simplify Your Next.js Auth Setup with the PropelAuth CLI

Whenever we build client libraries for any framework, we start by setting three key design goals:
- Is it easy to understand?
- Does it leverage the framework’s features as effectively as possible?
- Is it hard to make mistakes? (Which is a bit different than just being easy to understand.)
We apply these principles to every aspect of our libraries - whether it’s the initial setup, dashboard configuration, or writing future authentication and authorization code. We continually gauge our progress using support tickets and similar feedback channels. Based on that input, we’re thrilled to introduce the brand-new propelauth
CLI.
Introducing the propelauth CLI
Today, we’re excited to announce the propelauth
CLI—a tool designed to set up PropelAuth in your framework quickly and painlessly.
For instance, if you’re setting up authentication with Next.js’s App Router, all you need to do is run:
propelauth setup -f nextjs-app
From there, the CLI takes care of everything for you. Here’s a quick demo:
With just one command, we turned a vanilla Next.js App Router project into a fully functioning application that supports authentication, 2FA, enterprise SSO, SCIM, and so much more.
What frameworks does it support?
For this initial release, we’ve focused on Next.js, since it often has the trickiest setup. Between the Pages vs. App Router, different versions (15+ vs. older), and deciding whether to use it as a full-stack framework or just a frontend, there’s a lot to keep straight.
The propelauth
CLI can detect your Next.js version, figure out which router you’re using, and update your repository accordingly.
It works with both new and existing Next.js projects, so you can use it whether you’re bootstrapping a brand-new product or adding authentication to an existing one.
How do I get started?
To get started, simply install the CLI globally and log in:
npm i -g @propelauth/cli
propelauth login
You’ll be prompted for a personal API key. After that, navigate to the project where you want to add auth and run:
propelauth setup
That’s all there is to it! You can see a full guide on the CLI here.
As always, if you have any questions or feedback, reach out at support@propelauth.com. We’re here to help!