Quick Start

Ship your first Pushrift update end-to-end — from creating an app in the dashboard to seeing the update applied on a client.

This guide walks you through the full cycle: creating an app in the dashboard, wiring up the SDK, and shipping your first live update. You'll be done in under 5 minutes.


Step 1 — Create an app in the dashboard

  1. Sign in to the Pushrift dashboard.
  2. From the home screen, click New app.
  3. Give your app a name (e.g. my-electron-app).
  4. Note the App ID — you'll need it in the next step.

Step 2 — Install the SDK

In your Electron project, install @pushrift/sdk:

npm install @pushrift/sdk

Step 3 — Wire up the SDK

In your Electron main process file (main.js or main.ts), instantiate Pushrift before creating any windows, then pass getFilePath() to loadFile:

import { app, BrowserWindow } from 'electron'
import { Pushrift } from '@pushrift/sdk'
import path from 'path'

const pushrift = new Pushrift({
  appId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // your App ID
  appBundlePath: path.join(__dirname, '..', 'renderer'),
})

app.whenReady().then(() => {
  const win = new BrowserWindow({
    width: 1200,
    height: 800,
    webPreferences: {
      preload: path.join(__dirname, 'preload.js'),
    },
  })

  win.loadFile(pushrift.getFilePath())
})
The Pushrift constructor starts the update check immediately. By the time your window is ready to load, the latest bundle is already in place.

Step 4 — Get an API key

The CLI needs an API key to authenticate deployments.

  1. In the dashboard, go to API Keys.
  2. Click New API key, give it a name (e.g. local-dev), and copy the key.

Step 5 — Install the CLI

Coming soon — The CLI is under active development. Steps 5 and 6 will be updated when it is available.
npm install -g @pushrift/cli

Authenticate with your API key:

pushrift auth login --key YOUR_API_KEY

Step 6 — Deploy your first update

Make a visible change to your renderer (e.g. update a heading in index.html), then run:

pushrift deploy

You'll see output like:

Bundling assets...
Uploading release (12.4 MB)  ████████████████████ 100%
Signing artifacts...
Invalidating CDN cache...

✓ Deployed v0.0.1 to stable
  1 client will receive the update automatically.

The next time your Electron app launches, @pushrift/sdk detects the new bundle, downloads it, and getFilePath() returns the updated path. Your change appears without any user interaction.