@dboio/cli 0.16.2 → 0.19.0

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.
Files changed (45) hide show
  1. package/README.md +175 -138
  2. package/bin/dbo.js +2 -2
  3. package/package.json +1 -1
  4. package/plugins/claude/dbo/docs/dbo-cli-readme.md +175 -138
  5. package/src/commands/adopt.js +534 -0
  6. package/src/commands/build.js +3 -3
  7. package/src/commands/clone.js +209 -75
  8. package/src/commands/deploy.js +3 -3
  9. package/src/commands/init.js +11 -11
  10. package/src/commands/install.js +3 -3
  11. package/src/commands/login.js +2 -2
  12. package/src/commands/mv.js +15 -15
  13. package/src/commands/pull.js +1 -1
  14. package/src/commands/push.js +194 -15
  15. package/src/commands/rm.js +2 -2
  16. package/src/commands/run.js +4 -4
  17. package/src/commands/status.js +1 -1
  18. package/src/commands/sync.js +2 -2
  19. package/src/lib/config.js +186 -135
  20. package/src/lib/delta.js +119 -17
  21. package/src/lib/dependencies.js +51 -24
  22. package/src/lib/deploy-config.js +4 -4
  23. package/src/lib/domain-guard.js +8 -9
  24. package/src/lib/filenames.js +13 -2
  25. package/src/lib/ignore.js +2 -3
  26. package/src/{commands/add.js → lib/insert.js} +127 -472
  27. package/src/lib/metadata-schema.js +14 -20
  28. package/src/lib/metadata-templates.js +4 -4
  29. package/src/lib/migrations.js +1 -1
  30. package/src/lib/modify-key.js +1 -1
  31. package/src/lib/scaffold.js +5 -12
  32. package/src/lib/schema.js +67 -37
  33. package/src/lib/structure.js +6 -6
  34. package/src/lib/tagging.js +2 -2
  35. package/src/lib/ticketing.js +3 -7
  36. package/src/lib/toe-stepping.js +5 -5
  37. package/src/lib/transaction-key.js +1 -1
  38. package/src/migrations/004-rename-output-files.js +2 -2
  39. package/src/migrations/005-rename-output-metadata.js +2 -2
  40. package/src/migrations/006-remove-uid-companion-filenames.js +1 -1
  41. package/src/migrations/007-natural-entity-companion-filenames.js +1 -1
  42. package/src/migrations/008-metadata-uid-in-suffix.js +1 -1
  43. package/src/migrations/009-fix-media-collision-metadata-names.js +1 -1
  44. package/src/migrations/010-delete-paren-media-orphans.js +1 -1
  45. package/src/migrations/012-project-dir-restructure.js +211 -0
package/README.md CHANGED
@@ -62,7 +62,7 @@ Once installed, use `/dbo` in Claude Code:
62
62
  /dbo push assets/css/
63
63
  ```
64
64
 
65
- The plugin source lives in `plugins/claude/dbo/` at the repository root. Installed copies in `.claude/plugins/` are gitignored and managed by `dbo install`. Each plugin's installation scope (project or global) is stored per-plugin in `.dbo/config.local.json`.
65
+ The plugin source lives in `plugins/claude/dbo/` at the repository root. Installed copies in `.claude/plugins/` are gitignored and managed by `dbo install`. Each plugin's installation scope (project or global) is stored in `~/.dbo/settings.json`.
66
66
 
67
67
  ---
68
68
 
@@ -122,8 +122,19 @@ When you run `dbo init --scaffold` or `dbo clone`, the following standard direct
122
122
 
123
123
  ```
124
124
  my-project/
125
- ├── .dbo/ # Config, synchronization and session info for dbo cli commands
125
+ ├── .app/ # Config, synchronization and session info for dbo cli commands
126
+ │ ├── config.json # Domain, app metadata, placement preferences (committed)
127
+ │ ├── <shortName>.json # Server-state baseline for delta detection (committed)
128
+ │ ├── <shortName>.metadata.json # Clone of original app JSON with @references (committed)
129
+ │ ├── <shortName>.metadata_schema.json # Column templates per entity/descriptor (committed)
130
+ │ ├── directories.json # Bin directory mapping (committed)
131
+ │ ├── synchronize.json # Pending add/edit/delete staging (committed)
132
+ │ ├── credentials.json # Username, user ID (gitignored)
133
+ │ ├── cookies.txt # Session cookie (gitignored)
134
+ │ └── scripts.json # Build/push lifecycle hooks (committed)
126
135
  ├── .claude/ # Claude Code plugin config (commands, specs, plans, skills)
136
+ ├── app_dependencies/ # Read-only checkouts of dependency apps (gitignored)
137
+ │ └── _system/ # System schema dependency
127
138
  ├── lib/ # All DBO server-managed assets
128
139
  │ ├── bins/ # Assets (contents, outputs, images, HTML, CSS)
129
140
  │ │ └── app/ # Default application bin
@@ -146,8 +157,6 @@ my-project/
146
157
  ├── test/ # Project-level tests
147
158
  ├── trash/ # Staged soft-deleted files from dbo rm
148
159
  ├── docs/ # Project documentation and docs entities
149
- ├── app.json # Clone of original app JSON with @references
150
- ├── schema.json # Instance-level entity/column schema fetched from the server during `dbo init`. Refreshed explicitly with `dbo clone --schema`.
151
160
  ├── manifest.json # PWA web app manifest (auto-generated from app metadata)
152
161
  ├── .gitignore # Tells Git to ignore files in the repo sync
153
162
  ├── .dboignore # Tells dbo cli to ignore files in commands
@@ -161,51 +170,44 @@ my-project/
161
170
 
162
171
  ## Configuration
163
172
 
164
- All configuration is **directory-scoped**. Each project folder maintains its own `.dbo/` directory with its own domain and session. Switch environments by switching directories:
173
+ All configuration is **directory-scoped**. Each project folder maintains its own `.app/` directory with its own domain and session. Switch environments by switching directories:
165
174
 
166
175
  ```bash
167
- ~/projects/my-project/ → .dbo/ → my-domain.com
168
- ~/projects/my-project-prod/ → .dbo/ → prod.dbo.io
176
+ ~/projects/my-project/ → .app/ → my-domain.com
177
+ ~/projects/my-project-prod/ → .app/ → prod.dbo.io
169
178
  ```
170
179
 
171
- ### `.dbo/` directory contents
180
+ ### `.app/` directory contents
172
181
 
173
182
  | File | Purpose | Git |
174
183
  |------|---------|-----|
175
184
  | `config.json` | Domain, app metadata, placement preferences | Committable (shared) |
176
- | `config.local.json` | Per-user settings: plugin scopes, `_completedMigrations` (system-managed) | Gitignored (per-user) |
177
- | `ticketing.local.json` | Stored ticket IDs for submission error recovery | Gitignored (per-user) |
178
185
  | `credentials.json` | Username, user ID, UID, name, email (no password) | Gitignored (per-user) |
179
186
  | `cookies.txt` | Session cookie (Netscape format) | Gitignored (per-user) |
