https://github.com/halvaradop/auth-cli
This initializer sets up projects with pre-configured templates and unified auth.js authentication across Next.js, SvelteKit, and Express!
https://github.com/halvaradop/auth-cli
authjs cli express initializer nextjs npm-package sveltekit terminal
Last synced: 14 days ago
JSON representation
This initializer sets up projects with pre-configured templates and unified auth.js authentication across Next.js, SvelteKit, and Express!
- Host: GitHub
- URL: https://github.com/halvaradop/auth-cli
- Owner: halvaradop
- License: mit
- Created: 2024-06-17T21:33:27.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-05-01T22:52:13.000Z (9 months ago)
- Last Synced: 2025-08-30T04:32:14.758Z (4 months ago)
- Topics: authjs, cli, express, initializer, nextjs, npm-package, sveltekit, terminal
- Language: TypeScript
- Homepage:
- Size: 111 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# @halvaradop/auth-init
`@halvaradop/auth-init` is an initializer that facilitates and accelerates the setup of projects with authentication using `Auth.js`. It supports the four main frameworks offered by `Auth.js`:
- Next.js
- Qwik
- SvelteKit
- Express
It simplifies the configuration to create a basic setup for using `Auth.js` with your favorite framework, helping you focus on incorporating custom authentication configurations provided by `Auth.js`.
## Installation
To install the package, use npm or pnpm. For more information about [Auth.js](https://authjs.dev/), you can check their documentation. Run the following command to install the package:
```bash
# npm
npm install -g @halvaradop/auth-init
# pnpm
pnpm add -g @halvaradop/auth-init
```
## Usage
The initializer provides simple commands:
```sh
auth-init [options] [command]
```
### Options
- `-V, --version`: Output the version number
- `-h, --help`: Display help for command
### Commands
- `init [options]`: Setup the project with the selected framework
- `secret [options]`: Generate a secret key (required by Auth.js)
- `provider [options]`: Initialize the configuration for the selected provider
- `help [command]`: Display help for command
### Examples
```sh
# Generate a secret key
auth-init secret
# Set up project with Next.js framework
auth-init init -f next
auth-init init --framework next
# Set up `Google` provider
auth-init provider -p google
auth-init provider --provider google
```
## Contributing
We welcome contributions to `@halvaradop/auth-init`! If you have an idea for a new feature or find an improvement to an existing one, please feel free to open an issue or create a pull request. We offer a guide on how to contribute to the project and the necessary steps to do so. Read our [Contributing Guideline](https://github.com/halvaradop/.github/blob/master/.github/CONTRIBUTING.md).
## Code of Conduct
Please be aware that this project has a code of conduct, and we expect all contributors to follow these guidelines in their interactions. For more information, please read our [Code of Conduct](https://github.com/halvaradop/.github/blob/master/.github/CODE_OF_CONDUCT.md).