Reference
Environment Variables
Complete reference for all Asiyst environment variables for the SDK, CLI, and API. SDK Variables Variable Framework Description NEXT PUBLIC ASIYST PROJECT...
On this page (11 sections)
SDK Variables
| Variable | Framework | Description |
|---|---|---|
NEXT_PUBLIC_ASIYST_PROJECT_ID | Next.js | Project ID for SDK init |
NEXT_PUBLIC_ASIYST_PUBLIC_KEY | Next.js | Public key for SDK init |
VITE_ASIYST_PROJECT_ID | Vite | Project ID for SDK init |
VITE_ASIYST_PUBLIC_KEY | Vite | Public key for SDK init |
PUBLIC_ASIYST_PROJECT_ID | SvelteKit | Project ID for SDK init |
CLI Variables
| Variable | Description |
|---|---|
ASIYST_API_TOKEN | API token for CLI auth (replaces interactive login) |
ASIYST_PROJECT_ID | Default project ID |
ASIYST_ENV | Default environment (development or production) |
ASIYST_REGION | Platform region |
HTTPS_PROXY | HTTP proxy for CLI network requests |
NO_PROXY | Hosts to bypass proxy |
API Variables
| Variable | Description |
|---|---|
ASIYST_API_TOKEN | Secret API token for server-side calls |
ASIYST_API_BASE_URL | Override the API base URL (for regional or private endpoints) |
Environment
Overview
Every Asiyst project provides isolated Development and Production environments to ensure testing never pollutes live analytics or disrupts active customer sessions.
Development vs Production Comparison
| Feature | Development (pk_test_) | Production (pk_live_) |
|---|---|---|
| Domain Whitelist | Relaxed (accepts localhost, 127.0.0.1) | Strict (whitelisted origins only) |
| Debug Logging | Verbose console output enabled | Minimized production logging |
| Telemetry Storage | Isolated sandbox metrics | Live customer analytics |
| Rate Limiting | Standard developer tier limits | High-concurrency enterprise tier |
Switching Environments in the SDK
Asiyst.init({
projectId: "proj_9f8a2b3c4d",
publicKey: process.env.NODE_ENV === "production"
? process.env.NEXT_PUBLIC_ASIYST_LIVE_KEY!
: process.env.NEXT_PUBLIC_ASIYST_TEST_KEY!,
});
Environment Variables
Overview
Store project identifiers and API credentials securely using standard environment variable conventions.
Client-Side Environment Variables
# Next.js (App Router / Pages Router)
NEXT_PUBLIC_ASIYST_PROJECT_ID=proj_9f8a2b3c4d
NEXT_PUBLIC_ASIYST_PUBLIC_KEY=pk_live_8e7d6c5b4a3f2e1d
# Vite / Vue / React
VITE_ASIYST_PROJECT_ID=proj_9f8a2b3c4d
VITE_ASIYST_PUBLIC_KEY=pk_live_8e7d6c5b4a3f2e1d
Server-Side & CLI Variables
# Backend server only (DO NOT EXPOSE TO BROWSER)
ASIYST_API_TOKEN=sk_live_9f8a2b3c4d5e6f7a8b9c