{"id":21901801,"url":"https://github.com/k8pai/nextauth-cli","last_synced_at":"2026-03-09T01:34:33.969Z","repository":{"id":193745501,"uuid":"689068629","full_name":"k8pai/nextauth-cli","owner":"k8pai","description":"A cli tool to initialize nextauth setup with a simple command.","archived":false,"fork":false,"pushed_at":"2023-09-24T02:59:02.000Z","size":324,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"k8pai","last_synced_at":"2025-07-26T16:45:54.824Z","etag":null,"topics":["authentication","authorization","changesets","cli","cli-app","cli-tool","clitools","commander","commanderjs","k8pai","nextauth","nextauth-cli","nextauthjs","nextjs","nodejs","npm","npm-package","pnpm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k8pai.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-08T18:12:08.000Z","updated_at":"2024-03-25T14:51:05.000Z","dependencies_parsed_at":"2025-07-26T12:25:46.634Z","dependency_job_id":"e095ecbc-f571-44da-84a2-91ce4e116bee","html_url":"https://github.com/k8pai/nextauth-cli","commit_stats":null,"previous_names":["k8pai/nextauth-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/k8pai/nextauth-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8pai%2Fnextauth-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8pai%2Fnextauth-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8pai%2Fnextauth-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8pai%2Fnextauth-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k8pai","download_url":"https://codeload.github.com/k8pai/nextauth-cli/tar.gz/refs/heads/k8pai","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8pai%2Fnextauth-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30279777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authorization","changesets","cli","cli-app","cli-tool","clitools","commander","commanderjs","k8pai","nextauth","nextauth-cli","nextauthjs","nextjs","nodejs","npm","npm-package","pnpm","typescript"],"created_at":"2024-11-28T15:15:01.557Z","updated_at":"2026-03-09T01:34:33.949Z","avatar_url":"https://github.com/k8pai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NextAuth CLI\n\nNextAuth CLI is a command-line interface tool designed to simplify the process of creating base templates and initializing NextAuth.js base templates for users.\n\n## Table of Contents\n\n-   [Installation](#installation)\n-   [Commands](#commands)\n    -   [Next.js Specific Commands](#nextauth)\n    -   [Sveletekit Specific Commands](#svelteauth)\n    -   [Solid Specific Commands](#solidauth)\n-   [Usage](#usage)\n-   [Example](#example)\n-   [Contributing](#contributing)\n-   [License](#license)\n\n## Installation\n\nTo install the NextAuth CLI, you can use npm:\n\n```bash\nnpm i -g nextauth-cli@latest\n```\n\n## Commands\n\nThe CLI provides a set of commands to streamline the setup process for **NextAuth.js**, **Sveltekit** and **Solid** | **Solid-start** projects. Below are the available commands for each project type:\n\n### Nextauth\n\n1. **For Nextjs Projects**\n\n```bash\nnextauth --router \u003crouter-type\u003e --provider \u003cprovider\u003e --adapter \u003cadapter\u003e --secret --env --ts\n```\n\n### Svelteauth\n\n2. **For Sveltekit Projects**\n\n```bash\nsvelteauth --provider \u003cprovider\u003e --adapter \u003cadapter\u003e --dynamic --secret --env --ts\n```\n\n### Solidauth\n\n3. **For Solid | Solid-start Projects**\n\n```bash\nsolidauth --provider \u003cprovider\u003e --adapter \u003cadapter\u003e --secret --env --ts\n```\n\n## Usage\n\nEfficiently set up your authentication flow with **NextAuth.js**, **Sveltekit**, or **Solid** | **Solid-start** projects using the provided CLI commands:\n\n1. **Commands with flags.**\n\n```bash\nnextauth --router \u003crouter-type\u003e --provider \u003cprovider\u003e --adapter \u003cadapter\u003e --secret --env --ts\n```\n\nCreates a new project with the the specified Next.js base template. Options for the following flags are given below.\n\n#### Options:\n\n-   `--env`: Specifies if an additional `.env.example` file is to be generated which includes all the `process.env` variables that are to be used. Default value is **false**.\n\n-   `--ts`: Specifies if the project is **typescript** configured. Default value is **false**.\n\n-   `--secret`: Specifies if NextAuth options should include a secret field.\n\n-   `--router \u003crouter-type\u003e`: Specifies the type of Next.js router to be used. Available options:\n\n    -   `app` ✅\n    -   `pages` ✅\n    -   `src` ⚒️\n\n-   `--adapter \u003cadapter\u003e`: Specifies the adapter used for the project. Available options:\n\n    -   `dgraph`✅\n    -   `drizzle`✅\n    -   `dynamodb`✅\n    -   `fauna`✅\n    -   `firebase`✅\n    -   `kysely`✅\n    -   `mikro-orm`⚒️\n    -   `mongodb`✅\n    -   `neo4j`✅\n    -   `pouchdb`⚒️\n    -   `prisma` ✅\n    -   `sequalize`✅\n    -   `supabase`✅\n    -   `typeorm`✅\n    -   `upstash-redis`✅\n    -   `xata`⚒️\n\n-   `--provider \u003cprovider\u003e`: Specifies the authentication provider(s) to be used for the project. Available options:\n    -   `Apple` ✅\n    -   `Atlassian` ✅\n    -   `Auth0` ✅\n    -   `Authentik` ✅\n    -   `AzureAD` ✅\n    -   `AzureB2C` ✅\n    -   `Battlenet` ✅\n    -   `Box` ✅\n    -   `BoxyHQSAML` ✅\n    -   `Bungie` ✅\n    -   `Cognito` ✅\n    -   `Coinbase` ✅\n    -   `Credentials` ✅\n    -   `Discord` ✅\n    -   `Dropbox` ✅\n    -   `DuendeIDS6` ✅\n    -   `Email` ✅\n    -   `Eveonline` ✅\n    -   `Facebook` ✅\n    -   `Faceit` ✅\n    -   `FortyTwoSchool` ✅\n    -   `Foursquare` ✅\n    -   `Freshbooks` ✅\n    -   `Fusionauth` ✅\n    -   `GitHub` ✅\n    -   `Gitlab` ✅\n    -   `Google` ✅\n    -   `Hubspot` ✅\n    -   `Instagram` ✅\n    -   `Kakao` ✅\n    -   `Keycloak` ✅\n    -   `Line` ✅\n    -   `LinkedIn` ✅\n    -   `Mailchimp` ✅\n    -   `Mailru` ✅\n    -   `Medium` ✅\n    -   `Naver` ✅\n    -   `Netlify` ✅\n    -   `Okta` ✅\n    -   `Onelogin` ✅\n    -   `Osso` ✅\n    -   `Osu` ✅\n    -   `Passage` ✅\n    -   `Patreon` ✅\n    -   `Pinterest` ✅\n    -   `Pipedrive` ✅\n    -   `Reddit` ✅\n    -   `Salesforce` ✅\n    -   `Slack` ✅\n    -   `Spotify` ✅\n    -   `Strava` ✅\n    -   `Todoist` ✅\n    -   `Trakt` ✅\n    -   `Twitch` ✅\n    -   `Twitter` ✅\n    -   `UnitedEffects` ✅\n    -   `Vk` ✅\n    -   `Wikimedia` ✅\n    -   `Wordpress` ✅\n    -   `WorkOS` ✅\n    -   `Yandex` ✅\n    -   `Zitadel` ✅\n    -   `Zoho` ✅\n    -   `Zoom` ✅\n\n2. **Commands with prompts support.**\n\nThe CLI ensures a seamless setup process by offering a prompt-based support to configure your specific project requirements. This interactive approach allows you to customize the authentication flow according to your needs effortlessly.\n\n## Example\n\n**Nextjs**\n\n```bash\nnextauth --router app --provider Google --adapter mongodb --env --ts --secret\n```\n\nIn this example:\n\n-   `--router app`: Specifies that the project will use the Next.js router with the \"**app**\" type.\n-   `--provider Google`: Specifies that Google authentication will be used.\n-   `--adapter mongodb`: Specifies that the project will use MongoDB as the database adapter.\n-   `--env`: Indicates that an additional `.env.example` file will be generated.\n-   `--ts`: Specifies that the project will be configured for TypeScript.\n-   `--secret`: Indicates that NextAuth options will include a secret field.\n\n**Sveltekit**\n\n```bash\nsvelteauth --provider Google --adapter mongodb --env --ts --secret --dynamic\n```\n\nIn this example:\n\n-   `--provider Google`: Specifies that Google authentication will be used.\n-   `--adapter mongodb`: Specifies that the project will use MongoDB as the database adapter.\n-   `--env`: Indicates that an additional `.env.example` file will be generated.\n-   `--ts`: Specifies that the project will be configured for TypeScript.\n-   `--secret`: Indicates that NextAuth options will include a secret field.\n-   `--dynamic`: Specifies that the module provides access to runtime environment variables, as defined by the platform you're running on.\n\n**Solid**\n\n```bash\nsolidauth --provider Google --adapter prisma --env --ts --secret --db mongodb\n```\n\nIn this example:\n\n-   `--provider Google`: Specifies that Google authentication will be used.\n-   `--adapter prisma`: Specifies that the project will use Prisma as the database adapter.\n-   `--db mongodb`: Specifies that Prisma adapter uses `MongoDb` as it's database.\n-   `--env`: Indicates that an additional `.env.example` file will be generated.\n-   `--ts`: Specifies that the project will be configured for TypeScript.\n-   `--secret`: Indicates that NextAuth options will include a secret field.\n\nFeel free to modify the options and values based on your specific use case.\n\n## Status\n\n-   ✔️ **Partially Fixed**: Some progress has been made, but more work is needed.\n-   ✅ **Totally Fixed**: All reported issues have been successfully resolved.\n-   ⚒️ **Build in Progress**: Work is currently underway to fix the reported issues.\n\n## Contributing\n\nWe welcome contributions from the community! If you find any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk8pai%2Fnextauth-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk8pai%2Fnextauth-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk8pai%2Fnextauth-cli/lists"}