Add AuthKit to your project in minutes with a single command. The WorkOS CLI uses AI to detect your framework, install the right SDK, and write the integration code automatically.
Run one command, the CLI handles the rest: framework detection, SDK installation, route creation, environment setup, and build validation. Your app goes from zero auth to full AuthKit integration in about two minutes.
npx workos@latest install
$ npx workos@latest install ◆ Detected Next.js 15.3.1 (App Router) │ ◇ Opening browser for WorkOS authentication... │ Authenticated as nick@example.com │ ◇ Configuring your WorkOS dashboard... │ ✓ Redirect URI set to http://localhost:3000/callback │ ✓ Homepage URL set to http://localhost:3000 │ ◇ Installing @workos-inc/authkit-nextjs... │ ✓ Package installed │ ◇ Analyzing project structure... │ ✓ Created /app/callback/route.ts │ ✓ Created proxy.ts │ ✓ Updated /app/layout.tsx with AuthKitProvider │ ✓ Created .env.local │ ◇ Validating integration... │ ✓ Build completed successfully │ ◆ AuthKit is ready. Run `npm run dev` to get started.
Prefer to configure things yourself? Follow the Quick Start guide instead.
The CLI takes care of everything you would normally do manually:
.env.localThe CLI understands framework-specific nuances – like Next.js App Router vs Pages Router, Vite vs Create React App, and React Router nuances – and generates the appropriate code for your setup. If you have existing middleware or configuration, it composes with it rather than replacing it.
| Framework | SDK |
|---|---|
| Next.js | @workos-inc/authkit-nextjs |
| React | @workos-inc/authkit-react |
| React Router | @workos-inc/authkit-react-router |
| TanStack Start | @workos-inc/authkit-tanstack-start |
| SvelteKit | @workos-inc/authkit-sveltekit |
| Node.js / Express | @workos-inc/node |
| Vanilla JS | workos |
| Python / Django | workos (pip) |
| Ruby / Rails | workos (gem) |
| Go | github.com/workos/workos-go |
| PHP | workos/workos-php |
| PHP / Laravel | workos/workos-php-laravel |
| .NET / ASP.NET Core | WorkOS.net |
| Kotlin | com.workos:workos-kotlin |
| Elixir / Phoenix | workos (hex) |
The CLI uses an AI agent with restricted permissions to integrate AuthKit into your project:
git diff after installation to review every change.| Flag | Description |
|---|---|
--integration <name> | Skip auto-detection and specify your framework manually |
--redirect-uri <uri> | Custom OAuth callback URI (default: http://localhost:3000/callback) |
--no-validate | Skip post-install build validation |
--debug | Verbose logging for troubleshooting |
Use the --integration flag to specify your framework manually:
npx workos@latest install --integration nextjs
Run the CLI with --debug for detailed output. Make sure your project builds cleanly before running the CLI – pre-existing build errors will cause validation to fail.
npx workos@latest install --debug
After the CLI completes, use git diff to review all the files it created or modified:
git diff
Run workos doctor to diagnose common issues. If the problem persists, open an issue on GitHub with the output from --debug mode.