Command Line Flags
OAuth Init supports the following command-line flags to customize its behavior:--quiet / -q
Reduce output verbosity. When enabled, most informational messages and step indicators will be suppressed.
globalConfig.quiet = true and affects:
- Step messages (
log.step) - Info messages (
log.info) - General messages (
log.message)
--no-open / -n
Prevent the CLI from automatically opening browser URLs. URLs will still be displayed in the terminal.
- Remote SSH sessions
- Headless environments
- CI/CD pipelines
- When you prefer to manually copy and paste URLs
--help / -h
Display the help message with usage instructions.
Combining Flags
You can combine multiple flags:Global Configuration
The CLI maintains a global configuration object defined insrc/lib/config.ts:
Environment Variables
OAuth Init creates environment variables for storing credentials. The naming convention follows this pattern:Google OAuth
GitHub OAuth
Discord OAuth
Save Options
When saving credentials, you can choose from four options:.env File
Saves credentials to a .env file in the current directory.
.env.local File
Saves credentials to a .env.local file (commonly used in Next.js and other frameworks).
JSON File
Saves credentials as a JSON file named{provider}-credentials.json:
Print to Console
Displays credentials in the terminal without saving to a file.Callback URL Patterns
OAuth Init automatically detects your auth library and suggests appropriate callback URLs:| Auth Library | Callback Pattern |
|---|---|
| next-auth | /api/auth/callback/[provider] |
| @auth/core | /api/auth/callback/[provider] |
| better-auth | /api/auth/callback/[provider] |
| lucia | /auth/callback |
| arctic | /auth/callback/[provider] |
| iron-session | /api/auth/callback |
| Generic | /oauth/callback/[provider] |
http://localhost:3000, but you can customize this during setup.
Project Detection
OAuth Init automatically detects your auth library by readingpackage.json in the current directory. If no known library is found, it uses a generic callback pattern.