@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 CHANGED
@@ -1,23 +1,28 @@
1
1
  # dbo — Command Line Interface for DBO.io
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@dboio/cli.svg)](https://www.npmjs.com/package/@dboio/cli)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@dboio/cli.svg)](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 the repository (local development)
12
+ ### From npm (recommended)
8
13
 
9
14
  ```bash
10
- cd tools/dbo-cli
11
- npm install
12
- npm link
15
+ npm install -g @dboio/cli
13
16
  ```
14
17
 
15
- This makes the `dbo` command available globally on your system.
18
+ This installs the `dbo` command globally on your system.
16
19
 
17
- ### From npm (when published)
20
+ ### From the repository (local development)
18
21
 
19
22
  ```bash
20
- npm install -g @dboio/cli
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 beta-dev_model.dbo.io
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/operator-beta/ → .dbo/ → beta-dev_model.dbo.io
119
- ~/projects/operator-prod/ → .dbo/ → prod.dbo.io
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": "beta-dev_model.dbo.io",
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 beta-dev_model.dbo.io # non-interactive
187
- dbo init --domain dev.dbo.io --username me@co.io # with credentials
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 dev.dbo.io --app myapp --clone # init + clone an app
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 beta-dev.dbo.io --app myapp --clone
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: beta-dev_model.dbo.io
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 "beta-dev_model.dbo.io" > .domain
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 beta-dev_model.dbo.io --username user@example.com
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://beta-dev_model.dbo.io/api/output/entity/user?_format=json&_filter@FirstName=John"
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://beta-dev_model.dbo.io/api/content/myUID
1159
+ curl -b .dbo/cookies.txt https://my-domain.com/api/content/myUID
1155
1160
  ```
1156
1161
 
1157
1162
  ---
package/bin/dbo.js CHANGED
@@ -26,7 +26,7 @@ const program = new Command();
26
26
  program
27
27
  .name('dbo')
28
28
  .description('CLI for the DBO.io framework')
29
- .version('0.4.1');
29
+ .version('0.4.2');
30
30
 
31
31
  program.addCommand(initCommand);
32
32
  program.addCommand(loginCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dboio/cli",
3
- "version": "0.4.1",
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": ["dbo", "dboio", "database", "cli", "api"],
21
- "license": "UNLICENSED"
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
  }
@@ -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., beta-dev_model.dbo.io)')
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 beta-dev.dbo.io --app myapp --clone
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`