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
CommandDescription
kavach add auth-pageGenerate authentication page with all configured providers
kavach add routesGenerate data and RPC route handlers

Options

OptionDescription
--templateChoose a template (default, cached)
--forceOverwrite existing files

Next Steps

Kavach — Authentication made simple llms.txt