@luckymingxuan/dbcli 0.1.3 → 0.1.4
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.
- package/README.md +83 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,2 +1,84 @@
|
|
|
1
1
|
# dbcli
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
A database CLI built for AI agents — not just humans.
|
|
4
|
+
|
|
5
|
+
You just provide your database connection, and the AI decides how to store, structure, and query data autonomously.
|
|
6
|
+
|
|
7
|
+
## Why dbcli?
|
|
8
|
+
|
|
9
|
+
Tools like `psql` are built for humans managing databases.\
|
|
10
|
+
dbcli is built for AI that needs to **own its data layer**.
|
|
11
|
+
|
|
12
|
+
- AI decides how to structure data
|
|
13
|
+
- AI decides what to store
|
|
14
|
+
- AI decides how to query
|
|
15
|
+
|
|
16
|
+
No abstractions. Just direct database control.\
|
|
17
|
+
dbcli gives AI **full ownership of its data layer**, not just read/write access.
|
|
18
|
+
|
|
19
|
+
## Database Support
|
|
20
|
+
|
|
21
|
+
Currently supports **PostgreSQL only**.
|
|
22
|
+
|
|
23
|
+
This is a deliberate choice: focus on one solid foundation for AI-driven data systems.
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
### Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install -g @luckymingxuan/dbcli
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### Commands
|
|
36
|
+
|
|
37
|
+
Humans don't need to see what is shown to AI.
|
|
38
|
+
|
|
39
|
+
<img width="611" height="327" alt="Image" src="https://github.com/user-attachments/assets/0f9c3740-07c9-4165-ba11-3ebf547544f1" />
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
dbcli connect my-db
|
|
44
|
+
dbcli tables
|
|
45
|
+
dbcli describe users
|
|
46
|
+
dbcli query "SELECT * FROM users...."
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Example AI-driven Workflow
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
dbcli query "CREATE TABLE notes (id SERIAL PRIMARY KEY, content TEXT)"
|
|
53
|
+
dbcli query "INSERT INTO notes (content) VALUES ('hello world')"
|
|
54
|
+
dbcli query "SELECT * FROM notes"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Configuration
|
|
60
|
+
|
|
61
|
+
The connections are stored in:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
~/.dbcli/connections.json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Example configuration:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
{
|
|
71
|
+
"connections": {
|
|
72
|
+
"my-db": {
|
|
73
|
+
"url": "postgresql://user:pass@host:5432/db",
|
|
74
|
+
"username": "user",
|
|
75
|
+
"password": "pass",
|
|
76
|
+
"enabled": true
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
MIT
|