Skip to content

box init

mrdulasolutions edited this page May 25, 2026 · 1 revision

box-init (on-prem variant)

Bootstrap a workspace on the local Box Drive mount. Folder-only — no Hub workspaces in this variant (Hubs require Box AI which isn't reachable air-gapped).

Usage

/box-init [workspace-name] [--team=<team>] [--parent=<relative-path>]

Examples:

  • /box-init — workspace named box-memory at the Box Drive root
  • /box-init my-vault --team=engineering — workspace plus team subtree
  • /box-init my-vault --parent=Projects — workspace under <mount>/Projects/my-vault

What it does

  1. Verify backend via box-drive-detect. If mount missing or unwritable, surface error and stop. Never escalates to network.
  2. Resolve path at <box_drive_mount>/<parent>/<workspace-name>
  3. Check existing — if _box-memory.json exists, don't overwrite. Offer use-existing / alongside / re-init (confirm twice for last).
  4. Create folders via mkdir -p: memories/, files/, companions/ (folder layout), teams/<default>/memories/, teams/<default>/files/
  5. Acquire workspace lock (Schema — lockfile protocol)
  6. Write _box-memory.json with backend: local, local_backend: {...}, default settings
  7. Seed _index.json in every memory-holding folder
  8. Release lock
  9. Write workspace README at the workspace root
  10. Report — name, path, default team, settings; suggest /box-write as the next step

Workspace config defaults

backend: local
local_backend: { ...from box-drive-detect... }
tier: personal     # no API probe available; declare manually if Business+
capabilities:
  custom_metadata_templates: false
  body_search: false
  metadata_query_api: false
  retention_policies: false
  legal_holds: false
  compliance: []
settings:
  default_team: default
  companion_layout: sibling
  include_superseded_in_recall: false
  rebuild_index_on_drift: true
  # Compliance declaration (optional)
  compliance_target: null
  box_plan: null
  box_addons: []
  box_zone: null
  baa_signed: null

Differences from cloud variant

  • No tier probing — no Box API. User declares tier-relevant fields if needed.
  • No metadata template creation — Box API operation; air-gap incompatible.
  • No --as-hub flag — Box Hubs require Box AI.
  • file_id is null in index entries — Box Drive assigns Box file IDs only after sync. local_path (relative to workspace root) is the canonical key.
  • workspace_owner_app: "box-memory-onprem" in config — explicit which variant created it.

Errors

  • Box Drive not detected → see box-drive-detect guidance
  • Mount not writable → check Box Drive is running and signed in
  • Lock cannot be acquired after retries → another writer is active; /box-index-rebuild to inspect for stale locks

Idempotency

Re-running with the same name is safe: re-use existing folders, never overwrites _box-memory.json without confirmation, preserves existing _index.json content.

See also

Clone this wiki locally