180
- | `structure.json` | Bin directory mapping (created by `dbo clone`) | Committable (shared) |
181
- | `metadata_schema.json` | Column templates per entity/descriptor (auto-generated by `dbo clone`; renamed from `metadata_templates.json`) | Committable (shared) |
187
+ | `directories.json` | Bin directory mapping (created by `dbo clone`) | Committable (shared) |
188
+ | `<shortName>.metadata_schema.json` | Column templates per entity/descriptor (auto-generated by `dbo clone`) | Committable (shared) |
182
189
  | `synchronize.json` | Pending deletions and sync state (updated by `dbo rm` and `dbo push`) | Committable (shared) |
183
- | `.app_baseline.json` | Server-state snapshot for delta detection — stores column values at last clone/push so `dbo push` can detect which columns changed locally. Read-only (chmod 444); auto-migrated from legacy root `.app.json`. | Committable (shared) |
190
+ | `<shortName>.json` | Server-state snapshot for delta detection — stores column values at last clone/push so `dbo push` can detect which columns changed locally. Read-only (chmod 444). | Committable (shared) |
191
+ | `<shortName>.metadata.json` | Clone of original app JSON with entity entries replaced by `@path/to/*.metadata.json` references | Committable (shared) |
184
192
  | `scripts.json` | Build/push lifecycle hooks (see [Script Hooks](#script-hooks)) | Committable (shared) |
185
193
  | `scripts.local.json` | Per-user hook overrides | Gitignored (per-user) |
194
+ | `ticketing.local.json` | Stored ticket IDs for submission error recovery | Gitignored (per-user) |
186
195
 
187
- `dbo init` automatically adds `.dbo/credentials.json`, `.dbo/cookies.txt`, `.dbo/config.local.json`, `.dbo/ticketing.local.json`, and `.dbo/scripts.local.json` to `.gitignore` (creates the file if it doesn't exist).
196
+ Per-user settings (plugin scopes, completed migrations) are stored globally in `~/.dbo/settings.json`.
188
197
 
189
- > **Upgrading from pre-0.9.9**: The baseline file `.app.json` in the project root has moved to `.dbo/.app_baseline.json`. Running any `dbo` command will auto-migrate the file. You can also manually remove the `.app.json` entry from your `.gitignore`.
198
+ `dbo init` automatically adds `.app/credentials.json`, `.app/cookies.txt`, `.app/ticketing.local.json`, `.app/scripts.local.json`, `.app/errors.log`, and `app_dependencies/` to `.gitignore` (creates the file if it doesn't exist).
190
199
 
191
- > **Upgrading from pre-0.11.0**: `TransactionKeyPreset` now applies only to records that carry a `UID` column (core assets). Data records without a UID are always submitted with `RowID` regardless of the preset. Migration 001 runs automatically on first command after upgrade and logs a one-time notice.
200
+ > **Upgrading to 0.18.0+**: The project directory has been restructured: `.dbo/` is renamed to `.app/`, `app.json` moves to `.app/<shortName>.metadata.json`, `schema.json` is removed (schema now sourced from `app_dependencies/_system/`), `.dbo/dependencies/` moves to `app_dependencies/`, `.app_baseline.json` becomes `<shortName>.json`, `structure.json` becomes `directories.json`, `metadata_schema.json` becomes `<shortName>.metadata_schema.json`, and `config.local.json` moves to `~/.dbo/settings.json`. Migration 012 runs automatically on first command after upgrade.
192
201
 
193
- > **Upgrading to 0.13.3+**: Entity and extension companion files no longer include `~UID` in the filename. Migration 007 automatically renames legacy `name~uid.Column.ext` files to `name.Column.ext` and updates `@references` in metadata.
202
+ > **Upgrading to 0.16.0+**: `metadata_templates.json` is renamed to `metadata_schema.json`. The `_contentColumns` field in metadata files is renamed to `_companionReferenceColumns`. Extension companion file prompts during `dbo clone` are replaced by automatic derivation from `descriptor_definition` `form-control-code` data. Migration 011 runs automatically on first use.
194
203
 
195
- > **Upgrading to 0.14.0+**: Metadata files now use `name.metadata~uid.json` instead of `name~uid.metadata.json`. The UID has moved from the base name into the `.metadata~uid` suffix. Migration 008 automatically renames all metadata files. Output child companions use index-based naming (`Sales.column.CustomSQL.sql`, `Sales.column-1.CustomSQL.sql`) instead of UID-based naming.
196
- >
197
- > | Record type | Example metadata file |
198
- > |---|---|
199
- > | Content | `colors.metadata~abc123.json` |
200
- > | Media | `logo.png.metadata~def456.json` |
201
- > | Output | `Sales.metadata~ghi789.json` |
202
- > | Extension | `MyExtension.metadata~jkl012.json` |
204
+ > **Upgrading to 0.14.0+**: Metadata files now use `name.metadata~uid.json` instead of `name~uid.metadata.json`. Migration 008 automatically renames all metadata files.
203
205
 
204
- > **Upgrading to 0.16.0+**: `.dbo/metadata_templates.json` is renamed to `.dbo/metadata_schema.json`. The `_contentColumns` field in metadata files is renamed to `_companionReferenceColumns`. Extension companion file prompts during `dbo clone` are replaced by automatic derivation from `descriptor_definition` `form-control-code` data. Migration 011 runs automatically on first use.
206
+ > **Upgrading to 0.13.3+**: Entity and extension companion files no longer include `~UID` in the filename. Migration 007 automatically renames legacy files.
205
207
 
206
208
  #### Automatic migrations
207
209
 
208
- When the CLI version is upgraded, one-time migration scripts in `tools/cli/src/migrations/` run automatically on the first command invocation in a project directory. Completed migration IDs are recorded in `.dbo/config.local.json` under `_completedMigrations` (per-user, gitignored) so each developer runs them independently and they never re-fire.
210
+ When the CLI version is upgraded, one-time migration scripts in `tools/cli/src/migrations/` run automatically on the first command invocation in a project directory. Completed migration IDs are recorded in `~/.dbo/settings.json` under `_completedMigrations` (per-user, global) so each developer runs them independently and they never re-fire.
209
211
 
210
212
  To skip migrations for a single command run:
211
213
 
@@ -233,7 +235,7 @@ Use `dbo status` to see how many pending migrations exist.
233
235
  | Key | Values | Description |
234
236
  |-----|--------|-------------|
235
237
  | `domain` | hostname | DBO.io instance to connect to |
236
- | `AppID` | number | App ID (set by `dbo clone`, used by `dbo add`/`dbo input`) |
238
+ | `AppID` | number | App ID (set by `dbo clone`, used by `dbo adopt`/`dbo input`) |
237
239
  | `AppUID` | string | App UID |
238
240
  | `AppName` | string | App display name |
239
241
  | `AppShortName` | string | App short name (used for `dbo clone --app`) |
@@ -250,20 +252,20 @@ Use `dbo status` to see how many pending migrations exist.
250
252
 
251
253
  ### App Dependencies
252
254
 
253
- The CLI automatically maintains local read-only checkouts of related apps under `.dbo/dependencies/<shortname>/`. By default, the `_system` app (which contains all entity, column, and extension descriptors for the connected instance) is always included.
255
+ The CLI automatically maintains local read-only checkouts of related apps under `app_dependencies/<shortname>/`. By default, the `_system` app (which contains all entity, column, and extension descriptors for the connected instance) is always included.
254
256
 
255
257
  #### How it works
256
258
 
257
- - After `dbo init` or `dbo clone`, dependency apps are cloned into `.dbo/dependencies/`.
258
- - If an `app.json` contains a `Dependencies` column, those app short-names are merged into `.dbo/config.json` and also cloned.
259
+ - After `dbo init` or `dbo clone`, dependency apps are cloned into `app_dependencies/`.
260
+ - If an app JSON contains a `Dependencies` column, those app short-names are merged into `.app/config.json` and also cloned.
259
261
  - You can add dependencies explicitly with `dbo clone --dependencies operator,launchpad`.
260
262
  - Dependencies are only re-cloned when the server's `_LastUpdated` is newer than the locally stored timestamp — so subsequent runs are fast.
261
263
  - Dependency clone output is suppressed — a single summary line shows synced/failed/up-to-date status.
262
- - `.dbo/dependencies/` is excluded from `.gitignore` and `.dboignore` automatically.
264
+ - `app_dependencies/` is excluded from `.gitignore` and `.dboignore` automatically.
263
265
 
264
266
  #### Schema merging from dependencies
265
267
 
266
- After dependency cloning, extension descriptor definitions from dependency schemas (`.dbo/dependencies/<name>/.dbo/metadata_schema.json`) are merged into the local `.dbo/metadata_schema.json`. This is useful when an app has no `descriptor_definition` extensions of its own but depends on an app (like `operator`) that does — the operator's descriptor definitions (widget, include, control, etc.) become available for local extension processing.
268
+ After dependency cloning, extension descriptor definitions from dependency schemas (`app_dependencies/<name>/.app/<name>.metadata_schema.json`) are merged into the local `.app/<shortName>.metadata_schema.json`. This is useful when an app has no `descriptor_definition` extensions of its own but depends on an app (like `operator`) that does — the operator's descriptor definitions (widget, include, control, etc.) become available for local extension processing.
267
269
 
268
270
  #### Flags
269
271
 
@@ -276,13 +278,13 @@ After dependency cloning, extension descriptor definitions from dependency schem
276
278
 
277
279
  ### Root-level project files
278
280
 
279
- #### `app.json`
281
+ #### `.app/<shortName>.metadata.json`
280
282
 
281
- Clone of the original app JSON from the server with entity entries replaced by `@path/to/*.metadata.json` references. Created by `dbo init` (empty `{}`) and populated by `dbo clone`. Committed to git.
283
+ Clone of the original app JSON from the server with entity entries replaced by `@path/to/*.metadata.json` references. Created by `dbo clone`. Committed to git. (Formerly `app.json` in the project root.)
282
284
 
283
- #### `app.json._domain`
285
+ #### `.app/<shortName>.metadata.json._domain`
284
286
 
285
- The `_domain` field in `app.json` stores the project's reference domain (set during `dbo clone`). This is committed to git and used for domain-change detection when running `dbo init --force` or `dbo clone --domain`. It provides a stable cross-user baseline — all collaborators share the same reference domain.
287
+ The `_domain` field in the app metadata file stores the project's reference domain (set during `dbo clone`). This is committed to git and used for domain-change detection when running `dbo init --force` or `dbo clone --domain`. It provides a stable cross-user baseline — all collaborators share the same reference domain.
286
288
 
287
289
  #### `manifest.json`
288
290
 
@@ -305,7 +307,7 @@ A gitignore-style file in the project root that controls which files and directo
305
307
 
306
308
  **Used by:**
307
309
  - `dbo init` — scaffold empty-check (determines if directory is "effectively empty")
308
- - `dbo add .` — directory scanning (which files/dirs to skip); also checked in single-file mode (`dbo add file.html`)
310
+ - `dbo adopt ./` — directory scanning (which files/dirs to skip); also checked in single-file mode (`dbo adopt file.html`)
309
311
  - `dbo push` — metadata file discovery: skips matching `.metadata.json` / `_output~*.json` files AND any record whose companion content file (`@reference`) matches an ignore pattern
310
312
 
311
313
  **Bypass:** Use `dbo input -d '...'` to submit expressions for a file that would otherwise be ignored — `dbo input` never does file discovery so `.dboignore` does not apply.
@@ -331,9 +333,9 @@ bins/
331
333
  **Default patterns:**
332
334
 
333
335
  ```gitignore
334
- .dbo/ # DBO internal
336
+ .app/ # DBO internal
337
+ app_dependencies/ # Dependency checkouts
335
338
  *.dboio.json # Export files
336
- app.json # Clone output
337
339
  .git/ # Version control
338
340
  .gitignore
339
341
  node_modules/ # Node
@@ -406,7 +408,7 @@ dbo init --scaffold --yes # scaffold dirs non-intera
406
408
  Clone an app from DBO.io to a local project structure. Creates directories, files, metadata, and populates `config.json` and `package.json`.
407
409
 
408
410
  ```bash
409
- # Clone using config (AppShortName from .dbo/config.json)
411
+ # Clone using config (AppShortName from .app/config.json)
410
412
  dbo clone
411
413
 
412
414
  # Clone from a local JSON export file
@@ -433,7 +435,7 @@ dbo clone -e extension --descriptor-types false # Clone extensions flat (no de
433
435
  | `--documentation-only` | When used with `-e extension`, clone only documentation extensions |
434
436
  | `--descriptor-types <bool>` | Sort extensions into descriptor sub-directories (default: `true`). Set to `false` to use flat `extension/` layout |
435
437
  | `--domain <host>` | Override domain. Triggers a domain-change confirmation prompt when it differs from the project reference domain |
436
- | `--schema` | Re-fetch `schema.json` from server before cloning |
438
+ | `--schema` | Re-fetch schema from server before cloning |
437
439
  | `--force` | Skip source mismatch confirmation and change detection; re-processes all files |
438
440
  | `-y, --yes` | Auto-accept all prompts (also skips source mismatch confirmation) |
439
441
  | `-v, --verbose` | Show HTTP request details |
@@ -444,29 +446,29 @@ dbo clone -e extension --descriptor-types false # Clone extensions flat (no de
444
446
 
445
447
  #### Domain change detection
446
448
 
447
- When cloning with a different domain than the project's reference domain (`app.json._domain` or `config.json.domain`), the CLI warns before proceeding. When `TransactionKeyPreset=RowID`, this escalates to a critical error because numeric IDs are not unique across domains — pushing to the wrong domain can corrupt records. In non-interactive mode (`-y`), RowUID domain changes proceed with a warning, but RowID domain changes throw a hard error.
449
+ When cloning with a different domain than the project's reference domain (`.app/<shortName>.metadata.json._domain` or `config.json.domain`), the CLI warns before proceeding. When `TransactionKeyPreset=RowID`, this escalates to a critical error because numeric IDs are not unique across domains — pushing to the wrong domain can corrupt records. In non-interactive mode (`-y`), RowUID domain changes proceed with a warning, but RowID domain changes throw a hard error.
448
450
 
449
- The project's reference domain is stored in `app.json._domain` (committed to git) during clone, giving the CLI a stable cross-user baseline.
451
+ The project's reference domain is stored in `.app/<shortName>.metadata.json._domain` (committed to git) during clone, giving the CLI a stable cross-user baseline.
450
452
 
451
453
  #### What clone does
452
454
 
453
- 1. **Fetches schema** — downloads `schema.json` from the server if missing or explicitly requested (`--schema`). Regenerates `.dbo/metadata_schema.json` from the schema
454
- 2. **Syncs dependencies** — clones dependency apps into `.dbo/dependencies/<shortname>/` (unless `--no-deps`). Merges extension descriptor definitions from dependency schemas into the local `.dbo/metadata_schema.json` (e.g., operator provides descriptor definitions for apps that lack their own)
455
+ 1. **Fetches schema** — downloads schema from the server if missing or explicitly requested (`--schema`). Regenerates `.app/<shortName>.metadata_schema.json` from the schema
456
+ 2. **Syncs dependencies** — clones dependency apps into `app_dependencies/<shortname>/` (unless `--no-deps`). Merges extension descriptor definitions from dependency schemas into the local `.app/<shortName>.metadata_schema.json` (e.g., operator provides descriptor definitions for apps that lack their own)
455
457
  3. **Loads app JSON** — from a local file, server API, or interactive prompt. A spinner shows progress while fetching from the server (responses can be slow as the JSON is assembled on demand)
456
- 4. **Updates `.dbo/config.json`** — saves `AppID`, `AppUID`, `AppName`, `AppShortName`, `AppModifyKey` (if the app is locked), and `cloneSource` (the source used for this clone)
458
+ 4. **Updates `.app/config.json`** — saves `AppID`, `AppUID`, `AppName`, `AppShortName`, `AppModifyKey` (if the app is locked), and `cloneSource` (the source used for this clone)
457
459
  5. **Updates `package.json`** — populates `name`, `productName`, `description`, `homepage`, and `deploy` script
458
460
  6. **Creates directories** — processes `children.bin` to build the directory hierarchy based on `ParentBinID` relationships
459
- 7. **Saves `.dbo/structure.json`** — maps BinIDs to directory paths for file placement
461
+ 7. **Saves `.app/directories.json`** — maps BinIDs to directory paths for file placement
460
462
  8. **Writes content files** — decodes base64 content, creates `*.metadata.json` + content files in the correct bin directory. Filename columns and companion file extraction preferences are auto-applied with sensible defaults on first clone (use `--configure` to re-prompt)
461
- 9. **Downloads media files** — fetches binary files (images, CSS, fonts) from the server using a fallback chain: `FullPath` directly (`/media/{app}/{path}`) → `/dir/` route → `/api/media/{uid}`, and saves with metadata. 404 errors create stale metadata to prevent re-prompting. Errors are logged to `.dbo/errors.log`
463
+ 9. **Downloads media files** — fetches binary files (images, CSS, fonts) from the server using a fallback chain: `FullPath` directly (`/media/{app}/{path}`) → `/dir/` route → `/api/media/{uid}`, and saves with metadata. 404 errors create stale metadata to prevent re-prompting. Errors are logged to `.app/errors.log`
462
464
  10. **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., `extension/`, `data_source/`)
463
465
  11. **Processes other entities** — remaining entities with a `BinID` are placed in the corresponding bin directory
464
- 12. **Saves `app.json`** — clone of the original JSON with processed entries replaced by `@path/to/*.metadata.json` references
466
+ 12. **Saves `.app/<shortName>.metadata.json`** — clone of the original JSON with processed entries replaced by `@path/to/*.metadata.json` references
465
467
  13. **Orphan cleanup** — any local `.metadata.json` files whose UID is absent from the server response are automatically moved to `trash/` along with their companion content and media files. This prevents stale records (deleted server-side) from causing false positives in `dbo push`. Skipped during `--entity-filter` clones
466
468
 
467
469
  #### Clone source tracking
468
470
 
469
- After every successful clone, the source is persisted as `cloneSource` in `.dbo/config.json`:
471
+ After every successful clone, the source is persisted as `cloneSource` in `.app/config.json`:
470
472
 
471
473
  - `"default"` — app JSON was fetched from the server using `AppShortName` (the normal flow)
472
474
  - A file path or URL — set when an explicit `<source>` argument was provided (e.g. `dbo clone /path/to/export.json`)
@@ -505,7 +507,7 @@ When multiple records would create files at the same path (e.g., a `content` rec
505
507
  [media] colors.css (UID: def456)
506
508
  ```
507
509
 
508
- The rejected record is automatically staged for deletion in `.dbo/synchronize.json`. Run `dbo push` to delete it from the server.
510
+ The rejected record is automatically staged for deletion in `.app/synchronize.json`. Run `dbo push` to delete it from the server.
509
511
 
510
512
  In non-interactive mode (`-y`), the first record is kept and others are auto-staged for deletion.
511
513
 
@@ -565,7 +567,7 @@ During clone, the CLI:
565
567
  2. **Creates sub-directories** under `extension/` for each mapped descriptor (e.g., `extension/Documentation/`, `extension/Includes/`)
566
568
  3. **Places unmapped extensions** directly in `extension/` — extensions with an unmapped or null `Descriptor` are placed in the root `extension/` directory (the legacy `_unsupported/` sub-directory is migrated automatically by Migration 011)
567
569
  4. **Prompts per descriptor** — filename column and content extraction prompts fire once per unique `Descriptor` value (not once for all extensions)
568
- 5. **Persists the mapping** in `.dbo/structure.json` under `descriptorMapping`
570
+ 5. **Persists the mapping** in `.app/directories.json` under `descriptorMapping`
569
571
 
570
572
  **Config keys** (saved per descriptor in `config.json`):
571
573
 
@@ -591,18 +593,42 @@ dbo clone -e extension # Clone all extensions (all
591
593
  dbo clone -e extension --descriptor-types false # Flat layout (no descriptor sorting)
592
594
  ```
593
595
 
594
- **`dbo add` auto-inference**: Running `dbo add docs/my-doc.md` when `ExtensionDocumentationMDPlacement` is `"root"` auto-creates a companion `.metadata.json` in `extension/documentation/` with the correct `@/` reference.
596
+ **`dbo adopt` auto-inference**: Running `dbo adopt docs/my-doc.md` when `ExtensionDocumentationMDPlacement` is `"root"` auto-creates a companion `.metadata.json` in `lib/extension/documentation/` with the correct `@/` reference.
597
+
598
+ #### Entity children embedding
599
+
600
+ When a server entity record contains nested child records (e.g., `entity_column` records nested under `entity` parents), `dbo clone` embeds them inline in the parent's `.metadata~uid.json` file under a `children` key:
601
+
602
+ ```json
603
+ {
604
+ "_entity": "entity",
605
+ "UID": "abc123",
606
+ "Name": "contact",
607
+ "children": {
608
+ "entity_column": [
609
+ { "UID": "col1", "Name": "FirstName", "PhysicalOrderNumber": 1, "_LastUpdated": "2026-01-01T00:00:00" },
610
+ { "UID": "col2", "Name": "LastName", "PhysicalOrderNumber": 2, "_LastUpdated": "2026-01-02T00:00:00" }
611
+ ]
612
+ }
613
+ }
614
+ ```
615
+
616
+ Children are stored with all fields intact (including `_LastUpdated`, `_CreatedOn`, `UID`). Base64-encoded field values within child records are decoded to plain strings. This applies generically to all entity types that contain a `children` property in the server response.
617
+
618
+ **Push behaviour**: `dbo push` detects changes within the `children` arrays by comparing against the baseline. Modified child records are submitted independently as input expressions (children before parent). Removing a child from the metadata file stages a delete in `synchronize.json`. The `children` key itself is never included in the parent's input expression.
619
+
620
+ **Output hierarchy children**: Output child records (`output_value`, `output_value_filter`, `output_value_entity_column_rel`) are also embedded inline under `children`. Only the root output's `CustomSQL` is extracted as a companion `.sql` file — child `CustomSQL` values are stored inline as decoded strings.
595
621
 
596
622
  #### Output structure
597
623
 
598
624
  ```
599
625
  project/
600
- .dbo/
626
+ .app/
601
627
  config.json # Updated with app metadata
602
- structure.json # Bin directory mapping
628
+ directories.json # Bin directory mapping
629
+ <shortName>.metadata.json # Clone of original with @references
603
630
  .gitignore # credentials.json + cookies.txt added
604
631
  package.json # Updated with app info + deploy script
605
- app.json # Clone of original with @references
606
632
  bins/ # ← root for all bin-placed files
607
633
  app/ # ← directory from children.bin
608
634
  thomas-scratch.md
@@ -687,7 +713,7 @@ During `dbo clone`, the CLI downloads media using a **fallback chain**:
687
713
  2. **`/dir/` route** — strips the `/media/` prefix from FullPath and uses the `/dir/` route
688
714
  3. **`/api/media/{uid}`** — UID-based endpoint as last resort (when no FullPath exists)
689
715
 
690
- If all attempts fail, the error is logged to `.dbo/errors.log` (JSONL format) with the record's UID, filename, FullPath, and error details.
716
+ If all attempts fail, the error is logged to `.app/errors.log` (JSONL format) with the record's UID, filename, FullPath, and error details.
691
717
 
692
718
  #### Output hierarchy format
693
719
 
@@ -726,7 +752,7 @@ Key points:
726
752
 
727
753
  #### Metadata Schema
728
754
 
729
- During `dbo clone`, the CLI auto-generates `.dbo/metadata_schema.json` (formerly `metadata_templates.json`) — a file that records which columns each entity/descriptor uses. This file is seeded from the first cloned record of each type and can be manually edited afterwards.
755
+ During `dbo clone`, the CLI auto-generates `.app/<shortName>.metadata_schema.json` — a file that records which columns each entity/descriptor uses. This file is seeded from the first cloned record of each type and can be manually edited afterwards.
730
756
 
731
757
  **File format:**
732
758
 
@@ -749,11 +775,11 @@ During `dbo clone`, the CLI auto-generates `.dbo/metadata_schema.json` (formerly
749
775
  | `String10=@reference` | Content reference — links to the file being added |
750
776
  | `String5=@reference:@Name[js]` | Content reference with filename source and extension |
751
777
 
752
- `dbo add` uses these templates to auto-detect the entity type from a file's directory placement and generate metadata without prompting. For example, `dbo add extension/include/nav.html` resolves to entity `extension` / descriptor `include` and applies the matching template.
778
+ `dbo adopt` uses these templates to auto-detect the entity type from a file's directory placement and generate metadata without prompting. For example, `dbo adopt lib/extension/include/nav.html` resolves to entity `extension` / descriptor `include` and applies the matching template.
753
779
 
754
780
  #### `@reference` expression syntax
755
781
 
756
- The `=@reference` expression controls how companion files are named during `dbo clone` and `dbo add`. The full grammar:
782
+ The `=@reference` expression controls how companion files are named during `dbo clone` and `dbo adopt`. The full grammar:
757
783
 
758
784
  ```
759
785
  Column=@reference[:filenameSource][extPart][{title}]
@@ -793,7 +819,7 @@ Given a record with `Name="My-Widget"`, `Extension="html"`, `Ext=""` (empty):
793
819
 
794
820
  Authenticate with a DBO.io instance and store the session cookie.
795
821
 
796
- After successful authentication, the CLI automatically fetches and stores the current user's ID, UID, name, and email in `.dbo/credentials.json`. The ID and UID are used for automatic retry when server submissions require user identity (see [Automatic error recovery](#automatic-error-recovery)). The name and email are used to populate `package.json` author fields during `dbo clone`.
822
+ After successful authentication, the CLI automatically fetches and stores the current user's ID, UID, name, and email in `.app/credentials.json`. The ID and UID are used for automatic retry when server submissions require user identity (see [Automatic error recovery](#automatic-error-recovery)). The name and email are used to populate `package.json` author fields during `dbo clone`.
797
823
 
798
824
  > **Note:** User info is currently retrieved via a separate API call after login. This is a temporary workaround — the authentication endpoint should include user info in its response directly.
799
825
 
@@ -836,13 +862,13 @@ dbo status
836
862
 
837
863
  Output:
838
864
  ```
839
- Initialized: Yes (.dbo/)
865
+ Initialized: Yes (.app/)
840
866
  Domain: my-domain.com
841
867
  Username: user@example.com
842
868
  User ID: 10296
843
869
  Directory: /Users/me/projects/operator
844
870
  Session: Active (expires: 2026-03-15T10:30:00.000Z)
845
- Cookies: /Users/me/projects/operator/.dbo/cookies.txt
871
+ Cookies: /Users/me/projects/operator/.app/cookies.txt
846
872
 
847
873
  Claude Code Plugins:
848
874
  dbo: ✓ global (~/.claude/commands/dbo.md)
@@ -850,7 +876,7 @@ Output:
850
876
 
851
877
  User ID is populated by `dbo login`. If it shows "(not set)", run `dbo login` to fetch it.
852
878
 
853
- Plugin scopes (project or global) are displayed when plugins have been installed. Scopes are stored in `.dbo/config.local.json`.
879
+ Plugin scopes (project or global) are displayed when plugins have been installed. Scopes are stored in `~/.dbo/settings.json`.
854
880
 
855
881
  ---
856
882
 
@@ -1407,7 +1433,7 @@ Apply macOS Finder color tags or Linux gio emblems to companion files based on t
1407
1433
  |-----|-------|---------|
1408
1434
  | `dbo:Synced` | 🟢 Green | File matches server — no local changes |
1409
1435
  | `dbo:Modified` | 🔵 Blue | Local edits not yet pushed |
1410
- | `dbo:Untracked` | 🟡 Yellow | No metadata — not yet added with `dbo add` |
1436
+ | `dbo:Untracked` | 🟡 Yellow | No metadata — not yet adopted with `dbo adopt` |
1411
1437
  | `dbo:Trashed` | 🔴 Red | File is in the `trash/` directory |
1412
1438
 
1413
1439
  ```bash
@@ -1458,7 +1484,7 @@ dbo rm --keep-local bins/app/ui/
1458
1484
  ```
1459
1485
 
1460
1486
  When removing a directory, the CLI:
1461
- 1. Looks up the BinID from `.dbo/structure.json`
1487
+ 1. Looks up the BinID from `.app/directories.json`
1462
1488
  2. Recursively collects all sub-directories (processed leaves-first)
1463
1489
  3. Prompts: "Remove all files and directories", "Prompt for each file", or "Cancel"
1464
1490
  4. Stages each file's deletion, then each bin's deletion (`entity:bin`)
@@ -1476,8 +1502,8 @@ When removing a directory, the CLI:
1476
1502
  1. **Resolves metadata** — if given a content file, finds the companion `.metadata.json`
1477
1503
  2. **Reads row ID** — uses `_id` (shorthand) or derives from entity (e.g., `ContentID`, `MediaID`)
1478
1504
  3. **Prompts for confirmation** — "Do you really want to remove this file and all of its nodes?"
1479
- 4. **Stages deletion** — adds a delete entry to `.dbo/synchronize.json`
1480
- 5. **Updates app.json** — removes the `@path/to/file.metadata.json` reference from children arrays
1505
+ 4. **Stages deletion** — adds a delete entry to `.app/synchronize.json`
1506
+ 5. **Updates app metadata** — removes the `@path/to/file.metadata.json` reference from children arrays
1481
1507
  6. **Soft-deletes local files** — renames files with `__WILL_DELETE__` prefix (unless `--keep-local` or `--hard`)
1482
1508
  7. **After `dbo push`** — successfully deleted records have their `__WILL_DELETE__` files moved to `Trash/`
1483
1509
 
@@ -1485,7 +1511,7 @@ Use `--hard` to immediately delete files without the `Trash/` safety net.
1485
1511
 
1486
1512
  #### synchronize.json
1487
1513
 
1488
- Pending deletions are stored in `.dbo/synchronize.json`:
1514
+ Pending deletions are stored in `.app/synchronize.json`:
1489
1515
 
1490
1516
  ```json
1491
1517
  {
@@ -1507,73 +1533,87 @@ The next `dbo push` processes all pending deletions before pushing file changes.
1507
1533
 
1508
1534
  ---
1509
1535
 
1510
- ### `dbo add`
1536
+ ### `dbo adopt`
1511
1537
 
1512
- Add a new file to DBO.io by creating a server record. Similar to `git add`, this registers a local file with the server.
1538
+ Create a metadata companion file for a local file, making it ready for server insertion on the next `dbo push`. This is a **local-only operation** no server requests are made.
1513
1539
 
1514
- Files matching `.dboignore` patterns are skipped — both in directory-scan mode (`dbo add .`) and single-file mode (`dbo add file.html`). Use `dbo input` to create a record for an ignored file directly.
1540
+ Files matching `.dboignore` patterns are skipped — both in directory mode (`dbo adopt ./`) and single-file mode (`dbo adopt file.html`). Use `dbo input` to create a record for an ignored file directly.
1515
1541
 
1516
1542
  #### Single file
1517
1543
 
1518
1544
  ```bash
1519
- # Add a file (interactive metadata setup if no .metadata.json exists)
1520
- dbo add assets/css/colors.css
1545
+ # Single file entity inferred from directory
1546
+ dbo adopt lib/bins/app/assets/css/colors.css
1547
+
1548
+ # Single file — explicit entity
1549
+ dbo adopt lib/bins/app/assets/css/colors.css -e content
1521
1550
 
1522
- # Add with auto-accept prompts
1523
- dbo add assets/css/colors.css -y
1551
+ # Extension with explicit column
1552
+ dbo adopt lib/extension/widget/button.html -e extension.String5
1524
1553
 
1525
- # Add with ticket ID
1526
- dbo add assets/css/colors.css --ticket abc123
1554
+ # Skip all confirmation prompts
1555
+ dbo adopt lib/bins/app/assets/css/colors.css -e content -y
1527
1556
  ```
1528
1557
 
1529
- If the file has no companion `.metadata.json`, an interactive wizard prompts for the entity name, content column, AppID, BinID, SiteID, and Path. It then creates the metadata file and submits the insert.
1558
+ If the file lives in a recognized directory (e.g. `lib/bins/`, `lib/extension/`, `docs/`), the entity is auto-inferred via `resolveDirective()`. Otherwise, pass `-e <entity>` or follow the interactive wizard.
1530
1559
 
1531
- #### Directory scan
1560
+ #### Attach to existing record (`--into`)
1532
1561
 
1533
1562
  ```bash
1534
- # Scan current directory for un-added files
1535
- dbo add .
1536
-
1537
- # Scan a specific directory
1538
- dbo add assets/
1563
+ # Attach a second file to the same record
1564
+ dbo adopt file2.css --into file1.metadata.json -e String6
1539
1565
  ```
1540
1566
 
1541
- Recursively finds files that either have no `.metadata.json` companion or have metadata without `_CreatedOn` (never been on the server). Lists them and prompts for confirmation before adding.
1542
-
1543
- When adding multiple files, the entity and column defaults from the first file are reused for subsequent files.
1544
-
1545
- #### After adding
1567
+ Adds `String6: "@file2.css"` to `file1.metadata.json` and appends `String6` to `_companionReferenceColumns`. No separate `file2.metadata.json` is created. Requires `-e <column>`.
1546
1568
 
1547
- After a successful add, the server returns a UID which is written back to the metadata file. To populate all server-side columns (like `_CreatedOn`, `Extension`, etc.), run:
1569
+ #### Directory mode
1548
1570
 
1549
1571
  ```bash
1550
- dbo pull -e content <uid>
1572
+ # Adopt all untracked media files in a directory
1573
+ dbo adopt lib/bins/app/assets/img/ -e media
1574
+
1575
+ # Adopt all untracked files in the entire project as media
1576
+ dbo adopt . -e media -y
1551
1577
  ```
1552
1578
 
1553
- #### Metadata generated by add
1579
+ Recursively finds files that have no `.metadata.json` companion (or have metadata without a UID/`_CreatedOn`). Lists them and prompts for confirmation before creating metadata. The `-e` flag is required in directory mode.
1580
+
1581
+ #### After adopting
1554
1582
 
1555
- Minimal (no optional fields provided):
1583
+ After `dbo adopt`, run `dbo push` to insert the new record(s) on the server. Push detects metadata files without a UID and submits them as new inserts.
1584
+
1585
+ #### Metadata generated by adopt
1586
+
1587
+ Content entity (auto-detected from `lib/bins/`):
1556
1588
  ```json
1557
1589
  {
1590
+ "_entity": "content",
1591
+ "_companionReferenceColumns": ["Content"],
1558
1592
  "Name": "colors",
1559
- "Path": "assets/css/colors.css",
1560
1593
  "Content": "@colors.css",
1561
- "_entity": "content",
1562
- "_companionReferenceColumns": ["Content"]
1594
+ "Extension": "CSS",
1595
+ "Path": "assets/css/colors.css",
1596
+ "Active": 1,
1597
+ "Public": 0,
1598
+ "BinID": 11045,
1599
+ "AppID": 10100
1563
1600
  }
1564
1601
  ```
1565
1602
 
1566
- With optional fields (only included if the user provides values during the wizard):
1603
+ Media entity:
1567
1604
  ```json
1568
1605
  {
1606
+ "_entity": "media",
1607
+ "_mediaFile": "@logo.png",
1608
+ "Name": "logo",
1609
+ "Filename": "logo.png",
1610
+ "Extension": "png",
1611
+ "Ownership": "App",
1612
+ "BinID": 11048,
1569
1613
  "AppID": 10100,
1570
- "BinID": 11045,
1571
- "SiteID": 10061,
1572
- "Name": "colors",
1573
- "Path": "assets/css/colors.css",
1574
- "Content": "@colors.css",
1575
- "_entity": "content",
1576
- "_companionReferenceColumns": ["Content"]
1614
+ "Path": "assets/img",
1615
+ "MimeType": "image/png",
1616
+ "FullPath": "/media/myapp/app/assets/img/logo.png"
1577
1617
  }
1578
1618
  ```
1579
1619
 
@@ -1581,18 +1621,15 @@ The `@colors.css` reference tells the CLI to read the file content from `colors.
1581
1621
 
1582
1622
  | Flag | Description |
1583
1623
  |------|-------------|
1584
- | `<path>` | File or `.` to scan current directory |
1585
- | `-C, --confirm <true\|false>` | Commit (default: `true`) |
1586
- | `--ticket <id>` | Override ticket ID |
1587
- | `--modify-key <key>` | Provide ModifyKey directly (skips interactive prompt) |
1588
- | `--row-key <type>` | Row key type (`RowUID` or `RowID`) — `add` always uses `RowID:add1` for new records regardless |
1589
- | `-y, --yes` | Auto-accept all prompts |
1590
- | `--json` | Output raw JSON |
1591
- | `--jq <expr>` | Filter JSON response |
1624
+ | `<path>` | File path, directory path, or `.` for current directory |
1625
+ | `-e, --entity <spec>` | Entity and optional column: `content`, `media`, `extension.widget`, `extension.String5`. Required in directory mode. |
1626
+ | `--into <metaPath>` | Attach file to an existing metadata record as an additional companion column (single-file only) |
1627
+ | `-y, --yes` | Skip all confirmation prompts |
1628
+ | `--domain <host>` | Override domain |
1592
1629
 
1593
1630
  #### Column filtering
1594
1631
 
1595
- The `add` and `push` commands never submit these server-managed columns:
1632
+ The `push` command never submits these server-managed columns (applies to records created by `adopt`):
1596
1633
  - `_CreatedOn`, `_LastUpdated` — set by the server
1597
1634
  - `_LastUpdatedUserID`, `_LastUpdatedTicketID` — session-provided values
1598
1635
  - `UID` — assigned by the server on insert
@@ -1602,7 +1639,7 @@ The `add` and `push` commands never submit these server-managed columns:
1602
1639
 
1603
1640
  ### Automatic error recovery
1604
1641
 
1605
- The `input`, `push`, and `add` commands automatically detect recoverable server errors and prompt for missing values instead of failing immediately.
1642
+ The `input` and `push` commands automatically detect recoverable server errors and prompt for missing values instead of failing immediately.
1606
1643
 
1607
1644
  #### Ticket error recovery
1608
1645
 
@@ -1619,7 +1656,7 @@ When the server returns a `ticket_error` (record update requires a Ticket ID), t
1619
1656
 
1620
1657
  #### Ticket suggestions
1621
1658
 
1622
- When `TicketSuggestionOutput` is configured in `.dbo/config.json` (set during `dbo init`), the CLI automatically fetches relevant ticket suggestions from the server and presents them as selectable choices:
1659
+ When `TicketSuggestionOutput` is configured in `.app/config.json` (set during `dbo init`), the CLI automatically fetches relevant ticket suggestions from the server and presents them as selectable choices:
1623
1660
 
1624
1661
  ```
1625
1662
  ? Select a Ticket ID:
@@ -1646,7 +1683,7 @@ When the server returns a `repo_mismatch` (Ticket ID belongs to a different repo
1646
1683
  Skip all
1647
1684
  ```
1648
1685
 
1649
- Ticket selections are stored in `.dbo/ticketing.local.json` for reuse across submissions. Per-record tickets are cleaned up after successful submission; the global ticket persists until explicitly cleared. The `--ticket` flag always takes precedence over stored tickets.
1686
+ Ticket selections are stored in `.app/ticketing.local.json` for reuse across submissions. Per-record tickets are cleaned up after successful submission; the global ticket persists until explicitly cleared. The `--ticket` flag always takes precedence over stored tickets.
1650
1687
 
1651
1688
  #### Ticket ID required (legacy)
1652
1689
 
@@ -1661,7 +1698,7 @@ The submission is then retried with `_OverrideTicketID`. To skip the prompt, pas
1661
1698
 
1662
1699
  #### Pre-submission ticket prompt
1663
1700
 
1664
- When a stored ticket exists in `.dbo/ticketing.local.json`, the CLI prompts before batch submissions (`push`, `input`, `add`, `content deploy`, `deploy`):
1701
+ When a stored ticket exists in `.app/ticketing.local.json`, the CLI prompts before batch submissions (`push`, `input`, `add`, `content deploy`, `deploy`):
1665
1702
 
1666
1703
  ```
1667
1704
  ? Use stored Ticket ID "TICKET-123" for this submission?
@@ -1678,7 +1715,7 @@ When a stored ticket exists in `.dbo/ticketing.local.json`, the CLI prompts befo
1678
1715
  - **No, clear** — removes the stored `ticket_id` and proceeds without a ticket
1679
1716
  - **Cancel** — aborts the submission
1680
1717
 
1681
- #### `.dbo/ticketing.local.json`
1718
+ #### `.app/ticketing.local.json`
1682
1719
 
1683
1720
  Stores ticket IDs for automatic application during submissions:
1684
1721
 
@@ -1721,14 +1758,14 @@ The ModifyKey is detected and stored during `dbo clone`. If the key wasn't store
1721
1758
  Cancel submission
1722
1759
  ```
1723
1760
 
1724
- On successful reactive entry, the key is saved to `.dbo/config.json` for future use.
1761
+ On successful reactive entry, the key is saved to `.app/config.json` for future use.
1725
1762
 
1726
1763
  To bypass the interactive prompt entirely, pass `--modify-key <key>` on any submission command:
1727
1764
 
1728
1765
  ```bash
1729
1766
  dbo push . --modify-key mySecretKey
1730
1767
  dbo input -d '...' --modify-key mySecretKey
1731
- dbo add myfile.css --modify-key mySecretKey
1768
+ dbo push myfile.css --modify-key mySecretKey
1732
1769
  ```
1733
1770
 
1734
1771
  #### User identity required
@@ -1800,7 +1837,7 @@ Smart behavior:
1800
1837
  - If plugins differ from source, prompts to upgrade to the latest version
1801
1838
  - Compares file hashes — unchanged files are skipped
1802
1839
  - Adds project-scoped plugins to `.gitignore` (source of truth is `plugins/claude/` at repo root)
1803
- - Per-plugin scope (project or global) is stored in `.dbo/config.local.json` and remembered for future upgrades
1840
+ - Per-plugin scope (project or global) is stored in `~/.dbo/settings.json` and remembered for future upgrades
1804
1841
  - On re-install (e.g. after `npm install` or `npm link`), scope is inferred automatically from the global plugin registry (`~/.claude/plugins/installed_plugins.json`) or existing project installation — no prompt is shown
1805
1842
  - On first install with no prior preference and no existing installation, prompts for scope
1806
1843
  - `--global` / `--local` flags override stored preferences and update them
@@ -1809,7 +1846,7 @@ Smart behavior:
1809
1846
 
1810
1847
  ### `dbo deploy`
1811
1848
 
1812
- Deploy files to DBO.io using a `.dbo/deploy_config.json` manifest or direct arguments.
1849
+ Deploy files to DBO.io using a `.app/deploy_config.json` manifest or direct arguments.
1813
1850
 
1814
1851
  ```bash
1815
1852
  # Deploy a named entry from the manifest
@@ -1830,7 +1867,7 @@ dbo deploy img:logo
1830
1867
 
1831
1868
  | Flag | Description |
1832
1869
  |------|-------------|
1833
- | `<name>` | Deployment name from `.dbo/deploy_config.json` |
1870
+ | `<name>` | Deployment name from `.app/deploy_config.json` |
1834
1871
  | `--all` | Deploy all entries in the manifest |
1835
1872
  | `-C, --confirm <true\|false>` | Commit (default: `true`) |
1836
1873
  | `--ticket <id>` | Override ticket ID |
@@ -1842,9 +1879,9 @@ dbo deploy img:logo
1842
1879
 
1843
1880
  The `deploy` command includes the same automatic error recovery as `push`, `input`, and `add` — including ticket error handling, repository mismatch recovery, user identity prompts, and ModifyKey protection. When a stored ticket exists, you'll be prompted before the first submission (see [Pre-submission ticket prompt](#pre-submission-ticket-prompt)).
1844
1881
 
1845
- #### `.dbo/deploy_config.json` manifest
1882
+ #### `.app/deploy_config.json` manifest
1846
1883
 
1847
- Create a `.dbo/deploy_config.json` file to define named deployments:
1884
+ Create a `.app/deploy_config.json` file to define named deployments:
1848
1885
 
1849
1886
  ```json
1850
1887
  {
@@ -1891,10 +1928,10 @@ This replaces the curl commands typically embedded in `package.json` scripts.
1891
1928
 
1892
1929
  #### Automatic deploy config generation
1893
1930
 
1894
- When you run `dbo clone` or `dbo add`, each companion file (CSS, JS, HTML, SQL, etc.) is automatically registered in `.dbo/deploy_config.json` under an `<extension>:<name>` key — no manual authoring needed:
1931
+ When you run `dbo clone` or `dbo adopt`, each companion file (CSS, JS, HTML, SQL, etc.) is automatically registered in `.app/deploy_config.json` under an `<extension>:<name>` key — no manual authoring needed:
1895
1932
 
1896
1933
  ```bash
1897
- dbo clone # → .dbo/deploy_config.json auto-populated with one entry per companion file
1934
+ dbo clone # → .app/deploy_config.json auto-populated with one entry per companion file
1898
1935
  ```
1899
1936
 
1900
1937
  Keys are derived as `<extension>:<basename>` from the companion file path. If two files share the same key, a parent directory segment is appended to disambiguate (`css:colors` and `css:admin/colors`). Entries include `entity` and `column` from the record metadata.
@@ -1912,9 +1949,9 @@ Entries are updated automatically on re-clone (path changes are reflected in pla
1912
1949
 
1913
1950
  When running `dbo deploy` (or any submission command) inside npm scripts or piped commands where stdin is not a TTY, the CLI automatically skips all interactive prompts and uses stored credentials:
1914
1951
 
1915
- - **Stored ticket** — auto-applied from `.dbo/ticketing.local.json`
1916
- - **ModifyKey** — auto-applied from `.dbo/config.json` (`AppModifyKey`)
1917
- - **User identity** — auto-applied from `.dbo/credentials.json`
1952
+ - **Stored ticket** — auto-applied from `.app/ticketing.local.json`
1953
+ - **ModifyKey** — auto-applied from `.app/config.json` (`AppModifyKey`)
1954
+ - **User identity** — auto-applied from `.app/credentials.json`
1918
1955
 
1919
1956
  If a required value is missing and no interactive prompt is possible, the command fails with a clear error message explaining how to set up the missing value.
1920
1957
 
@@ -1939,14 +1976,14 @@ To set up for non-interactive use:
1939
1976
 
1940
1977
  ## Script Hooks
1941
1978
 
1942
- Script hooks let you define build and push lifecycle commands in `.dbo/scripts.json`. Hooks run automatically during `dbo push` and can also be triggered independently with `dbo build` and `dbo run`.
1979
+ Script hooks let you define build and push lifecycle commands in `.app/scripts.json`. Hooks run automatically during `dbo push` and can also be triggered independently with `dbo build` and `dbo run`.
1943
1980
 
1944
1981
  ### Configuration Files
1945
1982
 
1946
1983
  | File | Tracked | Purpose |
1947
1984
  |------|---------|---------|
1948
- | `.dbo/scripts.json` | Yes | Shared hook definitions (committed to git) |
1949
- | `.dbo/scripts.local.json` | No | Per-user overrides (gitignored) |
1985
+ | `.app/scripts.json` | Yes | Shared hook definitions (committed to git) |
1986
+ | `.app/scripts.local.json` | No | Per-user overrides (gitignored) |
1950
1987
 
1951
1988
  ### Top-level Keys
1952
1989
 
@@ -1956,7 +1993,7 @@ Script hooks let you define build and push lifecycle commands in `.dbo/scripts.j
1956
1993
  | `targets` | Per-file or per-directory hooks (highest priority) |
1957
1994
  | `entities` | Per-entity-type hooks (e.g., `content`, `extension.control`) |
1958
1995
 
1959
- ### Example `.dbo/scripts.json`
1996
+ ### Example `.app/scripts.json`
1960
1997
 
1961
1998
  ```json
1962
1999
  {
@@ -2040,7 +2077,7 @@ dbo build
2040
2077
 
2041
2078
  ### `dbo run [script-name]`
2042
2079
 
2043
- Runs a named global script from `.dbo/scripts.json` (like `npm run`). Automatically runs `pre<name>` and `post<name>` scripts if defined.
2080
+ Runs a named global script from `.app/scripts.json` (like `npm run`). Automatically runs `pre<name>` and `post<name>` scripts if defined.
2044
2081
 
2045
2082
  ```bash
2046
2083
  # List all available scripts
@@ -2347,7 +2384,7 @@ The `dbo` CLI writes cookies in Netscape format (same as curl's `--cookie-jar`).
2347
2384
 
2348
2385
  ```bash
2349
2386
  dbo login
2350
- curl -b .dbo/cookies.txt https://my-domain.com/api/content/myUID
2387
+ curl -b .app/cookies.txt https://my-domain.com/api/content/myUID
2351
2388
  ```
2352
2389
 
2353
2390
  ---