create-pg 0.0.11-pr27-feat-posthog-16471912926.0 → 0.0.11-pr30-readme-16472332987.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +87 -29
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,50 +1,108 @@
1
- # Create DB CLI
1
+ ## **What is `create-db`?**
2
2
 
3
- CLI tool for provisioning a [temporary Prisma Postgres databases](https://www.prisma.io/postgres?utm_source=create_db_npm_docs).
3
+ `create-db` is an open-source CLI tool that provisions [**temporary Prisma Postgres databases**](https://www.prisma.io/postgres?utm_source=create_db_npm_docs) with a single command.
4
4
 
5
- ## Usage
5
+ ![Demo Gif](demo.gif)
6
+
7
+ Each database is available for **24 hours** by default. To keep the database permanently, you can **claim it for free** using the URL displayed in the CLI output.
8
+
9
+ This tool is designed for developers who need a fast way to test, prototype, or integrate Prisma Postgres without manual setup or creating an account.
10
+
11
+ ## **Installation and usage**
12
+
13
+ There is no need to install the tool globally. Simply run:
6
14
 
7
15
  ```bash
8
- npx create-db # Default region (us-east-1)
9
- npx create-db --region eu-west-1 # Custom region
10
- npx create-db --i # Interactive region selection
16
+ npx create-db@latest
11
17
  ```
12
18
 
13
- ## Key Files
19
+ You can also use the following aliases:
14
20
 
15
- - **Main Logic:** [`index.js`](index.js) - Argument parsing, API requests, and output
16
- - **Configuration:** [`package.json`](package.json) - CLI entry point and dependencies
17
- - **Environment:** `.env` - Worker endpoints configuration
21
+ ```bash
22
+ npx create-pg@latest
23
+ npx create-postgres@latest
24
+ ```
18
25
 
19
- ## Development
26
+ ## **Examples**
20
27
 
21
28
  ```bash
22
- npm install
29
+ npx create-db # Creates a database in the default region
30
+ npx create-db --region eu-west-1 # Creates a database in a specific region
31
+ npx create-db --i # Interactive region selection
32
+
23
33
  ```
24
34
 
25
- Create `.env` for local development:
35
+ ## **Available options**
26
36
 
27
- ```env
28
- # LOCAL
29
- CREATE_DB_WORKER_URL="http://127.0.0.1:8787"
30
- CLAIM_DB_WORKER_URL="http://127.0.0.1:8787"
37
+ You can run `npx create-db --help` or `npx create-db -h` to see all the available CLI options:
31
38
 
32
- # PROD
33
- # CLAIM_DB_WORKER_URL="https://create-db.prisma.io"
34
- # CREATE_DB_WORKER_URL="https://create-db-temp.prisma.io"
35
39
  ```
40
+ npx create-db [options]
41
+
42
+ Options:
43
+ --region <region>, -r <region> Specify a region
44
+ Available regions:
45
+ ap-southeast-1, ap-northeast-1,
46
+ eu-central-1, eu-west-3,
47
+ us-east-1, us-west-1
48
+
49
+ --interactive, -i Run in interactive mode
36
50
 
37
- If running both workers locally, use a different port for one and update the URL:
51
+ --help, -h Show this help message
38
52
 
39
- ```env
40
- CREATE_DB_WORKER_URL="http://127.0.0.1:9999"
41
- CLAIM_DB_WORKER_URL="http://127.0.0.1:8787"
42
53
  ```
43
54
 
44
- ## Test Locally
55
+ ## **CLI output example**
56
+
57
+ ```
58
+ ┌ 🚀 Creating a Prisma Postgres database
59
+
60
+ │ Provisioning a temporary database in us-east-1...
61
+
62
+ │ It will be automatically deleted in 24 hours, but you can claim it.
63
+
64
+ ◇ Database created successfully!
65
+
66
+ ● Connect to your database →
67
+
68
+ │ Prisma connection string:
69
+ │ prisma+postgres://accelerate.prisma-data.net/?api_key=...
70
+
71
+ │ Standard connection string:
72
+ │ postgresql://<username>:<password>@db.prisma.io:5432/postgres
73
+
74
+ ◆ Claim your database →
75
+
76
+ │ Want to keep your database? Claim for free:
77
+ │ https://create-db.prisma.io?projectID=proj_...
78
+
45
79
 
46
- ```bash
47
- npx create-db
48
- npx create-db --region eu-west-1
49
- npx create-db --i
50
80
  ```
81
+
82
+ ## **Claiming a database**
83
+
84
+ When you create a database using `create-db`, it is temporary and will be deleted automatically after **24 hours**.
85
+
86
+ The CLI output includes a **claim URL** that allows you to keep the database permanently for free.
87
+
88
+ **What claiming does:**
89
+
90
+ - Moves the database into your Prisma Postgres account.
91
+ - Prevents it from being auto-deleted.
92
+ - Lets you continue using the database as a long-term instance.
93
+
94
+ Example:
95
+
96
+ ```
97
+ ◆ Claim your database →
98
+
99
+ │ Want to keep your database? Claim for free:
100
+ |
101
+ │ https://create-db.prisma.io?projectID=proj_...
102
+
103
+ │ Your database will be deleted on 7/24/2025, 2:25:41 AM if not claimed.
104
+ ```
105
+
106
+ ## **Next steps**
107
+
108
+ - Refer to the section in the official [Prisma Postgres documentation](https://www.prisma.io/docs/postgres/introduction/npx-create-db).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pg",
3
- "version": "0.0.11-pr27-feat-posthog-16471912926.0",
3
+ "version": "0.0.11-pr30-readme-16472332987.0",
4
4
  "description": "Instantly create a temporary Prisma Postgres database with one command, then claim and persist it in your Prisma Data Platform project when ready.",
5
5
  "main": "index.js",
6
6
  "author": "",
@@ -25,7 +25,7 @@
25
25
  "create-pg": "./index.js"
26
26
  },
27
27
  "dependencies": {
28
- "create-db": "0.0.11-pr27-feat-posthog-16471912926.0"
28
+ "create-db": "0.0.11-pr30-readme-16472332987.0"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"