@dboio/cli 0.4.1 → 0.4.2
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 +25 -20
- package/bin/dbo.js +1 -1
- package/package.json +20 -3
- package/src/commands/init.js +1 -1
- package/src/plugins/claudecommands/dbo.md +1 -1
package/README.md
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
# dbo — Command Line Interface for DBO.io
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@dboio/cli)
|
|
4
|
+
[](https://www.npmjs.com/package/@dboio/cli)
|
|
5
|
+
|
|
3
6
|
A terminal-based CLI for interacting with the [DBO.io](https://dbo.io) framework. Replaces raw curl commands with a clean, subcommand-driven interface for CRUD operations, querying, content deployment, media management, and more.
|
|
4
7
|
|
|
8
|
+
**Available on npm:** [@dboio/cli](https://www.npmjs.com/package/@dboio/cli)
|
|
9
|
+
|
|
5
10
|
## Installation
|
|
6
11
|
|
|
7
|
-
### From
|
|
12
|
+
### From npm (recommended)
|
|
8
13
|
|
|
9
14
|
```bash
|
|
10
|
-
|
|
11
|
-
npm install
|
|
12
|
-
npm link
|
|
15
|
+
npm install -g @dboio/cli
|
|
13
16
|
```
|
|
14
17
|
|
|
15
|
-
This
|
|
18
|
+
This installs the `dbo` command globally on your system.
|
|
16
19
|
|
|
17
|
-
### From
|
|
20
|
+
### From the repository (local development)
|
|
18
21
|
|
|
19
22
|
```bash
|
|
20
|
-
|
|
23
|
+
cd tools/dbo-cli
|
|
24
|
+
npm install
|
|
25
|
+
npm link
|
|
21
26
|
```
|
|
22
27
|
|
|
23
28
|
### Without installing (npx)
|
|
@@ -93,7 +98,7 @@ If you used `npm link`, the link updates automatically — no need to re-link.
|
|
|
93
98
|
|
|
94
99
|
```bash
|
|
95
100
|
# 1. Initialize configuration for the current directory
|
|
96
|
-
dbo init --domain
|
|
101
|
+
dbo init --domain my-domain.com
|
|
97
102
|
|
|
98
103
|
# 2. Authenticate
|
|
99
104
|
dbo login
|
|
@@ -115,8 +120,8 @@ dbo content deploy albain3dwkofbhnd1qtd1q assets/css/colors.css
|
|
|
115
120
|
All configuration is **directory-scoped**. Each project folder maintains its own `.dbo/` directory with its own domain and session. Switch environments by switching directories:
|
|
116
121
|
|
|
117
122
|
```bash
|
|
118
|
-
~/projects/
|
|
119
|
-
~/projects/
|
|
123
|
+
~/projects/my-project/ → .dbo/ → my-domain.com
|
|
124
|
+
~/projects/my-project-prod/ → .dbo/ → prod.dbo.io
|
|
120
125
|
```
|
|
121
126
|
|
|
122
127
|
### `.dbo/` directory contents
|
|
@@ -134,7 +139,7 @@ All configuration is **directory-scoped**. Each project folder maintains its own
|
|
|
134
139
|
|
|
135
140
|
```json
|
|
136
141
|
{
|
|
137
|
-
"domain": "
|
|
142
|
+
"domain": "my-domain.com",
|
|
138
143
|
"AppID": 10198,
|
|
139
144
|
"AppUID": "abc123",
|
|
140
145
|
"AppName": "My App",
|
|
@@ -183,10 +188,10 @@ Initialize DBO CLI configuration for the current directory.
|
|
|
183
188
|
|
|
184
189
|
```bash
|
|
185
190
|
dbo init # interactive prompts
|
|
186
|
-
dbo init --domain
|
|
187
|
-
dbo init --domain
|
|
191
|
+
dbo init --domain my-domain.com # non-interactive
|
|
192
|
+
dbo init --domain my-domain.com --username me@co.io # with credentials
|
|
188
193
|
dbo init --force # overwrite existing config
|
|
189
|
-
dbo init --domain
|
|
194
|
+
dbo init --domain my-domain.com --app myapp --clone # init + clone an app
|
|
190
195
|
```
|
|
191
196
|
|
|
192
197
|
| Flag | Description |
|
|
@@ -214,7 +219,7 @@ dbo clone /path/to/app_export.json
|
|
|
214
219
|
dbo clone --app myapp
|
|
215
220
|
|
|
216
221
|
# Combined with init
|
|
217
|
-
dbo init --domain
|
|
222
|
+
dbo init --domain my-domain.com --app myapp --clone
|
|
218
223
|
```
|
|
219
224
|
|
|
220
225
|
| Flag | Description |
|
|
@@ -317,7 +322,7 @@ dbo status
|
|
|
317
322
|
Output:
|
|
318
323
|
```
|
|
319
324
|
Initialized: Yes (.dbo/)
|
|
320
|
-
Domain:
|
|
325
|
+
Domain: my-domain.com
|
|
321
326
|
Username: user@example.com
|
|
322
327
|
User ID: 10296
|
|
323
328
|
User UID: albain3dwkofbhnd1qtd1q
|
|
@@ -1085,7 +1090,7 @@ The `dbo` CLI is a drop-in replacement for the curl-based workflow. Here's how c
|
|
|
1085
1090
|
|
|
1086
1091
|
**Before:**
|
|
1087
1092
|
```bash
|
|
1088
|
-
echo "
|
|
1093
|
+
echo "my-domain.com" > .domain
|
|
1089
1094
|
echo "user@example.com" > .username
|
|
1090
1095
|
echo "mypassword" > .password
|
|
1091
1096
|
curl --cookie-jar .cookies -K authenticate.curl
|
|
@@ -1093,7 +1098,7 @@ curl --cookie-jar .cookies -K authenticate.curl
|
|
|
1093
1098
|
|
|
1094
1099
|
**After:**
|
|
1095
1100
|
```bash
|
|
1096
|
-
dbo init --domain
|
|
1101
|
+
dbo init --domain my-domain.com --username user@example.com
|
|
1097
1102
|
dbo login
|
|
1098
1103
|
```
|
|
1099
1104
|
|
|
@@ -1137,7 +1142,7 @@ dbo upload image.jpg --bin 12345 --app 67890 --ownership app --path assets/image
|
|
|
1137
1142
|
|
|
1138
1143
|
**Before:**
|
|
1139
1144
|
```bash
|
|
1140
|
-
curl -b .cookies "https://
|
|
1145
|
+
curl -b .cookies "https://my-domain.com/api/output/entity/user?_format=json&_filter@FirstName=John"
|
|
1141
1146
|
```
|
|
1142
1147
|
|
|
1143
1148
|
**After:**
|
|
@@ -1151,7 +1156,7 @@ The `dbo` CLI writes cookies in Netscape format (same as curl's `--cookie-jar`).
|
|
|
1151
1156
|
|
|
1152
1157
|
```bash
|
|
1153
1158
|
dbo login
|
|
1154
|
-
curl -b .dbo/cookies.txt https://
|
|
1159
|
+
curl -b .dbo/cookies.txt https://my-domain.com/api/content/myUID
|
|
1155
1160
|
```
|
|
1156
1161
|
|
|
1157
1162
|
---
|
package/bin/dbo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dboio/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "CLI for the DBO.io framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,6 +17,23 @@
|
|
|
17
17
|
"chalk": "^5.3.0",
|
|
18
18
|
"inquirer": "^9.3.0"
|
|
19
19
|
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
|
|
20
|
+
"keywords": [
|
|
21
|
+
"dbo",
|
|
22
|
+
"dboio",
|
|
23
|
+
"database",
|
|
24
|
+
"cli",
|
|
25
|
+
"api",
|
|
26
|
+
"rest",
|
|
27
|
+
"crud"
|
|
28
|
+
],
|
|
29
|
+
"license": "UNLICENSED",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/dboio/api.git",
|
|
33
|
+
"directory": "tools/dbo-cli"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/dboio/api/tree/master/tools/dbo-cli#readme",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/dboio/api/issues"
|
|
38
|
+
}
|
|
22
39
|
}
|
package/src/commands/init.js
CHANGED
|
@@ -7,7 +7,7 @@ import { log } from '../lib/logger.js';
|
|
|
7
7
|
|
|
8
8
|
export const initCommand = new Command('init')
|
|
9
9
|
.description('Initialize DBO CLI configuration for the current directory')
|
|
10
|
-
.option('--domain <host>', 'DBO instance domain (e.g.,
|
|
10
|
+
.option('--domain <host>', 'DBO instance domain (e.g., my-domain.com)')
|
|
11
11
|
.option('--username <user>', 'DBO username')
|
|
12
12
|
.option('--force', 'Overwrite existing configuration')
|
|
13
13
|
.option('--app <shortName>', 'App short name (for clone)')
|
|
@@ -198,7 +198,7 @@ dbo clone --app myapp
|
|
|
198
198
|
dbo clone
|
|
199
199
|
|
|
200
200
|
# Init + clone in one step
|
|
201
|
-
dbo init --domain
|
|
201
|
+
dbo init --domain my-domain.com --app myapp --clone
|
|
202
202
|
```
|
|
203
203
|
|
|
204
204
|
Flags: `--app <name>`, `--domain <host>`, `-y/--yes`, `-v/--verbose`
|