Socket
Book a DemoInstallSign in
Socket

@electric-sql/start

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@electric-sql/start

CLI package for the ElectricSQL Quickstart.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
3
Created
Source

@electric-sql/start

CLI package for the ElectricSQL Quickstart.

Usage

Create a new app using Electric with TanStack DB, based on the examples/tanstack-db-web-starter TanStack Start template app:

pnpx @electric-sql/start my-electric-app

This command will:

  • pull in the template app using gitpick
  • provision cloud resources
    • a Postgres database using Neon
    • an Electric sync service using Electric Cloud
    • fetch their access credentials
  • configure the local .env to use the credentials
  • add psql, claim and deploy commands to the package.json
    • also using the generated credentials

Environment Variables

The CLI automatically generates these environment variables:

  • DATABASE_URL - PostgreSQL connection string
  • ELECTRIC_SECRET - Electric Cloud authentication secret
  • ELECTRIC_SOURCE_ID - Electric sync service identifier

Commands

pnpm dev          # Start development server
pnpm psql         # Connect to PostgreSQL database
pnpm claim        # Claim temporary resources
pnpm deploy       # Deploy to Netlify

pnpm psql

Connect directly to your PostgreSQL database using the configured DATABASE_URL:

pnpm claim

Claim temporary resources to move them to your permanent Electric Cloud and Neon accounts.

pnpm deploy

Deploy your app to Netlify with all environment variables configured.

Development

This package is part of the Electric monorepo. To work on it:

# From the monorepo root
pnpm install   # Install all workspace dependencies
pnpm build     # Build all packages

# From packages/quickstart
pnpm build     # Compile TypeScript
pnpm dev       # Build and test locally

Testing Against Different API Environments

The Electric API base URL can be configured via the ELECTRIC_API_BASE_URL environment variable. This is useful for testing against staging or development API servers.

# Default (production)
pnpm test

# Against a custom API server
ELECTRIC_API_BASE_URL=https://api.staging.electric-sql.cloud pnpm test

The default API base URL is https://api.electric-sql.cloud.

Keywords

cli

FAQs

Package last updated on 24 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts