CLI Commands
Kavach CLI helps you set up authentication in your SvelteKit projects.
init
Initialize Kavach in your project with interactive prompts:
npx kavach init This command will:
- Prompt for authentication adapter selection
- Configure OAuth providers
- Set up route protection rules
- Generate necessary configuration files
add
Add pre-built components to your project:
npx kavach add auth-page
npx kavach add routes | Command | Description |
|---|---|
kavach add auth-page | Generate authentication page with all configured providers |
kavach add routes | Generate data and RPC route handlers |
Options
| Option | Description |
|---|---|
--template | Choose a template (default, cached) |
--force | Overwrite existing files |