Skip to content

varitykit init

Varity Team Core Contributors Updated March 2026

Create a new Varity project from a starter template.

Terminal window
varitykit init [PROJECT_NAME] [OPTIONS]
Terminal window
# Interactive mode
varitykit init
# With project name
varitykit init my-app
# With template
varitykit init my-app --template saas-starter
TemplateDescriptionBest For
saas-starterSaaS dashboard with auth, analytics, and billingMost applications
OptionShortDefaultDescription
--template-tsaas-starterTemplate to use
--path-p.Path where project should be created
--yes-yfalseSkip confirmation prompts
--githubfalseAdd GitHub Actions workflow for deployment

Running without arguments starts interactive mode:

Terminal window
$ varitykit init
? Project name: my-app
? Select a template: saas-starter
Creating project...
Created project directory
Copied template files
Installed dependencies
Your project is ready!
Next steps:
cd my-app
npm run dev

The generated project includes:

my-app/
├── .env.local.example # Environment variables template
├── .gitignore
├── package.json
├── tsconfig.json
├── next.config.mjs
├── src/
│ ├── app/
│ │ ├── layout.tsx # Root layout with auth provider
│ │ ├── page.tsx # Home page
│ │ └── dashboard/
│ │ └── page.tsx # Protected dashboard
│ ├── components/
│ │ ├── Header.tsx
│ │ └── LoginButton.tsx
│ └── lib/
│ └── varity.ts # Varity SDK setup
└── public/
└── logo.svg

The SaaS starter template includes:

  • Authentication - Auth provider pre-configured
  • Protected Routes - Route protection examples
  • Dashboard Layout - Responsive sidebar and navigation
  • Analytics - Data tables, charts, and KPIs
  • Environment Variables - .env.local.example with all variables
  • TypeScript - Full type support
  • Styling - Tailwind CSS configured
  • Deployment Ready - Works with varitykit app deploy

After initialization, set up your environment:

  1. Copy the example environment file

    Terminal window
    cp .env.local.example .env.local
  2. Start development server

    Terminal window
    npm run dev

Create your own template:

Terminal window
# Save current project as template
varitykit template save my-template
# Use custom template
varitykit init new-project --template my-template
# List available templates
varitykit template list

List available templates:

Terminal window
varitykit template list

Try installing dependencies manually:

Terminal window
cd my-app
npm install