SwitchPilot Docs

Control your product features without redeploying.

Server-side essentials
Security and runtime requirements for every integration.

Official SDKs are server-side only.

Never expose API keys in browser or client code.

Store API keys in environment variables.

The default fallback is false.

SDKs fail safely if SwitchPilot is unreachable.

Default cache TTL: 60 seconds.

Default stale-if-error window: 5 minutes.

What is SwitchPilot?

SwitchPilot helps founders and dev teams create simple ON/OFF feature flags, read them server-side, and turn product features on or off without redeploying. Change a flag in the dashboard and the SDK picks it up from your backend or server-rendered app.

Official server-side SDKs

SwitchPilot provides two officially published SDKs: the Node.js SDK@switchpilot/nodeand the Python SDKswitchpilot. Both packages are designed for server-side usage only, so your project API key never needs to enter browser code.

Node.js SDK

@switchpilot/node

v0.2.0

Node.js 18+

Python SDK

switchpilot

v0.2.0

Python 3.10+

How it works

1

Create a project

A project groups its feature flags and has its own API key.

2

Copy the one-time API key

Store the server-side secret before leaving the success screen.

3

Install a server SDK

Choose the official Node.js or Python package for your backend.

4

Create your first flag

Add boolean flags with stable keys such asnew-dashboardand choose whether each one is on or off.

5

Connect application areas

Declare the routes, components, APIs, services, and dependencies controlled by the flag.

6

Understand the impact

Use the Feature Map and its explainable risk reasons to review what could be affected.

7

Toggle safely

Review the impact assessment, then confirm the change in the selected environment.

Quick start

your first flag
1. Create a project
2. Copy your API key
3. Install an SDK
4. Create a flag named new-dashboard
5. Check the flag server-side
terminal
pnpm add @switchpilot/node
server.ts
import { createSwitchPilot } from "@switchpilot/node";

const flags = createSwitchPilot({
  apiKey: process.env.SWITCHPILOT_API_KEY!,
});

const enabled = await flags.isEnabled("new-dashboard");

Create a project and copy the key

In the dashboard, openProjects → New projectand create your project. SwitchPilot displays the project API key once in a dialog on the new project page. Copy it before closing the dialog and save it in your password manager or secret store.

.env
SWITCHPILOT_API_KEY="sp_live_xxxxxxxxx"

API key FAQ

Can I view a key again? No. SwitchPilot stores only a one-way SHA-256 hash and a masked preview, so an existing key cannot be recovered.

What if I lose it? Every plan can regenerate the key for the selected environment in Project Settings. The previous key is revoked immediately, while the project, flags, and Application Areas stay intact.

Safe by default

A flag check returns falseby default when the key is missing from the response or SwitchPilot cannot be reached. Successful responses are cached in memory for 60 seconds by default, with a five-minute stale-if-error window for the last valid configuration.

Supported integrations

SwitchPilot supports Next.js App Router and Node.js backends through the official @switchpilot/node package, and Python backends through the official switchpilot package.