You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLI package for the [ElectricSQL Quickstart](https://electric-sql.com/docs/quickstart).
4
+
5
+
## Usage
6
+
7
+
Create a new app using [Electric](https://electric-sql.com/product/electric) with [TanStack DB](https://tanstack.com/db), based on the [examples/tanstack-db-web-starter](https://github.com/electric-sql/electric/tree/main/examples/tanstack-db-web-starter)[TanStack Start](http://tanstack.com/start) template app:
8
+
9
+
```bash
10
+
pnpx @electric-sql/quickstart my-electric-app
11
+
```
12
+
13
+
This command will:
14
+
15
+
1. pull in the template app using gitpick
16
+
2. provision cloud resources
17
+
- a Postgres database using Neon
18
+
- an Electric sync service using Electric Cloud
19
+
- fetch their access credentials
20
+
3. configure the local `.env` to use the credentials
21
+
4. add `psql`, `claim` and `deploy` commands to the package.json
22
+
- also using the generated credentials
23
+
24
+
## Environment Variables
25
+
26
+
The CLI automatically generates these environment variables:
27
+
28
+
-`DATABASE_URL` - PostgreSQL connection string
29
+
-`ELECTRIC_SECRET` - Electric Cloud authentication secret
30
+
-`ELECTRIC_SOURCE_ID` - Electric sync service identifier
31
+
32
+
## Commands
33
+
34
+
```bash
35
+
pnpm dev # Start development server
36
+
pnpm psql # Connect to PostgreSQL database
37
+
pnpm claim # Claim temporary resources
38
+
pnpm deploy # Deploy to Netlify
39
+
```
40
+
41
+
### `pnpm psql`
42
+
43
+
Connect directly to your PostgreSQL database using the configured `DATABASE_URL`:
44
+
45
+
### `pnpm claim`
46
+
47
+
Claim temporary resources to move them to your permanent Electric Cloud and Neon accounts.
48
+
49
+
### `pnpm deploy`
50
+
51
+
Deploy your app to Netlify with all environment variables configured.
52
+
53
+
## Development
54
+
55
+
This package is part of the Electric monorepo. To work on it:
0 commit comments