Skip to content

Commit 2d5030e

Browse files
committed
🎉 Initial Commit:
0 parents  commit 2d5030e

26 files changed

+2625
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Dependency directories
2+
node_modules/
3+
4+
# Output directories
5+
dist/

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cSpell.words": ["libsql", "neondatabase"]
3+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Dev Gaurav Jatt
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# 📚 Drizzle Setup CLI
2+
3+
A powerful CLI tool to automatically scaffold and configure database setup using **Drizzle ORM** for PostgreSQL,SQLite,MySQL and More.
4+
5+
---
6+
7+
## ✨ Features
8+
9+
- 📦 **Zero Config Setup** – Instantly scaffold DB structure and config with minimal input.
10+
- 📜 **Drizzle Scripts** – Automatically updates `package.json` with Drizzle CLI scripts.
11+
- 🔧 **.env Auto Update** – Automatically injects required environment variables.
12+
- 🧩 **Multiple DB Support** – Works seamlessly with PostgreSQL,SQLite,MySQL and More setups.
13+
- 📁 **Template Copying** – Instantly sets up a working `target-folder` structure.
14+
15+
---
16+
17+
## 📦 Installation
18+
19+
Install globally via your preferred package manager:
20+
21+
```bash
22+
npm install -g drizzle-setup
23+
# or
24+
pnpm add -g drizzle-setup
25+
# or
26+
bun add -g drizzle-setup
27+
```
28+
29+
---
30+
31+
## 🚀 Quick Start
32+
33+
Just run the CLI in your project directory:
34+
35+
```bash
36+
drizzle-setup
37+
```
38+
39+
You'll be guided through:
40+
41+
1. **Choosing your database** (PostgreSQL or SQLite moreover)
42+
2. **Selecting a config preset**
43+
3. **Specifying a target folder**
44+
4. **Copying boilerplate files**
45+
5. **Setting up `drizzle.config.ts`**
46+
6. **Updating `.env` and `package.json`**
47+
7. **Installing dependencies** via your chosen package manager
48+
49+
---
50+
51+
## 🧪 Supported Databases
52+
53+
- PostgreSQL - Default, Neon
54+
- SQLite - Default, Bun SQLite
55+
56+
Each database type comes with its own pre-configured templates and `.env` variables.
57+
58+
---
59+
60+
## 🧱 Directory Structure
61+
62+
After setup, your project might look like this:
63+
64+
```
65+
project-root/
66+
├── drizzle.config.ts
67+
├── .env
68+
├── [target-folder]/
69+
│ ├── schema.ts
70+
│ └── index.ts
71+
```
72+
73+
---
74+
75+
## 📄 License
76+
77+
MIT License
78+
79+
---

bun.lock

Lines changed: 382 additions & 0 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "drizzle-setup",
3+
"version": "0.0.1",
4+
"private": true,
5+
"description": "A simple example library built by tsdown",
6+
"type": "module",
7+
"files": [
8+
"dist"
9+
],
10+
"main": "./dist/index.js",
11+
"module": "./dist/index.js",
12+
"bin": "./dist/index.js",
13+
"scripts": {
14+
"start": "node ./dist/index.js",
15+
"build": "tsdown",
16+
"dev": "bun src/index.ts",
17+
"copy-templates": "xcopy \"templates\" \"dist\\templates\" /E /I /Y",
18+
"link": "bun run build && bun copy-templates && bun link"
19+
},
20+
"devDependencies": {
21+
"@types/fs-extra": "^11.0.4",
22+
"@types/node": "^22.15.30",
23+
"drizzle-kit": "^0.31.1",
24+
"drizzle-orm": "^0.44.2",
25+
"tsdown": "latest",
26+
"typescript": "^5.8.3"
27+
},
28+
"dependencies": {
29+
"@clack/prompts": "^0.11.0",
30+
"execa": "^9.6.0",
31+
"fs-extra": "^11.3.0",
32+
"path": "^0.12.7",
33+
"url": "^0.11.4"
34+
}
35+
}

0 commit comments

Comments
 (0)