Install the AscendKit CLI and SDKs.

Installation

Prerequisites

  • Node.js 18 or later (for CLI and JavaScript SDK)
  • Python 3.10 or later (for Python SDK, if applicable)

CLI

The CLI authenticates you, initializes projects, and configures all AscendKit services. Works on macOS, Linux, and Windows.

npm install -g @ascendkit/cli

Or run without installing:

npx @ascendkit/cli

Verify installation

ascendkit --version

Next.js SDK

For Next.js applications with full server-side auth, pre-built UI components, and analytics:

npm install @ascendkit/nextjs

Note: The package is @ascendkit/nextjs. It has next >= 14 and react >= 18 as peer dependencies. The React hooks and components also work in other React frameworks (Vite, Remix, Astro), but the server-side auth runtime requires Next.js.

Python SDK

For Python backends that need to verify access tokens or handle webhooks. Works with any framework (FastAPI, Flask, Django, etc.):

pip install ascendkit

Environment variables

After running ascendkit init and ascendkit set-env, the CLI writes these into your .env / .env.local files automatically. You can also set them manually:

VariableSideRequired forDescription
ASCENDKIT_API_URLServerAllAscendKit backend URL
NEXT_PUBLIC_ASCENDKIT_API_URLClientNext.jsSame URL, exposed to browser
ASCENDKIT_ENV_KEYServerAllProject public key (pk_dev_...)
NEXT_PUBLIC_ASCENDKIT_ENV_KEYClientNext.jsSame key, exposed to browser
APP_URLServerAuth redirectsPublic URL where your app is hosted
ASCENDKIT_SECRET_KEYServerAnalytics, adminSecret key (never expose to client)
ASCENDKIT_WEBHOOK_SECRETServerWebhooksWebhook signing secret (whsec_...)

APP_URL should be your app's origin — http://localhost:3000 for local development, or https://app.yourdomain.com for production. The SDK can infer the origin when blank, but setting it explicitly avoids "Invalid origin" errors with social login.

The NEXT_PUBLIC_ prefixed variables are only needed for Next.js applications. Python backends only need ASCENDKIT_ENV_KEY, ASCENDKIT_SECRET_KEY, and ASCENDKIT_WEBHOOK_SECRET.

Next steps

  1. Initialize the CLI in your project
  2. Integrate with your app (Next.js) or set up your Python backend