@dboio/cli 0.4.1 → 0.5.1

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)
@@ -41,6 +46,9 @@ The dbo CLI can be used as a `/dbo` slash command inside Claude Code sessions.
41
46
  # Install the /dbo command into your project's .claude/commands/
42
47
  dbo install claudecommands
43
48
 
49
+ # Install globally to ~/.claude/commands/ (shared across projects)
50
+ dbo install claudecommands --global
51
+
44
52
  # Or install Claude Code CLI + commands together
45
53
  dbo install claudecode
46
54
  ```
@@ -52,48 +60,41 @@ Once installed, use `/dbo` in Claude Code:
52
60
  /dbo push assets/css/
53
61
  ```
54
62
 
55
- The command source lives in `tools/dbo-cli/src/plugins/claudecommands/`. Installed copies in `.claude/commands/` are gitignored and managed by `dbo install` / `dbo update`.
63
+ The command source lives in `tools/dbo-cli/src/plugins/claudecommands/`. Installed copies in `.claude/commands/` are gitignored and managed by `dbo install`. Each plugin's installation scope (project or global) is stored per-plugin in `.dbo/config.local.json`.
56
64
 
57
65
  ---
58
66
 
59
- ## Updating
67
+ ## Upgrading
68
+
69
+ The `dbo install` command handles both fresh installs and upgrades. If a component is already installed, it will prompt you to upgrade to the latest version.
60
70
 
61
71
  ```bash
62
- # Update everything (CLI + Claude commands)
63
- dbo update
72
+ # Upgrade CLI to latest version
73
+ dbo install dbo@latest
64
74
 
65
- # Update only the CLI
66
- dbo update cli
75
+ # Install/upgrade to a specific version
76
+ dbo install dbo@0.4.1
67
77
 
68
- # Update only Claude Code commands
69
- dbo update claudecommands
78
+ # Upgrade from local source
79
+ dbo install /path/to/local/cli/src
70
80
 
71
- # Update a specific Claude command
72
- dbo update --claudecommand dbo
81
+ # Upgrade Claude Code commands (prompts if already installed)
82
+ dbo install plugins
83
+
84
+ # Upgrade a specific Claude command
85
+ dbo install --claudecommand dbo
73
86
 
74
87
  # Check your version
75
88
  dbo --version
76
89
  ```
77
90
 
78
- For manual updates:
79
-
80
- ```bash
81
- # From git repo
82
- cd tools/dbo-cli && git pull && npm install
83
-
84
- # From npm
85
- npm update -g @dboio/cli
86
- ```
87
-
88
- If you used `npm link`, the link updates automatically — no need to re-link.
89
-
90
91
  ---
91
92
 
92
93
  ## Quick Start
93
94
 
94
95
  ```bash
95
96
  # 1. Initialize configuration for the current directory
96
- dbo init --domain beta-dev_model.dbo.io
97
+ dbo init --domain my-domain.com
97
98
 
98
99
  # 2. Authenticate
99
100
  dbo login
@@ -115,8 +116,8 @@ dbo content deploy albain3dwkofbhnd1qtd1q assets/css/colors.css
115
116
  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
117
 
117
118
  ```bash
118
- ~/projects/operator-beta/ → .dbo/ → beta-dev_model.dbo.io
119
- ~/projects/operator-prod/ → .dbo/ → prod.dbo.io
119
+ ~/projects/my-project/ → .dbo/ → my-domain.com
120
+ ~/projects/my-project-prod/ → .dbo/ → prod.dbo.io
120
121
  ```
121
122
 
122
123
  ### `.dbo/` directory contents
@@ -124,17 +125,18 @@ All configuration is **directory-scoped**. Each project folder maintains its own
124
125
  | File | Purpose | Git |
125
126
  |------|---------|-----|
126
127
  | `config.json` | Domain, app metadata, placement preferences | Committable (shared) |
128
+ | `config.local.json` | Per-user settings: plugin scopes, future user prefs | Gitignored (per-user) |
127
129
  | `credentials.json` | Username, user ID, UID, name, email (no password) | Gitignored (per-user) |
128
130
  | `cookies.txt` | Session cookie (Netscape format) | Gitignored (per-user) |
129
131
  | `structure.json` | Bin directory mapping (created by `dbo clone`) | Committable (shared) |
130
132
 
131
- `dbo init` automatically adds `.dbo/credentials.json` and `.dbo/cookies.txt` to `.gitignore` (creates the file if it doesn't exist).
133
+ `dbo init` automatically adds `.dbo/credentials.json`, `.dbo/cookies.txt`, and `.dbo/config.local.json` to `.gitignore` (creates the file if it doesn't exist).
132
134
 
133
135
  #### config.json reference
134
136
 
135
137
  ```json
