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 hasnext >= 14andreact >= 18as 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:
| Variable | Side | Required for | Description |
|---|---|---|---|
ASCENDKIT_API_URL | Server | All | AscendKit backend URL |
NEXT_PUBLIC_ASCENDKIT_API_URL | Client | Next.js | Same URL, exposed to browser |
ASCENDKIT_ENV_KEY | Server | All | Project public key (pk_dev_...) |
NEXT_PUBLIC_ASCENDKIT_ENV_KEY | Client | Next.js | Same key, exposed to browser |
APP_URL | Server | Auth redirects | Public URL where your app is hosted |
ASCENDKIT_SECRET_KEY | Server | Analytics, admin | Secret key (never expose to client) |
ASCENDKIT_WEBHOOK_SECRET | Server | Webhooks | Webhook 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
- Initialize the CLI in your project
- Integrate with your app (Next.js) or set up your Python backend