136
138
  {
137
- "domain": "beta-dev_model.dbo.io",
139
+ "domain": "my-domain.com",
138
140
  "AppID": 10198,
139
141
  "AppUID": "abc123",
140
142
  "AppName": "My App",
@@ -153,6 +155,7 @@ All configuration is **directory-scoped**. Each project folder maintains its own
153
155
  | `AppShortName` | string | App short name (used for `dbo clone --app`) |
154
156
  | `ContentPlacement` | `bin` \| `path` \| `ask` | Where to place content files during clone |
155
157
  | `MediaPlacement` | `bin` \| `fullpath` \| `ask` | Where to place media files during clone |
158
+ | `<Entity>FilenameCol` | column name | Filename column for entity-dir records (e.g., `ExtensionFilenameCol`) |
156
159
 
157
160
  **Placement values:**
158
161
  - `bin` — Place files in the BinID-mapped directory (from `structure.json`)
@@ -182,11 +185,12 @@ Environment variables override file-based configuration:
182
185
  Initialize DBO CLI configuration for the current directory.
183
186
 
184
187
  ```bash
185
- 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
188
- dbo init --force # overwrite existing config
189
- dbo init --domain dev.dbo.io --app myapp --clone # init + clone an app
188
+ dbo init # interactive prompts
189
+ dbo init --domain my-domain.com # non-interactive
190
+ dbo init --domain my-domain.com --username me@co.io # with credentials
191
+ dbo init --force # overwrite existing config
192
+ dbo init --domain my-domain.com --app myapp --clone # init + clone an app
193
+ dbo init --domain my-domain.com -y # skip all prompts
190
194
  ```
191
195
 
192
196
  | Flag | Description |
@@ -196,6 +200,10 @@ dbo init --domain dev.dbo.io --app myapp --clone # init + clone an app
196
200
  | `--force` | Overwrite existing configuration |
197
201
  | `--app <shortName>` | App short name (triggers clone after init) |
198
202
  | `--clone` | Clone the app after initialization |
203
+ | `-g, --global` | Install Claude commands globally (`~/.claude/commands/`) |
204
+ | `--local` | Install Claude commands to project (`.claude/commands/`) |
205
+ | `-y, --yes` | Skip all interactive prompts (legacy migration, Claude Code setup) |
206
+ | `--non-interactive` | Alias for `--yes` |
199
207
 
200
208
  ---
201
209
 
@@ -214,7 +222,7 @@ dbo clone /path/to/app_export.json
214
222
  dbo clone --app myapp
215
223
 
216
224
  # Combined with init
217
- dbo init --domain beta-dev.dbo.io --app myapp --clone
225
+ dbo init --domain my-domain.com --app myapp --clone
218
226
  ```
219
227
 
220
228
  | Flag | Description |
@@ -234,8 +242,13 @@ dbo init --domain beta-dev.dbo.io --app myapp --clone
234
242
  5. **Saves `.dbo/structure.json`** — maps BinIDs to directory paths for file placement
235
243
  6. **Writes content files** — decodes base64 content, creates `*.metadata.json` + content files in the correct bin directory
236
244
  7. **Downloads media files** — fetches binary files (images, CSS, fonts) from the server via `/api/media/{uid}` and saves with metadata
237
- 8. **Processes other entities** — entities with a `BinID` are placed in the corresponding directory
238
- 9. **Saves `app.json`**clone of the original JSON with processed entries replaced by `@path/to/*.metadata.json` references
245
+ 8. **Processes entity-dir records** — entities matching project directories (`extension`, `app_version`, `data_source`, `site`, `group`, `integration`, `automation`) are saved as `.metadata.json` files in their corresponding directory (e.g., `Extensions/`, `Data Sources/`)
246
+ 9. **Processes other entities** remaining entities with a `BinID` are placed in the corresponding bin directory
247
+ 10. **Saves `app.json`** — clone of the original JSON with processed entries replaced by `@path/to/*.metadata.json` references
248
+
249
+ #### Change detection on re-clone
250
+
251
+ When cloning an app that was already cloned locally, the CLI detects existing files and compares modification times against the server's `_LastUpdated`. You'll be prompted to overwrite, compare differences, or skip — same as `dbo pull`. Use `-y` to auto-accept all changes.
239
252
 
240
253
  #### Path resolution
241
254
 
@@ -246,6 +259,26 @@ Where do you want me to place filename.ext?
246
259
  2. Into the BinID of 12345 (mapped BinName → bin/directory)
247
260
  ```
248
261
 
262
+ #### Entity directory processing
263
+
264
+ Entity types that correspond to project directories (`extension`, `app_version`, `data_source`, `site`, `group`, `integration`, `automation`) are processed into their named directories without requiring a `BinID`:
265
+
266
+ | Entity Key | Directory |
267
+ |------------|-----------|
268
+ | `extension` | `Extensions/` |
269
+ | `app_version` | `App Versions/` |
270
+ | `data_source` | `Data Sources/` |
271
+ | `site` | `Sites/` |
272
+ | `group` | `Groups/` |
273
+ | `integration` | `Integrations/` |
274
+ | `automation` | `Automations/` |
275
+
276
+ For each entity type, the CLI prompts to choose which column becomes the filename (defaults to `Name`, fallback `UID`). The choice is saved per entity type in `config.json` (e.g., `ExtensionFilenameCol`).
277
+
278
+ If any columns contain base64-encoded content, the CLI prompts to extract them as companion files. Extracted columns produce files named `<name>.<Column>.<ext>` alongside the metadata, with `@reference` entries in the metadata and a `_contentColumns` array.
279
+
280
+ Use `-y` to skip prompts (uses `Name` column, no content extraction).
281
+
249
282
  #### Output structure
250
283
 
251
284
  ```
@@ -256,7 +289,7 @@ project/
256
289
  .gitignore # credentials.json + cookies.txt added
257
290
  package.json # Updated with app info + deploy script
258
291
  app.json # Clone of original with @references
259
- bins/ # ← root for all bin-placed files
292
+ Bins/ # ← root for all bin-placed files
260
293
  app/ # ← directory from children.bin
261
294
  thomas-scratch.md
262
295
  thomas-scratch.metadata.json
@@ -264,6 +297,13 @@ project/
264
297
  CurrentTicketID.metadata.json
265
298
  ticket_test/ # ← another bin directory
266
299
  ...
300
+ Extensions/ # ← entity-dir records
301
+ MyExtension.metadata.json
302
+ MyExtension.CustomCSS.css # ← extracted content column
303
+ Data Sources/
304
+ MySQL-Primary.metadata.json
305
+ Sites/
306
+ MainSite.metadata.json
267
307
  media/operator/app/... # ← FullPath placement (when MediaPlacement=fullpath)
268
308
  ```
269
309
 
@@ -317,17 +357,22 @@ dbo status
317
357
  Output:
318
358
  ```
319
359
  Initialized: Yes (.dbo/)
320
- Domain: beta-dev_model.dbo.io
360
+ Domain: my-domain.com
321
361
  Username: user@example.com
322
362
  User ID: 10296
323
363
  User UID: albain3dwkofbhnd1qtd1q
324
364
  Directory: /Users/me/projects/operator
325
365
  Session: Active (expires: 2026-03-15T10:30:00.000Z)
326
366
  Cookies: /Users/me/projects/operator/.dbo/cookies.txt
367
+
368
+ Claude Code Plugins:
369
+ dbo: ✓ global (~/.claude/commands/dbo.md)
327
370
  ```
328
371
 
329
372
  User ID and UID are populated by `dbo login`. If they show "(not set)", run `dbo login` to fetch them.
330
373
 
374
+ Plugin scopes (project or global) are displayed when plugins have been installed. Scopes are stored in `.dbo/config.local.json`.
375
+
331
376
  ---
332
377
 
333
378
  ### `dbo input`
@@ -375,7 +420,7 @@ dbo input -d 'RowUID:abc;column:content.Content@file.css' -v
375
420
  #### Input expression syntax
376
421
 
377
422
  ```
378
- RowID:identifier;column:entity.ColumnName=value # direct value
423
+ RowID:identifier;column:entity.ColumnName=value # direct value
379
424
  RowUID:identifier;column:entity.ColumnName@filepath # value from file
380
425
  RowID:delIdentifier;entity:entityName=true # delete
381
426
  ```
@@ -534,6 +579,17 @@ js/
534
579
  app.metadata.json
535
580
  ```
536
581
 
582
+ #### Smart change detection
583
+
584
+ When pulling records that already exist locally, the CLI compares your local file modification times against the server's `_LastUpdated` timestamp. If the server has newer data, you'll be prompted:
585
+
586
+ 1. **Overwrite** — replace local with server version
587
+ 2. **Compare** — show a line-by-line diff and selectively merge
588
+ 3. **Skip** — keep local unchanged
589
+ 4. **Overwrite all** / **Skip all** — bulk action for remaining files
590
+
591
+ After writing, file modification times are synced to the server's `_LastUpdated` to establish a sync point for future comparisons. Use `dbo diff` to compare without pulling.
592
+
537
593
  ---
538
594
 
539
595
  ### `dbo media`
@@ -674,6 +730,55 @@ dbo instance export --confirm false
674
730
 
675
731
  ---
676
732
 
733
+ ### `dbo diff`
734
+
735
+ Compare local files against their server versions and selectively merge changes. This is a one-directional comparison: only server → local changes can be accepted. To push local changes back, use `dbo push`.
736
+
737
+ ```bash
738
+ # Compare all records in the current directory
739
+ dbo diff
740
+
741
+ # Compare a specific file
742
+ dbo diff assets/css/colors.css
743
+
744
+ # Compare all records in a directory
745
+ dbo diff assets/
746
+
747
+ # Display diffs without prompting
748
+ dbo diff --no-interactive
749
+
750
+ # Accept all server changes without prompting
751
+ dbo diff -y
752
+ ```
753
+
754
+ | Flag | Description |
755
+ |------|-------------|
756
+ | `[path]` | File, directory, or `.` (default: current directory) |
757
+ | `--no-interactive` | Show diffs without prompting to accept |
758
+ | `-y, --yes` | Accept all server changes automatically |
759
+ | `-v, --verbose` | Show HTTP request details |
760
+ | `--domain <host>` | Override domain |
761
+
762
+ #### Interactive mode
763
+
764
+ For each file with differences, you can:
765
+ 1. **Accept all changes** — overwrite local with server version
766
+ 2. **Cherry-pick fields** — accept/skip individual field changes
767
+ 3. **Skip** — keep local files unchanged
768
+ 4. **Accept all remaining** — auto-accept for all remaining files
769
+ 5. **Skip all remaining** — skip all remaining files
770
+
771
+ #### Diff output
772
+
773
+ Shows a unified diff format with color coding:
774
+ - Red lines (`-`) — content only in your local file
775
+ - Green lines (`+`) — content only on the server
776
+ - Cyan headers — hunk markers showing line positions
777
+
778
+ After accepting changes, file modification times are synced to the server's `_LastUpdated` timestamp to establish a new sync point.
779
+
780
+ ---
781
+
677
782
  ### `dbo push`
678
783
 
679
784
  Push local files back to DBO.io using metadata from a previous pull. This is the counterpart to `dbo content pull` and `dbo output --save`.
@@ -766,6 +871,85 @@ The `@colors.css` reference tells push to read the content from that file. All o
766
871
 
767
872
  ---
768
873
 
874
+ ### `dbo rm`
875
+
876
+ Remove a file or directory locally and stage server deletions for the next `dbo push`. Similar to `git rm`.
877
+
878
+ #### Single file
879
+
880
+ ```bash
881
+ # Remove a content file (finds companion .metadata.json automatically)
882
+ dbo rm Bins/app/some-file.txt
883
+
884
+ # Remove by metadata file directly
885
+ dbo rm Bins/app/some-file.metadata.json
886
+
887
+ # Skip confirmation prompt
888
+ dbo rm -f Bins/app/some-file.txt
889
+
890
+ # Stage server deletion without deleting local files
891
+ dbo rm --keep-local Bins/app/some-file.txt
892
+ ```
893
+
894
+ #### Directory
895
+
896
+ ```bash
897
+ # Remove a directory and all its contents (prompts for approach)
898
+ dbo rm Bins/app/ui/
899
+
900
+ # Remove directory without prompts
901
+ dbo rm -f Bins/app/ui/
902
+
903
+ # Stage deletions without removing local files/directories
904
+ dbo rm --keep-local Bins/app/ui/
905
+ ```
906
+
907
+ When removing a directory, the CLI:
908
+ 1. Looks up the BinID from `.dbo/structure.json`
909
+ 2. Recursively collects all sub-directories (processed leaves-first)
910
+ 3. Prompts: "Remove all files and directories", "Prompt for each file", or "Cancel"
911
+ 4. Stages each file's deletion, then each bin's deletion (`entity:bin`)
912
+ 5. Removes the local directory (unless `--keep-local`)
913
+
914
+ | Flag | Description |
915
+ |------|-------------|
916
+ | `<path>` | File, `.metadata.json`, or directory to remove |
917
+ | `-f, --force` | Skip all confirmation prompts |
918
+ | `--keep-local` | Only stage server deletions, keep local files/directories |
919
+
920
+ #### What rm does (single file)
921
+
922
+ 1. **Resolves metadata** — if given a content file, finds the companion `.metadata.json`
923
+ 2. **Reads row ID** — uses `_id` (shorthand) or derives from entity (e.g., `ContentID`, `MediaID`)
924
+ 3. **Prompts for confirmation** — "Do you really want to remove this file and all of its nodes?"
925
+ 4. **Stages deletion** — adds a delete entry to `.dbo/synchronize.json`
926
+ 5. **Updates app.json** — removes the `@path/to/file.metadata.json` reference from children arrays
927
+ 6. **Deletes local files** — removes the metadata file and all referenced content/media files (unless `--keep-local`)
928
+
929
+ #### synchronize.json
930
+
931
+ Pending deletions are stored in `.dbo/synchronize.json`:
932
+
933
+ ```json
934
+ {
935
+ "delete": [
936
+ {
937
+ "UID": "a2dxvg23rk6xsmnum7pdxa",
938
+ "RowID": 16012,
939
+ "entity": "content",
940
+ "name": "nima-test-test",
941
+ "expression": "RowID:del16012;entity:content=true"
942
+ }
943
+ ],
944
+ "edit": [],
945
+ "add": []
946
+ }
947
+ ```
948
+
949
+ The next `dbo push` processes all pending deletions before pushing file changes. Successful deletions are removed from synchronize.json; failures remain staged for retry.
950
+
951
+ ---
952
+
769
953
  ### `dbo add`
770
954
 
771
955
  Add a new file to DBO.io by creating a server record. Similar to `git add`, this registers a local file with the server.
@@ -890,61 +1074,58 @@ If no stored user info is available, it prompts for direct input. The CLI automa
890
1074
 
891
1075
  ### `dbo install`
892
1076
 
893
- Install dbo-cli components including Claude Code integration.
1077
+ Install or upgrade dbo-cli components including the CLI itself, plugins, and Claude Code integration.
894
1078
 
895
1079
  ```bash
896
1080
  # Interactive — choose what to install
897
1081
  dbo install
898
1082
 
899
- # Install Claude Code commands into .claude/commands/
900
- dbo install claudecommands
1083
+ # Install/upgrade CLI from npm (latest)
1084
+ dbo install dbo
1085
+ dbo install dbo@latest
901
1086
 
902
- # Install Claude Code CLI (if not present) + commands
903
- dbo install claudecode
1087
+ # Install a specific CLI version
1088
+ dbo install dbo@0.4.1
904
1089
 
905
- # Install a specific command plugin
906
- dbo install --claudecommand dbo
907
- ```
1090
+ # Install CLI from local source directory
1091
+ dbo install /path/to/local/cli/src
908
1092
 
909
- | Flag | Description |
910
- |------|-------------|
911
- | `[target]` | What to install: `claudecode`, `claudecommands` |
912
- | `--claudecommand <name>` | Install a specific command by name |
913
-
914
- When installing Claude commands:
915
- - Creates `.claude/commands/` if it doesn't exist (prompts first)
916
- - Prompts before overwriting existing commands
917
- - Adds installed files to `.gitignore` (source of truth is `src/plugins/claudecommands/`)
918
-
919
- ---
920
-
921
- ### `dbo update`
922
-
923
- Update the dbo CLI, plugins, or Claude Code commands.
1093
+ # Install/upgrade Claude Code commands
1094
+ dbo install plugins
1095
+ dbo install claudecommands
924
1096
 
925
- ```bash
926
- # Update CLI + ask about Claude commands
927
- dbo update
1097
+ # Install Claude Code commands globally (shared across projects)
1098
+ dbo install plugins --global
928
1099
 
929
- # Update only the CLI (git pull or npm update)
930
- dbo update cli
1100
+ # Explicitly install to project directory
1101
+ dbo install plugins --local
931
1102
 
932
- # Update all plugins
933
- dbo update plugins
1103
+ # Install Claude Code CLI (if not present) + commands
1104
+ dbo install claudecode
934
1105
 
935
- # Re-sync Claude commands from source
936
- dbo update claudecommands
1106
+ # Install/upgrade a specific command plugin
1107
+ dbo install --claudecommand dbo
937
1108
 
938
- # Update a specific Claude command
939
- dbo update --claudecommand dbo
1109
+ # Install a specific command globally
1110
+ dbo install --claudecommand dbo --global
940
1111
  ```
941
1112
 
942
1113
  | Flag | Description |
943
1114
  |------|-------------|
944
- | `[target]` | What to update: `cli`, `plugins`, `claudecommands` |
945
- | `--claudecommand <name>` | Update a specific command by name |
946
-
947
- The update compares file hashes unchanged files are skipped with "already up to date".
1115
+ | `[target]` | What to install: `dbo[@version]`, `plugins`, `claudecommands`, `claudecode`, or a local path |
1116
+ | `--claudecommand <name>` | Install/upgrade a specific command by name |
1117
+ | `-g, --global` | Install commands to user home directory (`~/.claude/commands/`) |
1118
+ | `--local` | Install commands to project directory (`.claude/commands/`) |
1119
+
1120
+ Smart behavior:
1121
+ - If the CLI is already installed, prompts to upgrade (with version comparison)
1122
+ - If plugins are already installed and up to date, reports "already up to date"
1123
+ - If plugins differ from source, prompts to upgrade to the latest version
1124
+ - Compares file hashes — unchanged files are skipped
1125
+ - Adds project-scoped command files to `.gitignore` (source of truth is `src/plugins/claudecommands/`)
1126
+ - Per-plugin scope (project or global) is stored in `.dbo/config.local.json` and remembered for future upgrades
1127
+ - On first install of a plugin without a stored preference, prompts for scope
1128
+ - `--global` / `--local` flags override stored preferences and update them
948
1129
 
949
1130
  ---
950
1131
 
@@ -1085,7 +1266,7 @@ The `dbo` CLI is a drop-in replacement for the curl-based workflow. Here's how c
1085
1266
 
1086
1267
  **Before:**
1087
1268
  ```bash
1088
- echo "beta-dev_model.dbo.io" > .domain
1269
+ echo "my-domain.com" > .domain
1089
1270
  echo "user@example.com" > .username
1090
1271
  echo "mypassword" > .password
1091
1272
  curl --cookie-jar .cookies -K authenticate.curl
@@ -1093,7 +1274,7 @@ curl --cookie-jar .cookies -K authenticate.curl
1093
1274
 
1094
1275
  **After:**
1095
1276
  ```bash
1096
- dbo init --domain beta-dev_model.dbo.io --username user@example.com
1277
+ dbo init --domain my-domain.com --username user@example.com
1097
1278
  dbo login
1098
1279
  ```
1099
1280
 
@@ -1137,7 +1318,7 @@ dbo upload image.jpg --bin 12345 --app 67890 --ownership app --path assets/image
1137
1318
 
1138
1319
  **Before:**
1139
1320
  ```bash
1140
- curl -b .cookies "https://beta-dev_model.dbo.io/api/output/entity/user?_format=json&_filter@FirstName=John"
1321
+ curl -b .cookies "https://my-domain.com/api/output/entity/user?_format=json&_filter@FirstName=John"
1141
1322
  ```
1142
1323
 
1143
1324
  **After:**
@@ -1151,7 +1332,7 @@ The `dbo` CLI writes cookies in Netscape format (same as curl's `--cookie-jar`).
1151
1332
 
1152
1333
  ```bash
1153
1334
  dbo login
1154
- curl -b .dbo/cookies.txt https://beta-dev_model.dbo.io/api/content/myUID
1335
+ curl -b .dbo/cookies.txt https://my-domain.com/api/content/myUID
1155
1336
  ```
1156
1337
 
1157
1338
  ---
package/bin/dbo.js CHANGED
@@ -18,15 +18,17 @@ import { pushCommand } from '../src/commands/push.js';
18
18
  import { pullCommand } from '../src/commands/pull.js';
19
19
  import { addCommand } from '../src/commands/add.js';
20
20
  import { installCommand } from '../src/commands/install.js';
21
- import { updateCommand } from '../src/commands/update.js';
22
21
  import { cloneCommand } from '../src/commands/clone.js';
22
+ import { diffCommand } from '../src/commands/diff.js';
23
+ import { rmCommand } from '../src/commands/rm.js';
24
+ import { mvCommand } from '../src/commands/mv.js';
23
25
 
24
26
  const program = new Command();
25
27
 
26
28
  program
27
29
  .name('dbo')
28
30
  .description('CLI for the DBO.io framework')
29
- .version('0.4.1');
31
+ .version('0.5.0');
30
32
 
31
33
  program.addCommand(initCommand);
32
34
  program.addCommand(loginCommand);
@@ -45,7 +47,9 @@ program.addCommand(pushCommand);
45
47
  program.addCommand(pullCommand);
46
48
  program.addCommand(addCommand);
47
49
  program.addCommand(installCommand);
48
- program.addCommand(updateCommand);
49
50
  program.addCommand(cloneCommand);
51
+ program.addCommand(diffCommand);
52
+ program.addCommand(rmCommand);
53
+ program.addCommand(mvCommand);
50
54
 
51
55
  program.parse();
package/package.json CHANGED
@@ -1,22 +1,45 @@
1
1
  {
2
2
  "name": "@dboio/cli",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
4
4
  "description": "CLI for the DBO.io framework",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "dbo": "./bin/dbo.js"
8
8
  },
9
+ "files": [
10
+ "plugins/",
11
+ "bin/",
12
+ "src/",
13
+ "README.md"
14
+ ],
9
15
  "engines": {
10
16
  "node": ">=18.0.0"
11
17
  },
12
18
  "scripts": {
13
- "test": "node --test src/**/*.test.js"
19
+ "test": "node --test src/**/*.test.js tests/**/*.test.js"
14
20
  },
15
21
  "dependencies": {
16
22
  "commander": "^12.1.0",
17
23
  "chalk": "^5.3.0",
18
24
  "inquirer": "^9.3.0"
19
25
  },
20
- "keywords": ["dbo", "dboio", "database", "cli", "api"],
21
- "license": "UNLICENSED"
26
+ "keywords": [
27
+ "dbo",
28
+ "dboio",
29
+ "database",
30
+ "cli",
31
+ "api",
32
+ "rest",
33
+ "crud"
34
+ ],
35
+ "license": "MIT",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://github.com/dboio/api.git",
39
+ "directory": "tools/dbo-cli"
40
+ },
41
+ "homepage": "https://github.com/dboio/api/tree/master/tools/dbo-cli#readme",
42
+ "bugs": {
43
+ "url": "https://github.com/dboio/api/issues"
44
+ }
22
45
  }