dr-cli command reference

Generated from --help output — version 1.6.139, 2026-10-15.

dr

Usage: dr [options] [command]

Datarails CLI

Options:
  -v, --version                            print the dr version and exit
  -h, --help                               display help for command

Commands:
  login [options]                          Authenticate with a Datarails server, via browser or a stored API key
  login-as [options] <email>               Impersonate a user via JWT (requires an operator `dr login` first)
  whoami [options]                         Show the identity encoded in the stored JWT for a server
  logout [options]                         Remove saved credentials for a Datarails server
  devices                                  Operations on Datarails devices (IT device inventory — Badge client machines)
  features                                 Operations on Datarails feature flags (read-only listings + per-org toggle)
  users                                    Inspect Datarails users (via /api/it/users), set sync-service passwords, and bulk-create users from a CSV
  organizations|orgs                       Inspect and create Datarails organizations (via /api/it/organizations)
  support-manager|sm                       Support Manager Control Panel — list orgs the active account supports (via /api/it/manager_screen/data)
  templates                                Operations on Datarails templates (data sources)
  data-models                              Operations on Datarails data models (groups of tables)
  dashboards                               Operations on Datarails dashboards
  folders                                  Operations on Datarails folders (dashboard / story picker-tree)
  dynamic-ranges                           Operations on Datarails dynamic ranges (template saved views)
  functions                                Operations on Datarails template functions
  semantictables|semtables                 Business-alias view of tables (finance-os semantic layer)
  odata                                    Read tables over OData V1 exactly as Excel / Power BI / SQLConnector receive them (read-only)
  storyboards                              Operations on Datarails storyboards (story-tell presentations)
  extables                                 Operations on Datarails ExTables (template-derived computed tables)
  lut|lookups                              Operations on Datarails LUTs (lookup-table documents)
  scans                                    Read scan status for a Datarails table
  rescan                                   Trigger a full rescan of a Datarails table
  reports                                  Operations on Datarails Financials reports (P&L, Balance Sheet, etc.)
  budget-builder                           Budget Builder report operations: rebuild/preview (tree_to_report), custom-row validation, and save to Budget management. Note: Excel export is not covered yet (no xlsx transfer was observed behind "Save & Download as Excel").
  dataflow                                 Inspect a template's dataflow graph (source/center/target)
  metrics                                  Operations on Datarails KPIs (finance-os metrics)
  fx                                       Foreign exchange: rates (read) and FX configuration — posting/reporting fields, currency-aware widgets and Excel functions
  error-enrichments                        Manage integration error-enrichment rules (per-server admin surface)
  skill                                    Print or install the AI-assistant skills bundled with this binary (Claude Code always; Gemini CLI when ~/.gemini exists; per-project Gemini+Codex via `init-project`)
  datamappers                              Operations on Datarails datamappers (extraction configs)
  mapper-recipes                           Operate on the mapper-recipe library (saved/reusable mapper-config templates the FE's "Saved mappers" / "Save mapper to library" modals back). Three subcommands: list, get, save.
  documents                                Document-level operations (support API toggle, calculate, Budget Management split)
  integrations|integration                 Customer-integration triage (NetSuite, Salesforce, QuickBooks, etc.)
  connectors                               Publish/repoint/inspect connectors on the control-plane (VPN)
  filebox|fileboxes                        Operations on Datarails fileboxes (documents) and their versions
  widgets|widget                           Operations on Datarails dashboard widgets
  reconciliation|recon                     Reconciliation (MEC) — read-only commands
  validate                                 Validate Datarails-generated artifacts against source files
  mec                                      Month-end close (MEC) configuration
  workflow                                 Datarails workflows v2 (non-MEC) — templates, processes, steps, tasks, members
  cash                                     Datarails cash module — currencies, transactions, rules
  update                                   Update dr-cli in place by re-running the canonical npm install. On a `pnpm link --global` dev install this will replace the link with the published version.
  entities|companies                       Datarails entities (companies) management — wraps /bo/pre_kickoff/* + a few /api/* lifecycle calls.
  calcmodels|calc-models                   Operate on a tenant's Calculation Models
  calc-vals|calcvals                       Operate on a table's Calculated Values (per-template; Setup → Tables → Calculated values)
  forecast                                 Operate on forecast scenario cycles and planning scenarios
  collection-processes|collection-process  Operate on Datarails Collection Processes (COLLECTION buckets)
  kb                                       Datarails Help Center search and browsing. Use this BEFORE running other dr commands when the user describes a problem in product terms ("reconciliation isn't pairing", "FX translation looks off") rather than dr-cli terms. KB is global content, not tenant-specific — no --server flag.
  mcp                                      Manage MCP servers exposed by dr-cli. Most users don't need this — the standard installer auto-registers all bundled MCPs.
  spend-control                            Operate on a tenant's Spend Control product
  rh_config                                Read-only inspection of the legacy RH_CONFIG plumbing (config workbooks + templates flagged is_rh_config). RH_CONFIG is legacy — see HippiWeb/Documents/utils_cython.py:72.
  multi-product                            Multi-product service — product-content catalog + per-org assignment (/api/multi-product/v1/...).
  desk                                     Desk outbound-email onboarding - teams, SMTP app passwords, SendGrid domain auth (/api/desk/v1/teams/...). Every verb is org-scoped from the token: the org comes from --server/--account, never from an argument.
  palettes                                 Operations on Datarails widget color palettes (per-org)
  app-space                                Build and deploy App Space apps.
  help [command]                           display help for command

dr app-space

Usage: dr app-space [options] [command]

Build and deploy App Space apps.

Options:
  -h, --help                       display help for command

Commands:
  whoami [options]                 Show the identity App Space resolves for
                                   you.
  list [options]                   List this tenant's apps (add --drafts for
                                   your own drafts).
  tables [options]                 List the tables this tenant's apps own, with
                                   their columns and owner app (to share one,
                                   connect to it).
  scaffold [options] [name] [dir]  Write a starter contract.json into a folder,
                                   ready to compile.
  get [options] <app-id>           Write an app into a folder you can edit.
  logs [options] <app-id>          Read an app's recent diagnostic log, newest
                                   first.
  try [options] <handler>          Run one handler against the app's real ctx,
                                   using the code on disk, without publishing.
  preview [options] <file>         Serve a dashboard's SPEC rows on the tenant
                                   as you, before any app exists, and print
                                   each card's figure. Reads only; pushes
                                   nothing.
  test [options] [dir]             Run the handler fixtures, then drive the
                                   pushed UI and report what broke.
  push [options] [dir]             Push a folder to App Space as a draft.
  contract [options] [dir]         Extract the app contract from a folder,
                                   offline.
  compile [options] [dir]          Compile contract.json into the package, and
                                   prove it round-trips.
  ship [options] [dir]             Assemble, compile, push and prove a
                                   dashboard pass; print the update block the
                                   reply ends with.
  eject [options] <target>         Make a compiled handler, source, page or
                                   element the author’s file: handler:<name>,
                                   source:<name>, page:<ui/path.html> or
                                   element:<uid>.
  publish [options] <app-id>       Make a draft visible to the whole tenant
                                   (admin only).
  unpublish [options] <app-id>     Return a published app to draft (admin
                                   only).
  help [command]                   display help for command

dr app-space compile

Usage: dr app-space compile [options] [dir]

Compile contract.json into the package, and prove it round-trips.

Options:
  --check                 Validate, compile and round-trip into a scratch
                          folder, and verify — everything a push runs first.
                          Write nothing.
  --push                  Push the compiled package, contract attached.
  --seed <file>           Seed rows, as JSON. Forwarded to the push.
  --catalog <file>        Check source ids against this catalog instead of the
                          tenant.
  --force                 Write over files this compiler did not write (never a
                          custom handler, custom module or owned page).
  --update-block          After a push that passed, print the
                          appspace_app_update block a build reply ends with.
  --draft <file>          Assemble contract.json from this SPEC draft
                          (repeatable; a file may hold {"drafts": [...]}, one
                          per page).
  --skeleton <file>       The dashboard's skeleton, where no draft carries one
                          as "skeleton".
  --app-id <id>           The app a contract assembled from a skeleton is for.
  --expect <card=figure>  A figure a card must show once the package runs, as
                          confirmed (repeatable).
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space contract

Usage: dr app-space contract [options] [dir]

Extract the app contract from a folder, offline.

Options:
  --check     Fail (exit 1) if the contract reports problems or unresolved
              values.
  --json      Emit raw JSON to stdout instead of a pretty render.
  -h, --help  display help for command

dr app-space eject

Usage: dr app-space eject [options] <target>

Make a compiled handler, source, page or element the author’s file:
handler:<name>, source:<name>, page:<ui/path.html> or element:<uid>.

Options:
  --dir <dir>  The app folder (default: the current directory).
  --json       Emit raw JSON to stdout instead of a pretty render.
  -h, --help   display help for command

dr app-space get

Usage: dr app-space get [options] <app-id>

Write an app into a folder you can edit.

Options:
  --dir <path>            Where to write it. Defaults to a fresh temporary
                          directory.
  --force                 Replace files the compile record lists as yours even
                          when they were never pushed.
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space list

Usage: dr app-space list [options]

List this tenant's apps (add --drafts for your own drafts).

Options:
  --drafts                Show your drafts instead of published apps.
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space logs

Usage: dr app-space logs [options] <app-id>

Read an app's recent diagnostic log, newest first.

Options:
  --limit <n>             How many entries (max 200). (default: "20")
  --level <level>         Only entries at this level
                          (debug|info|warning|error).
  --detail                Include each entry's detail (a crash's full
                          traceback).
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space preview

Usage: dr app-space preview [options] <file>

Serve a dashboard's SPEC rows on the tenant as you, before any app exists, and
print each card's figure. Reads only; pushes nothing.

Options:
  --payload <json>        The request to serve (default: {"op": "load"}).
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space publish

Usage: dr app-space publish [options] <app-id>

Make a draft visible to the whole tenant (admin only).

Options:
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space push

Usage: dr app-space push [options] [dir]

Push a folder to App Space as a draft.

Options:
  --publish               Publish it too (needs an admin role).
  --seed <file>           Seed rows, as JSON. Only fills empty tables.
  --force                 Push even if the app changed since you fetched it.
  --no-contract           Do not extract and attach the app contract.
  --kit <asset>           The builder kit that made this app, e.g.
                          appspace-app-kit@12 (default: $DR_APPSPACE_KIT).
                          Recorded as the contract row's kit_version; omitted
                          when neither is set.
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space scaffold

Usage: dr app-space scaffold [options] [name] [dir]

Write a starter contract.json into a folder, ready to compile.

Options:
  --id <app-id>           The app id. Default: a fresh one.
  --kind <kind>           dashboard or app. Default: app. dashboard (a page of
                          cards reading FinanceOS metrics — owns no data); app
                          (a table of its own, a form that writes to it and a
                          list that reads it back). (default: "app")
  --table <name>          The table an app owns. Default: records. A dashboard
                          owns none.
  --record <name>         One row of it, singular. Default: derived from
                          --table.
  --force                 Write into a folder that already has files in it.
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space ship

Usage: dr app-space ship [options] [dir]

Assemble, compile, push and prove a dashboard pass; print the update block the
reply ends with.

Options:
  --seed <file>           Seed rows, as JSON. Forwarded to the push.
  --force                 Write over files this compiler did not write (never a
                          custom handler). Refused with --onto-live.
  --onto-live             Land this pass's cards on the app as it is live now,
                          keeping every card already there: pull it, add them,
                          push against its revision, and start over when
                          another push lands first. Needs --app-id and
                          --skeleton, and a folder of its own.
  --draft <file>          Assemble contract.json from this SPEC draft
                          (repeatable; a file may hold {"drafts": [...]}, one
                          per page).
  --skeleton <file>       The dashboard's skeleton, where no draft carries one
                          as "skeleton".
  --app-id <id>           The app a contract assembled from a skeleton is for.
  --expect <card=figure>  A figure a card must show once the package runs, as
                          confirmed (repeatable).
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space tables

Usage: dr app-space tables [options]

List the tables this tenant's apps own, with their columns and owner app (to
share one, connect to it).

Options:
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space test

Usage: dr app-space test [options] [dir]

Run the handler fixtures, then drive the pushed UI and report what broke.

Options:
  --fixtures <path>        The fixtures file (default: <dir>/tests.json).
  --skip-ui                Handlers only.
  --skip-handlers          UI smoke check only.
  --token <value>          Put this on the preview URL as ?token=. Omit for a
                           URL with no token, which is what a
                           cookie-authenticated load looks like.
  --ui-timeout <ms>        How long the page may keep working. (default:
                           "15000")
  --interact-timeout <ms>  How long ONE submitted form or clicked action may
                           take. Longer than --ui-timeout on purpose: an
                           interaction runs a real write, and a handler that
                           reads a document through a model is not a 10s
                           handler. (default: "30000")
  --pages <list>           Which pages to load: "all" (the default), or a
                           comma-separated list of files under ui/, e.g.
                           "index.html,invoices.html".
  --interact <when>        Submit each page’s forms and click its actions:
                           "auto" (the default — only for a draft, whose data
                           lives in a disposable scratch schema), "always", or
                           "never". "never" stops this rung only: every
                           tests.json case still runs its handler, and a case
                           that calls a writing handler still writes. To touch
                           nothing, add --skip-handlers. (default: "auto")
  --as <role>              Draw every page and run every handler case as this
                           declared app role (the preview's "view as"; owner
                           only). Default: each page as you, and again as each
                           role its components are gated to that yours does not
                           see; each case as you, or as a role its requiresRole
                           lets through.
  --strict                 Exit 1 when the Findings section lists anything. By
                           default findings are reported and never change the
                           exit code.
  --clean-up               Remove every test row the run finds — a value marked
                           "app-space test" from any run, and every row this
                           run wrote — on any stage. By default a run removes
                           only the rows it wrote itself, and only on a draft.
  --keep-test-rows         Keep the rows this run wrote, even on a draft.
  --contract               Fold the rendered page's data-dr-* components into
                           .appspace/contract.json, so the record says what the
                           app DREW as well as what it declares.
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --app-space-host <url>   Override the App Space base URL. Falls back to
                           DR_APP_SPACE_HOST.
  --json                   Emit raw JSON to stdout instead of a pretty render.
  -h, --help               display help for command

dr app-space try

Usage: dr app-space try [options] <handler>

Run one handler against the app's real ctx, using the code on disk, without
publishing.

Options:
  --dir <path>            The app folder (default: current directory).
                          (default: ".")
  --payload <json>        JSON payload for the handler, or @<path> to read it
                          from a JSON file (relative to the working directory).
                          (default: "{}")
  --file <field[=path]>   Upload a file and hand it to the handler as
                          {"<field>": {"upload": "…"}}, as the page does. A
                          bare <field> uses the built-in sample invoice PDF;
                          <field>=<path> uploads that file (relative to the
                          working directory). Repeatable. (default: [])
  --as <role>             Run it as this declared app role, as the preview's
                          "view as" does: ctx.role, the requiresRole gate and
                          row scoping are that role's. Owner only. Default: the
                          role you hold on the app.
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space unpublish

Usage: dr app-space unpublish [options] <app-id>

Return a published app to draft (admin only).

Options:
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr app-space whoami

Usage: dr app-space whoami [options]

Show the identity App Space resolves for you.

Options:
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --app-space-host <url>  Override the App Space base URL. Falls back to
                          DR_APP_SPACE_HOST.
  --json                  Emit raw JSON to stdout instead of a pretty render.
  -h, --help              display help for command

dr budget-builder

Usage: dr budget-builder [options] [command]

Budget Builder report operations: rebuild/preview (tree_to_report), custom-row
validation, and save to Budget management. Note: Excel export is not covered
yet (no xlsx transfer was observed behind "Save & Download as Excel").

Options:
  -h, --help              display help for command

Commands:
  build [options]         Rebuild/preview the report from a definition file
                          (PUT tree_to_report — the call behind every UI
                          change)
  validate-row [options]  Validate a custom row formula against the report (PUT
                          validate_custom_value) without changing anything
  add-row [options]       Validate a custom row, merge it into calculatedRows,
                          and rebuild the report (validate_custom_value +
                          tree_to_report)
  save [options]          Persist the report definition as a saved document in
                          Budget management (POST /api/exreports/reports).
                          Excel download is NOT part of this call — see the
                          command group help.
  help [command]          display help for command

dr budget-builder add-row

Usage: dr budget-builder add-row [options]

Validate a custom row, merge it into calculatedRows, and rebuild the report
(validate_custom_value + tree_to_report)

Options:
  --payload-file <path>      JSON file with the report definition (the
                             tree_to_report envelope)
  --design <style>           Layout style: compact | tabular | repetitive
                             (default: repetitive)
  --legacy-design            Use the LEGACY rendering (sets
                             options.standardDesign=true on the wire; by
                             default the CLI always enables "New design", i.e.
                             standardDesign=false) (default: false)
  --option <key=value>       Set an options.* key (repeatable), e.g. --option
                             rowsTotal=true --option colsZeroSuppress=false
                             (default: [])
  --timeframe-label <label>  Set selected_timeframe_label (the "Actuals ending"
                             period label)
  --name <name>              Custom row name
  --formula <formula>        Row formula using bracket-wrapped ROW-NAME refs,
                             e.g. "[1000 Cash]*2" (period labels like [Feb-26]
                             are rejected)
  --format <format>          Display format for the row (default: '#,###')
  --position <row-name>      Name of the EXISTING row to place this one next to
                             — `budget-builder build` prints the valid anchor
                             names (an empty/omitted anchor is rejected by the
                             server with "Position does not exist in choices.")
  --before                   Place the row BEFORE the --position anchor
                             (default: after) (default: false)
  --out-file <path>          Write the UPDATED definition (with the new row) to
                             this file — pass it to `dr budget-builder save` to
                             persist
  --json                     Output the raw rebuilt report JSON (default:
                             false)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr budget-builder build

Usage: dr budget-builder build [options]

Rebuild/preview the report from a definition file (PUT tree_to_report — the
call behind every UI change)

Options:
  --payload-file <path>      JSON file with the report definition (the
                             tree_to_report envelope)
  --design <style>           Layout style: compact | tabular | repetitive
                             (default: repetitive)
  --legacy-design            Use the LEGACY rendering (sets
                             options.standardDesign=true on the wire; by
                             default the CLI always enables "New design", i.e.
                             standardDesign=false) (default: false)
  --option <key=value>       Set an options.* key (repeatable), e.g. --option
                             rowsTotal=true --option colsZeroSuppress=false
                             (default: [])
  --timeframe-label <label>  Set selected_timeframe_label (the "Actuals ending"
                             period label)
  --out-file <path>          Write the SERVER RESPONSE (the rebuilt report
                             tree) to this file — unlike add-row, where
                             --out-file holds the updated definition
  --json                     Output the raw rebuilt report JSON (default:
                             false)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr budget-builder save

Usage: dr budget-builder save [options]

Persist the report definition as a saved document in Budget management (POST
/api/exreports/reports). Excel download is NOT part of this call — see the
command group help.

Options:
  --payload-file <path>      JSON file with the report definition (the
                             tree_to_report envelope)
  --design <style>           Layout style: compact | tabular | repetitive
                             (default: repetitive)
  --legacy-design            Use the LEGACY rendering (sets
                             options.standardDesign=true on the wire; by
                             default the CLI always enables "New design", i.e.
                             standardDesign=false) (default: false)
  --option <key=value>       Set an options.* key (repeatable), e.g. --option
                             rowsTotal=true --option colsZeroSuppress=false
                             (default: [])
  --timeframe-label <label>  Set selected_timeframe_label (the "Actuals ending"
                             period label)
  --timeout <ms>             Polling budget in milliseconds while the server
                             answers "still running" (orgs with large-reports
                             support process the write on a worker) (default:
                             "60000")
  --json                     Output the raw server response JSON (default:
                             false)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr budget-builder validate-row

Usage: dr budget-builder validate-row [options]

Validate a custom row formula against the report (PUT validate_custom_value)
without changing anything

Options:
  --payload-file <path>      JSON file with the report definition (the
                             tree_to_report envelope)
  --design <style>           Layout style: compact | tabular | repetitive
                             (default: repetitive)
  --legacy-design            Use the LEGACY rendering (sets
                             options.standardDesign=true on the wire; by
                             default the CLI always enables "New design", i.e.
                             standardDesign=false) (default: false)
  --option <key=value>       Set an options.* key (repeatable), e.g. --option
                             rowsTotal=true --option colsZeroSuppress=false
                             (default: [])
  --timeframe-label <label>  Set selected_timeframe_label (the "Actuals ending"
                             period label)
  --name <name>              Custom row name
  --formula <formula>        Row formula using bracket-wrapped ROW-NAME refs,
                             e.g. "[1000 Cash]*2" (period labels like [Feb-26]
                             are rejected)
  --format <format>          Display format for the row (default: '#,###')
  --position <row-name>      Name of the EXISTING row to place this one next to
                             — `budget-builder build` prints the valid anchor
                             names (an empty/omitted anchor is rejected by the
                             server with "Position does not exist in choices.")
  --before                   Place the row BEFORE the --position anchor
                             (default: after) (default: false)
  --json                     Output the raw validation response JSON (default:
                             false)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr calc-vals

Usage: dr calc-vals|calcvals [options] [command]

Operate on a table's Calculated Values (per-template; Setup → Tables →
Calculated values)

Options:
  -h, --help             display help for command

Commands:
  list [options]         List the calculated values on a table
  get [options] <id>     Get one calculated value by ID (filters the list — the
                         BE has no per-id GET)
  create [options]       Create a calculated value. Use --name + --formula
                         (field defaults to {DR_CVS}, accepted for every
                         formula incl. account-group), or --file for a full
                         JSON body. Formula refs look like
                         ["{Category}.Revenue"] joined by + - * /.
  update [options] <id>  Update a calculated value (read-modify-write). Splice
                         --name/--formula/--format onto the existing value, or
                         pass --file for a full body. Flag mode leaves the
                         value's FE "From" source untouched; use --file to
                         change it.
  delete [options] <id>  Delete a calculated value permanently (two-step
                         confirm)
  help [command]         display help for command

dr calc-vals create

Usage: dr calc-vals create [options]

Create a calculated value. Use --name + --formula (field defaults to {DR_CVS},
accepted for every formula incl. account-group), or --file for a full JSON
body. Formula refs look like ["{Category}.Revenue"] joined by + - * /.

Options:
  --table <id>        Table/template ID (required)
  --name <name>       Calculated value name
  --formula <expr>    Formula expression (e.g. '["{DR_CVS}.Gross"]')
  --format <mask>     Number-format mask (e.g. "####.##%")
  --file <path>       Path to a full JSON body (mutually exclusive with
                      --name/--formula/--format)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr calc-vals delete

Usage: dr calc-vals delete [options] <id>

Delete a calculated value permanently (two-step confirm)

Arguments:
  id                       calc value id

Options:
  --table <id>             Table/template ID (required)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr calc-vals get

Usage: dr calc-vals get [options] <id>

Get one calculated value by ID (filters the list — the BE has no per-id GET)

Arguments:
  id                  calc value id

Options:
  --table <id>        Table/template ID (required)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr calc-vals list

Usage: dr calc-vals list [options]

List the calculated values on a table

Options:
  --table <id>        Table/template ID (required)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr calc-vals update

Usage: dr calc-vals update [options] <id>

Update a calculated value (read-modify-write). Splice --name/--formula/--format
onto the existing value, or pass --file for a full body. Flag mode leaves the
value's FE "From" source untouched; use --file to change it.

Arguments:
  id                  calc value id

Options:
  --table <id>        Table/template ID (required)
  --name <name>       New name
  --formula <expr>    New formula expression
  --format <mask>     New number-format mask (e.g. "####.##%"); pass "" to
                      clear it
  --file <path>       Path to a full JSON body (mutually exclusive with
                      --name/--formula/--format)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr calcmodels

Usage: dr calcmodels|calc-models [options] [command]

Operate on a tenant's Calculation Models

Options:
  -h, --help                  display help for command

Commands:
  list [options]              List calc models on this tenant (org-wide; no
                              per-table scoping)
  get [options] <id>          Get a single calc model by ID (filters from list
                              — BE has no per-id GET)
  create [options]            Create a calc model from a JSON body file (POST
                              /api/templates/calcmodels). Capture a body from
                              the FE wizard's network tab; the shape is
                              type-specific. Fixtures live in
                              src/__test__/fixtures/calcmodel-create-*.json.
  update [options] <id>       Update a calc model from a JSON body file (PUT
                              /api/templates/<id>/calcmodels). Full body, not
                              partial PATCH — read-modify-write.
  set-flow [options] <id>     Toggle update flow between Auto and Daily
                              (two-step confirm). Read-modify-write — same PUT
                              path as update. TOCTOU window between plan and
                              confirm: a concurrent edit during that window
                              will be silently overwritten by this command (the
                              BE exposes no ETag/If-Match). Coordinate before
                              confirming.
  recalculate [options] <id>  Retrigger the BE recalc task by re-PUTing the
                              model unchanged (two-step confirm). The BE fires
                              a Celery task on every PUT; no force flag exists
                              on the wire. TOCTOU window between plan and
                              confirm: a concurrent edit during that window
                              will be silently overwritten when this PUT lands
                              (the BE exposes no ETag/If-Match). Coordinate
                              before confirming.
  delete [options] <id>       Delete a calc model permanently (two-step
                              confirm)
  help [command]              display help for command

dr calcmodels create

Usage: dr calcmodels create [options]

Create a calc model from a JSON body file (POST /api/templates/calcmodels).
Capture a body from the FE wizard's network tab; the shape is type-specific.
Fixtures live in src/__test__/fixtures/calcmodel-create-*.json.

Options:
  --file <path>       Path to a JSON file containing the create body
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr calcmodels delete

Usage: dr calcmodels delete [options] <id>

Delete a calc model permanently (two-step confirm)

Arguments:
  id                       calc model id

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr calcmodels get

Usage: dr calcmodels get [options] <id>

Get a single calc model by ID (filters from list — BE has no per-id GET)

Arguments:
  id                  calc model id

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr calcmodels list

Usage: dr calcmodels list [options]

List calc models on this tenant (org-wide; no per-table scoping)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr calcmodels recalculate

Usage: dr calcmodels recalculate [options] <id>

Retrigger the BE recalc task by re-PUTing the model unchanged (two-step
confirm). The BE fires a Celery task on every PUT; no force flag exists on the
wire. TOCTOU window between plan and confirm: a concurrent edit during that
window will be silently overwritten when this PUT lands (the BE exposes no
ETag/If-Match). Coordinate before confirming.

Arguments:
  id                       calc model id

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           mutate (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr calcmodels set-flow

Usage: dr calcmodels set-flow [options] <id>

Toggle update flow between Auto and Daily (two-step confirm). Read-modify-write
— same PUT path as update. TOCTOU window between plan and confirm: a concurrent
edit during that window will be silently overwritten by this command (the BE
exposes no ETag/If-Match). Coordinate before confirming.

Arguments:
  id                       calc model id

Options:
  --flow <kind>            Auto | Daily (case-insensitive)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           mutate (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr calcmodels update

Usage: dr calcmodels update [options] <id>

Update a calc model from a JSON body file (PUT /api/templates/<id>/calcmodels).
Full body, not partial PATCH — read-modify-write.

Arguments:
  id                  calc model id

Options:
  --file <path>       Path to a JSON file containing the update body
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr cash

Usage: dr cash [options] [command]

Datarails cash module — currencies, transactions, rules

Options:
  -h, --help                             display help for command

Commands:
  currencies                             Cash currencies — supported codes and per-org preferences
  transactions [options] <template>      Paginated cash transactions for a template (PUT /templates/<id>/transactions)
  rescan-rules [options] <template>      Trigger a rescan of the template's cash-categorisation rules (POST /rules/rescan)
  rules                                  Cash-categorisation rules — list/get/create/update/delete/reorder/export-csv
  tags                                   Cash transaction tags — the category vocabulary rules output to
  hidden-rules                           Per-transaction manual-override rules. No list/get on the server — use `cash rules get <template> <rule_id>` if you know the numeric id.
  set-default-currency [options] <code>  Set or clear the operator's default cash currency (PATCH /api/it/users/profile {cash_currency})
  help [command]                         display help for command

dr cash currencies

Usage: dr cash currencies [options] [command]

Cash currencies — supported codes and per-org preferences

Options:
  -h, --help           display help for command

Commands:
  list [options]       List server-supported currency codes (ISO + crypto)
  prefs [options]      Show the active org's currency-preference list
  set-prefs [options]  Replace the active org's currency-preference list
                       (admin-only PUT)
  help [command]       display help for command

dr cash currencies list

Usage: dr cash currencies list [options]

List server-supported currency codes (ISO + crypto)

Options:
  --detailed          Include the full_name for each code (server adds
                      ?detailed=true) (default: false)
  --json              Output raw JSON instead of a list (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr cash currencies prefs

Usage: dr cash currencies prefs [options]

Show the active org's currency-preference list

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr cash currencies set-prefs

Usage: dr cash currencies set-prefs [options]

Replace the active org's currency-preference list (admin-only).

Server uppercases and dedupes the codes; we send the operator input
verbatim and let the server canonicalise.

Options:
  --currencies <list>  Comma-separated currency codes (e.g. USD,EUR,GBP)
  --json               Output the patched list as JSON (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr cash hidden-rules

Usage: dr cash hidden-rules [options] [command]

Per-transaction manual-override rules. No list/get on the server — use `cash
rules get <template> <rule_id>` if you know the numeric id.

Options:
  -h, --help                   display help for command

Commands:
  upsert [options] <template>  Upsert hidden rules keyed by
                               customer_transaction_id (two-step confirm;
                               create-or-update)
  delete [options] <template>  Delete hidden rules by customer_transaction_id
                               list (two-step confirm; server returns 204 even
                               on misses)
  help [command]               display help for command

dr cash hidden-rules delete

Usage: dr cash hidden-rules delete [options] <template>

Delete hidden rules by customer_transaction_id list (two-step confirm; server
returns 204 even on misses)

Arguments:
  template               numeric template id OR alias (bank_balances |
                         bank_transactions)

Options:
  --transactions <list>  Comma-separated customer_transaction_id values to
                         delete
  --confirm-token <tok>  Token from a prior plan run — required to actually
                         delete
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr cash hidden-rules upsert

Usage: dr cash hidden-rules upsert [options] <template>

Upsert hidden rules keyed by customer_transaction_id (two-step confirm;
create-or-update)

Arguments:
  template               numeric template id OR alias (bank_balances |
                         bank_transactions)

Options:
  --file <path>          Path to JSON array of upsert entries; each must
                         include customer_transaction_id + conditions
  --confirm-token <tok>  Token from a prior plan run — required to actually
                         upsert
  --json                 Output the upserted rules array as JSON (default:
                         false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr cash rescan-rules

Usage: dr cash rescan-rules [options] <template>

Trigger a rescan of the template's cash-categorisation rules (POST
/rules/rescan)

Arguments:
  template            numeric template id OR alias (bank_balances |
                      bank_transactions)

Options:
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr cash rules

Usage: dr cash rules [options] [command]

Cash-categorisation rules — list/get/create/update/delete/reorder/export-csv

Options:
  -h, --help                             display help for command

Commands:
  list [options] <template>              List cash-categorisation rules for a template
  get [options] <template> <rule_id>     Show one cash-categorisation rule
  create [options] <template>            Create one rule (object) or many (array) from a JSON file. Server accepts both shapes natively.
  update [options] <template> <rule_id>  Update a rule from a JSON file (full body — PUT is replace, two-step confirm)
  delete [options] <template> <rule_id>  Delete a cash-categorisation rule (two-step confirm)
  delete-all [options] <template>        Bulk-delete cash rules on a template under a single two-step confirm (gap #40).
  reorder [options] <template>           Reorder rules atomically. Pass --file <path> with {rules:[{id,order}]}, or --order id:n,id:n,…
  import-csv [options] <template>        Bulk-import rules from a `cash rules export-csv` output file (inverse of export-csv).
  export-csv [options] <template>        Export the template's rules as CSV. Default writes ./rules_<template>.csv; pass -o - for stdout.
  ai-trigger [options]                   Trigger async AI rule generation on bank_transactions (support-user only; gated by cash_ai_rules; two-step confirm with preflight)
  help [command]                         display help for command

dr cash rules ai-trigger

Usage: dr cash rules ai-trigger [options]

Trigger async AI rule generation on bank_transactions (support-user only; gated
by cash_ai_rules; two-step confirm with preflight)

Options:
  --confirm-token <tok>  Token from a prior plan run — required to actually
                         trigger
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr cash rules create

Usage: dr cash rules create [options] <template>

Create one rule (object) or many (array) from a JSON file. Server accepts both
shapes natively.

Arguments:
  template            numeric template id OR alias (bank_balances |
                      bank_transactions)

Options:
  --file <path>       Path to rule JSON file (object or array)
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr cash rules delete

Usage: dr cash rules delete [options] <template> <rule_id>

Delete a cash-categorisation rule (two-step confirm)

Arguments:
  template               numeric template id OR alias (bank_balances |
                         bank_transactions)
  rule_id                numeric rule id (positive integer)

Options:
  --confirm-token <tok>  Token from a prior plan run — required to actually
                         delete
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr cash rules delete-all

Usage: dr cash rules delete-all [options] <template>

Bulk-delete cash rules on a template under a single two-step confirm (gap #40).

Arguments:
  template               numeric template id OR alias (bank_balances |
                         bank_transactions)

Options:
  --all                  Delete every active+inactive rule (combine with
                         --include-archived for all) (default: false)
  --include-archived     Also include archived rules; only valid with --all
                         (default: false)
  --ids <list>           Comma-separated rule ids (mutually exclusive with
                         --all)
  --confirm-token <tok>  Token from a prior plan run — required to actually
                         delete
  --quiet                Suppress per-row [i/N] progress lines on stderr
                         (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr cash rules export-csv

Usage: dr cash rules export-csv [options] <template>

Export the template's rules as CSV. Default writes ./rules_<template>.csv; pass
-o - for stdout.

Arguments:
  template             numeric template id OR alias (bank_balances |
                       bank_transactions)

Options:
  --archived           Export archived rules instead of active+inactive
                       (default: false)
  -o, --output <path>  Output file path (- for stdout)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr cash rules get

Usage: dr cash rules get [options] <template> <rule_id>

Show one cash-categorisation rule

Arguments:
  template            numeric template id OR alias (bank_balances |
                      bank_transactions)
  rule_id             numeric rule id (positive integer)

Options:
  --json              Output raw JSON instead of a detail view (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr cash rules import-csv

Usage: dr cash rules import-csv [options] <template>

Bulk-import rules from a `cash rules export-csv` output file (inverse of
export-csv).

Arguments:
  template            numeric template id OR alias (bank_balances |
                      bank_transactions)

Options:
  --file <path>       Path to the CSV file (export-csv shape)
  --json              Output raw JSON server response instead of a table
                      (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr cash rules list

Usage: dr cash rules list [options] <template>

List cash-categorisation rules for a template

Arguments:
  template            numeric template id OR alias (bank_balances |
                      bank_transactions)

Options:
  --archived          List archived rules instead of active+inactive (default:
                      false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr cash rules reorder

Usage: dr cash rules reorder [options] <template>

Reorder rules atomically. Pass --file <path> with {rules:[{id,order}]}, or
--order id:n,id:n,…

Arguments:
  template               numeric template id OR alias (bank_balances |
                         bank_transactions)

Options:
  --file <path>          JSON file with {rules:[{id,order}, …]}
  --order <list>         Inline shorthand, e.g. 101:1,102:2,103:3 — mutually
                         exclusive with --file
  --confirm-token <tok>  Token from a prior plan run — required to actually
                         reorder
  --json                 Output the {id: order} map as JSON (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr cash rules update

Usage: dr cash rules update [options] <template> <rule_id>

Update a rule from a JSON file (full body — PUT is replace, two-step confirm)

Arguments:
  template               numeric template id OR alias (bank_balances |
                         bank_transactions)
  rule_id                numeric rule id (positive integer)

Options:
  --file <path>          Path to rule JSON file
  --confirm-token <tok>  Token from a prior plan run — required to actually
                         update
  --json                 Output raw JSON instead of a summary (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr cash set-default-currency

Usage: dr cash set-default-currency [options] <code>

Set or clear the operator's default cash currency (PATCH /api/it/users/profile
{cash_currency})

Arguments:
  code                ISO/crypto currency code (e.g. USD); pass an empty string
                      to clear

Options:
  --json              Output the updated UserMe as JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr cash tags

Usage: dr cash tags [options] [command]

Cash transaction tags — the category vocabulary rules output to

Options:
  -h, --help                 display help for command

Commands:
  list [options] <template>  List distinct tags currently present in the
                             template's dr_acc_l3 field
  help [command]             display help for command

dr cash tags list

Usage: dr cash tags list [options] <template>

List distinct tags currently present in the template's dr_acc_l3 field

Arguments:
  template            numeric template id OR alias (bank_balances |
                      bank_transactions)

Options:
  --json              Output raw JSON instead of a list (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr cash transactions

Usage: dr cash transactions [options] <template>

Paginated cash transactions for a template (PUT /templates/<id>/transactions)

Arguments:
  template                 numeric template id OR alias (bank_balances |
                           bank_transactions)

Options:
  --fields <ids>           Comma-separated field ids to return per row (use `dr
                           templates get <id>` to look them up)
  --page <n>               Page number (1-based) (default: "1")
  --page-size <n>          Page size; server default applies if omitted
  --manual-only            Only include manually-tagged transactions (default:
                           false)
  --search <text>          Substring search across the fields named in
                           --search-fields
  --search-fields <names>  Comma-separated field names to search (used with
                           --search)
  --sort <name:asc|desc>   Sort spec; repeatable for multi-key sort (default:
                           [])
  --filters-file <path>    Optional JSON file carrying the request's `filters`
                           and/or `date_picker` blob (matches the FE wire
                           format verbatim)
  --json                   Output the raw paginated response as JSON (default:
                           false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr collection-processes

Usage: dr collection-processes|collection-process [options] [command]

Operate on Datarails Collection Processes (COLLECTION buckets)

Options:
  -h, --help                     display help for command

Commands:
  list [options]                 List Collection Processes on this tenant
  get [options] <id>             Show a Collection Process with optional
                                 cp_data sub-fetch
  create [options]               Create a Collection Process
  set-tag-config [options] <id>  Add / remove tags on a CP's root document.
                                 NOTE: existing child fileboxes keep their
                                 tags_config snapshots; newly-added fileboxes
                                 inherit the new config.
  add-fileboxes [options] <id>   Append fileboxes to an existing CP (async
                                 Celery dispatch)
  add-folders [options] <id>     Append folder dimension values to an existing
                                 CP
  calculate [options] <id>       Dispatch auto-calculate for every non-folder
                                 child of the CP root
  help [command]                 display help for command

dr collection-processes add-fileboxes

Usage: dr collection-processes add-fileboxes [options] <id>

Append fileboxes to an existing CP (async Celery dispatch)

Arguments:
  id                       collection-process id

Options:
  --filebox <name>         Filebox name to add (repeatable). (default: [])
  --fileboxes <@path>      Path to a newline-separated file of filebox names
                           (@-prefixed). (default: "")
  --parent-folder <id>     Existing folder doc id inside the CP that the new
                           fileboxes will hang under
  --dimension-name <d>     Dimension name to attach the new fileboxes to
                           (default: "")
  --template-file <path>   Template file applied to each new filebox (default:
                           "")
  --json                   Output raw JSON (default: false)
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr collection-processes add-folders

Usage: dr collection-processes add-folders [options] <id>

Append folder dimension values to an existing CP

Arguments:
  id                       collection-process id

Options:
  --folder <name>          Folder name to add (repeatable). (default: [])
  --folders <@path>        Path to a newline-separated file of folder names
                           (@-prefixed). (default: "")
  --parent-folder <id>     Existing folder doc id inside the CP that the new
                           folders will hang under
  --dimension-name <d>     Dimension name to tag the folders with (default: "")
  --json                   Output raw JSON (default: false)
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr collection-processes calculate

Usage: dr collection-processes calculate [options] <id>

Dispatch auto-calculate for every non-folder child of the CP root

Arguments:
  id                         collection-process id

Options:
  --multiple-dimension-tags  Include dimension-tags scope in the idempotency
                             key (default: false)
  --json                     Output raw JSON (default: false)
  --confirm-token <token>    Token from a prior plan run (default: "")
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr collection-processes create

Usage: dr collection-processes create [options]

Create a Collection Process

Options:
  --name <n>                CP name
  --dimension-name <d>      Dimension name (e.g. "Region")
  --filebox <name>          Child filebox name (repeatable). Mutually exclusive
                            with --fileboxes. (default: [])
  --fileboxes <@path>       Path to a newline-separated file of filebox names
                            (@-prefixed). Mutually exclusive with --filebox.
                            (default: "")
  --date-sub-type <t>       DATE-tag sub_type (month|quarter|year|...).
                            Mutually exclusive with --no-date. (default: "")
  --no-date                 Build an empty tags_config (no date label).
                            Mutually exclusive with --date-sub-type.
  --scenario <s>            Scenario (Actuals|Budget|Forecast|None) (default:
                            "")
  --parent <id>             Parent document id (default: "0")
  --config-file <path>      Config file (multipart upload) (default: "")
  --template-file <path>    Template file applied to each child filebox
                            (default: "")
  --use-type <id>           use_type id (for CPs created from FX LUT) (default:
                            "")
  --split-integration <id>  Salesforce split-integration id (default: "0")
  --json                    Output raw JSON (default: false)
  --confirm-token <token>   Token from a prior plan run (default: "")
  -s, --server <key>        Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                            DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                            TEST-5, TEST-6, TEST-7, DEMO) or a full
                            https://<host>.datarails.com URL. Required.
  --account <email>         Datarails account email (required when multiple
                            identities are stored for the server)
  -h, --help                display help for command

dr collection-processes get

Usage: dr collection-processes get [options] <id>

Show a Collection Process with optional cp_data sub-fetch

Arguments:
  id                  collection-process id (positive integer)

Options:
  --no-cp-data        Suppress the /cp_data sub-fetch
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr collection-processes list

Usage: dr collection-processes list [options]

List Collection Processes on this tenant

Options:
  --scenario <s>      Filter by scenario (Actuals|Budget|Forecast|None)
                      (default: "")
  --name <s>          Filter by case-insensitive name substring (default: "")
  --owner <email>     Filter by owner email (default: "")
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr collection-processes set-tag-config

Usage: dr collection-processes set-tag-config [options] <id>

Add / remove tags on a CP's root document. NOTE: existing child fileboxes keep
their tags_config snapshots; newly-added fileboxes inherit the new config.

Arguments:
  id                       collection-process id

Options:
  --add <name>             Tag name to add (repeatable, case-insensitive).
                           Resolved against /api/versions/tags. (default: [])
  --remove <name>          Tag name to remove (repeatable, case-insensitive).
                           (default: [])
  --json                   Output raw JSON (default: false)
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr connectors

Usage: dr connectors [options] [command]

Publish/repoint/inspect connectors on the control-plane (VPN)

Options:
  -h, --help                         display help for command

Commands:
  publish [options] <dataqueryFile>  Ingest a connector's published version
                                     from JFrog into the control-plane (no
                                     upload): reads the newest git tag for the
                                     connector, or --tag v<N>
  query                              Operate on connector-queries
  connector                          Operate on connectors (the creds-source
                                     object)
  artifact                           Operate on registered artifacts
  promote [options] <name>           Set a connector artifact's active version
                                     for this org
  binding                            Inspect connector bindings
  sync                               Operate on in-flight connector syncs
  active                             Inspect a connector artifact's active
                                     version for this org
  dev-fetch [options] <fileboxUuid>  Assemble a local run dir (env.json +
                                     secrets.json + connection.py + query.py)
                                     for dev-run.sh
  poll                               Polled file ingestion: the control-plane
                                     lands each new file as one version
  help [command]                     display help for command

dr connectors active

Usage: dr connectors active [options] [command]

Inspect a connector artifact's active version for this org

Options:
  -h, --help            display help for command

Commands:
  get [options] <name>  Show the active (promoted) version the runtime resolves
  help [command]        display help for command

dr connectors active get

Usage: dr connectors active get [options] <name>

Show the active (promoted) version the runtime resolves

Arguments:
  name                    artifact name (e.g. toasttab__toasttab)

Options:
  --json                  Output raw JSON instead of a summary (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors artifact

Usage: dr connectors artifact [options] [command]

Operate on registered artifacts

Options:
  -h, --help                             display help for command

Commands:
  deregister [options] <name> <version>  Deregister an artifact version (404 if absent, 409 if still pinned)
  help [command]                         display help for command

dr connectors artifact deregister

Usage: dr connectors artifact deregister [options] <name> <version>

Deregister an artifact version (404 if absent, 409 if still pinned)

Arguments:
  name                    artifact name (e.g. e2e_smoke)
  version                 artifact version (digest)

Options:
  --json                  Output raw JSON instead of a summary (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors binding

Usage: dr connectors binding [options] [command]

Inspect connector bindings

Options:
  -h, --help                   display help for command

Commands:
  get [options] <fileboxUuid>  Resolve a filebox UUID to its binding (reveals
                               the query_id for repoint)
  help [command]               display help for command

dr connectors binding get

Usage: dr connectors binding get [options] <fileboxUuid>

Resolve a filebox UUID to its binding (reveals the query_id for repoint)

Arguments:
  fileboxUuid             filebox UUID

Options:
  --json                  Output raw JSON instead of a summary (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors connector

Usage: dr connectors connector [options] [command]

Operate on connectors (the creds-source object)

Options:
  -h, --help        display help for command

Commands:
  create [options]  Create a connector (ties an org + credential datasource to
                    its queries)
  help [command]    display help for command

dr connectors connector create

Usage: dr connectors connector create [options]

Create a connector (ties an org + credential datasource to its queries)

Options:
  --secret-ref <datasourceId>  monolith datasource id holding the credential
  --type <type>                connector type (default: "DatarailsConnector")
  --public-config <json>       public_config as a JSON object (default: "{}")
  --org-id <id>                org id (defaults to the JWT org when omitted)
  --json                       Output raw JSON instead of a summary (default:
                               false)
  -s, --server <key>           Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                               DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                               TEST-5, TEST-6, TEST-7, DEMO) or a full
                               https://<host>.datarails.com URL. Required.
  --account <email>            Datarails account email (required when multiple
                               identities are stored for the server)
  --connectors-url <url>       Override the control-plane base URL (e.g. a
                               kubectl port-forward http://localhost:8000)
  -h, --help                   display help for command

dr connectors dev-fetch

Usage: dr connectors dev-fetch [options] <fileboxUuid>

Assemble a local run dir (env.json + secrets.json + connection.py + query.py)
for dev-run.sh

Arguments:
  fileboxUuid             filebox UUID of the connector binding

Options:
  --datasource <id>       datasource (data-integration) id whose credentials to
                          fetch
  --document-id <n>       numeric filebox document id (no uuid->id lookup
                          exists; required)
  --connection <path>     path to the connector's connection .py source
  --query <path>          path to the connector's dataquery .py source
  --from <date>           period start (paired with --to)
  --to <date>             period end (paired with --from)
  -o, --output <dir>      output run dir (default ./dev-run/<fileboxUuid>/)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors poll

Usage: dr connectors poll [options] [command]

Polled file ingestion: the control-plane lands each new file as one version

Options:
  -h, --help                        display help for command

Commands:
  enable [options] <filebox>        Poll a filebox's binding (dated with the
                                    filebox's DATE tag)
  set [options] <filebox>           Change polling settings (only the given
                                    flags change)
  disable [options] <filebox>       Stop polling (an item already in flight
                                    still finishes)
  get [options] <filebox>           Show polling settings, last poll, pending
                                    seed / rekey and item counts
  run [options] <filebox>           Poll now
  resume [options] <filebox>        Resume a paused binding (after fixing
                                    credentials, or a source change)
  items [options] <filebox>         List the item ledger: label, date, state,
                                    attempts, version, error
  retry [options] <filebox> <item>  Queue a failed, waiting or skipped item
                                    again
  skip [options] <filebox> <item>   Skip an item so it is never landed
                                    (two-step confirmation)
  seed [options] <filebox>          Mark items modified at or before --until as
                                    already landed (cut-over; token, no dialog)
  help [command]                    display help for command

dr connectors poll disable

Usage: dr connectors poll disable [options] <filebox>

Stop polling (an item already in flight still finishes)

Arguments:
  filebox                 filebox id or uuid

Options:
  --json                  Output the stored binding as JSON (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors poll enable

Usage: dr connectors poll enable [options] <filebox>

Poll a filebox's binding (dated with the filebox's DATE tag)

Arguments:
  filebox                 filebox id or uuid

Options:
  --interval <duration>   how often to poll, 5m to 7d (default: per source)
  --since <date>          never pick up items modified before this date or
                          timestamp
  --lookback <days>       window every poll lists, 1d to 3650d (default: per
                          source)
  --settle <duration>     how long an item must stay unchanged before landing,
                          0s to 1d
  --same-name <policy>    a changed file under the same name: new-version
                          (lands again) or ignore
  --json                  Output the stored binding as JSON (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors poll get

Usage: dr connectors poll get [options] <filebox>

Show polling settings, last poll, pending seed / rekey and item counts

Arguments:
  filebox                 filebox id or uuid

Options:
  --json                  Output the raw binding as JSON (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors poll items

Usage: dr connectors poll items [options] <filebox>

List the item ledger: label, date, state, attempts, version, error

Arguments:
  filebox                 filebox id or uuid

Options:
  --state <state>         only items in this state
                          (seen|new|dispatched|running|retry_wait|landed|failed|skipped|seeded|superseded)
  --limit <n>             page size (default and maximum: the control-plane
                          page size, 100)
  --after <id>            start after this item id (the next-page cursor)
  --json                  Output the raw page as JSON (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors poll resume

Usage: dr connectors poll resume [options] <filebox>

Resume a paused binding (after fixing credentials, or a source change)

Arguments:
  filebox                  filebox id or uuid

Options:
  --source <seed|land>     after a source change: seed (mark present items
                           landed) or land them
  --confirm-token <token>  Token from a prior plan run — required to proceed
  --json                   Output the binding as JSON (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --connectors-url <url>   Override the control-plane base URL (e.g. a kubectl
                           port-forward http://localhost:8000)
  -h, --help               display help for command

dr connectors poll retry

Usage: dr connectors poll retry [options] <filebox> <item>

Queue a failed, waiting or skipped item again

Arguments:
  filebox                 filebox id or uuid
  item                    item id (from poll items)

Options:
  --json                  Output the item as JSON (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors poll run

Usage: dr connectors poll run [options] <filebox>

Poll now

Arguments:
  filebox                 filebox id or uuid

Options:
  --json                  Output the binding as JSON (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors poll seed

Usage: dr connectors poll seed [options] <filebox>

Mark items modified at or before --until as already landed (cut-over; token, no
dialog)

Arguments:
  filebox                  filebox id or uuid

Options:
  --until <timestamp>      date or timestamp with a zone, e.g.
                           2026-10-08T17:30:00Z
  --dry-run                count the already-discovered items it would mark,
                           without changing anything (default: false)
  --confirm-token <token>  Token from a prior plan run — required to proceed
  --json                   Output the binding (or the dry-run count) as JSON
                           (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --connectors-url <url>   Override the control-plane base URL (e.g. a kubectl
                           port-forward http://localhost:8000)
  -h, --help               display help for command

dr connectors poll set

Usage: dr connectors poll set [options] <filebox>

Change polling settings (only the given flags change)

Arguments:
  filebox                               filebox id or uuid

Options:
  --interval <duration>                 how often to poll, 5m to 7d (default:
                                        per source)
  --since <date>                        never pick up items modified before
                                        this date or timestamp
  --lookback <days>                     window every poll lists, 1d to 3650d
                                        (default: per source)
  --settle <duration>                   how long an item must stay unchanged
                                        before landing, 0s to 1d
  --same-name <policy>                  a changed file under the same name:
                                        new-version (lands again) or ignore
  --widen <seed|land>                   a wider window: seed (mark exposed
                                        items landed) or land them
  --on-policy-change <rekey|seed|land>  a --same-name switch: rekey, seed or
                                        land
  --confirm-token <token>               Token from a prior plan run — required
                                        to proceed
  --json                                Output the stored binding as JSON
                                        (default: false)
  -s, --server <key>                    Server key (US, US2, UK, CA, EU,
                                        STUDIO, DEV, DEV-1, TEST, TEST-1,
                                        TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                                        TEST-7, DEMO) or a full
                                        https://<host>.datarails.com URL.
                                        Required.
  --account <email>                     Datarails account email (required when
                                        multiple identities are stored for the
                                        server)
  --connectors-url <url>                Override the control-plane base URL
                                        (e.g. a kubectl port-forward
                                        http://localhost:8000)
  -h, --help                            display help for command

dr connectors poll skip

Usage: dr connectors poll skip [options] <filebox> <item>

Skip an item so it is never landed (two-step confirmation)

Arguments:
  filebox                  filebox id or uuid
  item                     item id (from poll items)

Options:
  --confirm-token <token>  Token from a prior plan run — required to proceed
  --json                   Output the item as JSON (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --connectors-url <url>   Override the control-plane base URL (e.g. a kubectl
                           port-forward http://localhost:8000)
  -h, --help               display help for command

dr connectors promote

Usage: dr connectors promote [options] <name>

Set a connector artifact's active version for this org

Arguments:
  name                          artifact name (e.g. toasttab__toasttab)

Options:
  --artifact-version <version>  artifact version (digest) to make active
  --json                        Output raw JSON instead of a summary (default:
                                false)
  -s, --server <key>            Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                                DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                                TEST-5, TEST-6, TEST-7, DEMO) or a full
                                https://<host>.datarails.com URL. Required.
  --account <email>             Datarails account email (required when multiple
                                identities are stored for the server)
  --connectors-url <url>        Override the control-plane base URL (e.g. a
                                kubectl port-forward http://localhost:8000)
  -h, --help                    display help for command

dr connectors publish

Usage: dr connectors publish [options] <dataqueryFile>

Ingest a connector's published version from JFrog into the control-plane (no
upload): reads the newest git tag for the connector, or --tag v<N>

Arguments:
  dataqueryFile           path to the dataquery .py file
                          (<datacenter>/<org>/<vendor>/dataqueries/<dq>.py)

Options:
  --tag <version>         ingest this exact version (e.g. v3); default: the
                          newest published tag
  --json                  Output raw JSON instead of a summary line (default:
                          false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors query

Usage: dr connectors query [options] [command]

Operate on connector-queries

Options:
  -h, --help                   display help for command

Commands:
  repoint [options] <queryId>  Repoint a connector-query (only the provided
                               fields are updated)
  create [options]             Create a connector-query binding (filebox <->
                               connector <-> artifact)
  list [options]               List the caller org's connector-query bindings
  delete [options] <queryId>   Delete a connector-query binding
                               (cleanup/decommission)
  help [command]               display help for command

dr connectors query create

Usage: dr connectors query create [options]

Create a connector-query binding (filebox <-> connector <-> artifact)

Options:
  --connector-id <id>           connector id (from `connectors connector
                                create`)
  --filebox-uuid <uuid>         target filebox UUID
  --filebox-id <id>             numeric filebox/document id (the Sync-query
                                editor write key)
  --artifact-name <name>        artifact name (e.g. dispatch__time_entries)
  --artifact-version <version>  artifact version (digest)
  --runtime-flavor <flavor>     runtime flavor (default: "base")
  --query-config <json>         query_config as a JSON object (default: "{}")
  --json                        Output raw JSON instead of a summary (default:
                                false)
  -s, --server <key>            Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                                DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                                TEST-5, TEST-6, TEST-7, DEMO) or a full
                                https://<host>.datarails.com URL. Required.
  --account <email>             Datarails account email (required when multiple
                                identities are stored for the server)
  --connectors-url <url>        Override the control-plane base URL (e.g. a
                                kubectl port-forward http://localhost:8000)
  -h, --help                    display help for command

dr connectors query delete

Usage: dr connectors query delete [options] <queryId>

Delete a connector-query binding (cleanup/decommission)

Arguments:
  queryId                 connector-query id (positive integer)

Options:
  --json                  Output raw JSON instead of a summary (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors query list

Usage: dr connectors query list [options]

List the caller org's connector-query bindings

Options:
  --json                  Output raw JSON instead of a summary (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr connectors query repoint

Usage: dr connectors query repoint [options] <queryId>

Repoint a connector-query (only the provided fields are updated)

Arguments:
  queryId                       connector-query id (positive integer)

Options:
  --artifact-name <name>        New artifact name
  --artifact-version <version>  New artifact version (digest)
  --runtime-flavor <flavor>     New runtime flavor
  --filebox-uuid <uuid>         New filebox UUID binding
  --filebox-id <id>             Backfill/repair the numeric filebox/document id
  --query-config <json>         New query_config as a JSON object
  --json                        Output raw JSON instead of a summary (default:
                                false)
  -s, --server <key>            Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                                DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                                TEST-5, TEST-6, TEST-7, DEMO) or a full
                                https://<host>.datarails.com URL. Required.
  --account <email>             Datarails account email (required when multiple
                                identities are stored for the server)
  --connectors-url <url>        Override the control-plane base URL (e.g. a
                                kubectl port-forward http://localhost:8000)
  -h, --help                    display help for command

dr connectors sync

Usage: dr connectors sync [options] [command]

Operate on in-flight connector syncs

Options:
  -h, --help        display help for command

Commands:
  cancel [options]  Stop an in-flight sync for a filebox
  help [command]    display help for command

dr connectors sync cancel

Usage: dr connectors sync cancel [options]

Stop an in-flight sync for a filebox

Options:
  --filebox <uuid>        filebox UUID whose sync should be stopped
  --mode <mode>           Cancel a test/preview run instead of the ordinary
                          sync
  --date-tags <json>      Cancel only this period of a batched backfill
  --json                  Output raw JSON instead of a summary (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  --connectors-url <url>  Override the control-plane base URL (e.g. a kubectl
                          port-forward http://localhost:8000)
  -h, --help              display help for command

dr dashboards

Usage: dr dashboards [options] [command]

Operations on Datarails dashboards

Options:
  -h, --help                      display help for command

Commands:
  list [options]                  List all dashboards
  get [options] <id>              Get a dashboard by ID (full
                                  DashboardSerializer body, including
                                  date-picker config)
  create [options]                Create a new dashboard
  push [options] <id>             Copy a dashboard into other organizations
                                  (two-step confirm). Destinations must be
                                  listed by `dr organizations push-targets`.
  delete [options] <id>           Delete a dashboard by ID (two-step confirm)
  prepare [options] <id>          Prepare a dashboard (refresh widgets)
  set-date-picker [options] <id>  Set a dashboard's global date picker (mode
                                  preset OR custom date)
  set-folder [options] <id>       Assign a dashboard to a picker-tree folder
                                  (or move it to root). Server ignores
                                  folder_id when the `dashboards__folders` FF
                                  is off.
  help [command]                  display help for command

dr dashboards create

Usage: dr dashboards create [options]

Create a new dashboard

Options:
  --name <name>       Dashboard name (required)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr dashboards delete

Usage: dr dashboards delete [options] <id>

Delete a dashboard by ID (two-step confirm)

Arguments:
  id                       dashboard id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr dashboards get

Usage: dr dashboards get [options] <id>

Get a dashboard by ID (full DashboardSerializer body, including date-picker
config)

Arguments:
  id                  dashboard id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr dashboards list

Usage: dr dashboards list [options]

List all dashboards

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr dashboards prepare

Usage: dr dashboards prepare [options] <id>

Prepare a dashboard (refresh widgets)

Arguments:
  id                  dashboard id

Options:
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr dashboards push

Usage: dr dashboards push [options] <id>

Copy a dashboard into other organizations (two-step confirm). Destinations must
be listed by `dr organizations push-targets`.

Arguments:
  id                       source dashboard id (positive integer)

Options:
  --to <orgs>              Destination organization ids or names —
                           comma-separated, repeatable, max 50. A name
                           containing a comma must be given as the numeric id.
                           (default: [])
  --override               Replace the dashboard previously pushed from this
                           source, discarding its widgets and filters. Default:
                           add a new dashboard. (default: false)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           push (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr dashboards set-date-picker

Usage: dr dashboards set-date-picker [options] <id>

Set a dashboard's global date picker (mode preset OR custom date)

Arguments:
  id                     dashboard id (positive integer)

Options:
  --mode <m>             preset: today | yesterday | this_month | prev_month
                         (default: "")
  --year <YYYY>          custom date — year (e.g. 2026) (default: "")
  --quarter <YYYY-Qn>    custom date — quarter (e.g. 2026-Q2) (default: "")
  --month <YYYY-MM>      custom date — month (e.g. 2026-04) (default: "")
  --day <YYYY-MM-DD>     custom date — day (e.g. 2026-04-30) (default: "")
  --payload-file <path>  Path to JSON file with arbitrary PUT body (typed flags
                         overlay) (default: "")
  --json                 Output the echoed JSON instead of a summary (default:
                         false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr dashboards set-folder

Usage: dr dashboards set-folder [options] <id>

Assign a dashboard to a picker-tree folder (or move it to root). Server ignores
folder_id when the `dashboards__folders` FF is off.

Arguments:
  id                  dashboard id (positive integer)

Options:
  --folder <fid>      target folder id (positive integer) (default: "")
  --root              move the dashboard to the root (clear folder_id)
                      (default: false)
  --json              Output the echoed JSON instead of a summary (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr data-models

Usage: dr data-models [options] [command]

Operations on Datarails data models (groups of tables)

Options:
  -h, --help          display help for command

Commands:
  list [options]      List all data models
  get [options] <id>  Get a single data model with its tables
  help [command]      display help for command

dr data-models get

Usage: dr data-models get [options] <id>

Get a single data model with its tables

Arguments:
  id                  data model id

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr data-models list

Usage: dr data-models list [options]

List all data models

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr dataflow

Usage: dr dataflow [options] [command]

Inspect a template's dataflow graph (source/center/target)

Options:
  -h, --help                   display help for command

Commands:
  get [options] <template_id>  Fetch a template's dataflow snapshot
  help [command]               display help for command

dr dataflow get

Usage: dr dataflow get [options] <template_id>

Fetch a template's dataflow snapshot

Arguments:
  template_id         template id (positive integer)

Options:
  --json              Output raw JSON instead of grouped tables (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr datamappers

Usage: dr datamappers [options] [command]

Operations on Datarails datamappers (extraction configs)

Options:
  -h, --help                                 display help for command

Commands:
  list [options]                             List all datamappers on a table
  get [options] <mapper_id>                  Get a single datamapper. --table is optional — when omitted the CLI sweeps templates to resolve the parent (mapper ids are unique server-side; the URL keys on /api/templates/<tid>/mappers/<id> so client-side resolution is the only path).
  create                                     Create a datamapper. Pick a subcommand for the table-type: `flat`, `dimension`, `multiple`, or `from-file` (power mode).
  update [options] <mapper_id>               Update a datamapper (payload-file only: config + sheet_name, optionally name). Publishes the payload as a new version of the mapper, the way the UI "Publish and scan" does: new columns are added to the table, the new version takes over the documents of the old one, and the old version is unbound. The new version has a NEW mapper id, which dr prints. `--rescan latest` (the default) re-extracts the LATEST version of each bound document, then dr checks that any calculated fields in the payload appear on the table. For a full historical rescan (every calculated field re-executed against every document version ever uploaded), use `dr rescan table <template_id>` instead — that is far more expensive and higher-blast.
  delete [options] <mapper_id>               Delete a datamapper (two-step confirm)
  custom-functions [options]                 List the formula-language functions the server's ETL parser accepts. Authoritative list from `GET /api/templates/mappers/custom_functions`. Useful when authoring calc-field formulas — gives function names, signatures, and descriptions verbatim from the server.
  preview [options]                          Render a mapper config's projected output for a sample input. Posts to `POST /api/templates/preview-data` with the operator-supplied JSON (typically built from a saved mapper config + template_id + document_version + datamapper_id). Output is the server's `{output: {header, projected_config, …}, err}` envelope, emitted as JSON.
  bind [options] <mapper_id>                 Update which document IDs a mapper is bound to. The --doc list replaces the mapper's current documents; repeat every filebox you want to keep (dr warns first and names any it drops). Posts to `POST /api/templates/mappers/<id>/binding` with `{selected_document_ids, rescan?}`. The legacy webclient's "Mapping table with documents" modal calls this when the operator checks/unchecks docs in the binding picker. Warns first when another mapper of the table on the same ordinal is bound to one of those docs: mappers that share an ordinal are versions of one mapper, so the bind unbinds the other.
  processed-versions [options] <mapper_id>   List document-versions a mapper has already extracted. GET `/api/templates/mappers/<id>/processed_versions`.
  connected-fileboxes [options] <mapper_id>  List fileboxes connected to a mapper, with full metadata (name / scenario / use_type / parent). GET `/api/templates/mappers/<id>/fileboxes`. Equivalent to `dr datamappers get <id>` reading `mapped_documents_ids` but expanded.
  help [command]                             display help for command

dr datamappers bind

Usage: dr datamappers bind [options] <mapper_id>

Update which document IDs a mapper is bound to. The --doc list replaces the
mapper's current documents; repeat every filebox you want to keep (dr warns
first and names any it drops). Posts to `POST
/api/templates/mappers/<id>/binding` with `{selected_document_ids, rescan?}`.
The legacy webclient's "Mapping table with documents" modal calls this when the
operator checks/unchecks docs in the binding picker. Warns first when another
mapper of the table on the same ordinal is bound to one of those docs: mappers
that share an ordinal are versions of one mapper, so the bind unbinds the
other.

Arguments:
  mapper_id              mapper id (positive integer)

Options:
  --doc <id>             Document id to bind (positive integer; repeatable)
                         (default: [])
  --rescan <mode>        Trigger a re-extraction: `latest` or `all` (default:
                         omit; no rescan) (default: "")
  --payload-file <path>  Power mode: send a verbatim JSON body (skips
                         convenience-flag assembly) (default: "")
  --json                 Output raw JSON server response (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr datamappers connected-fileboxes

Usage: dr datamappers connected-fileboxes [options] <mapper_id>

List fileboxes connected to a mapper, with full metadata (name / scenario /
use_type / parent). GET `/api/templates/mappers/<id>/fileboxes`. Equivalent to
`dr datamappers get <id>` reading `mapped_documents_ids` but expanded.

Arguments:
  mapper_id           mapper id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr datamappers create

Usage: dr datamappers create [options] [command]

Create a datamapper. Pick a subcommand for the table-type: `flat`, `dimension`,
`multiple`, or `from-file` (power mode).

Options:
  -h, --help                      display help for command

Commands:
  flat [options] <table_id>       Create a flat-table datamapper (no dimensions
                                  or table_id cells)
  dimension [options] <table_id>  Create a dimension-table datamapper (requires
                                  at least one --dim Coord=Label entry)
  multiple [options] <table_id>   Create a multiple-tables datamapper (requires
                                  --dim ≥ 1 AND one --table-id-cell)
  from-file [options] <table_id>  Create a datamapper from a verbatim JSON body
                                  (power mode; no convenience-flag validation)
  help [command]                  display help for command

dr datamappers create dimension

Usage: dr datamappers create dimension [options] <table_id>

Create a dimension-table datamapper (requires at least one --dim Coord=Label
entry)

Arguments:
  table_id                         Table ID (positive integer)

Options:
  --name <s>                       Mapper name
  --doc-version <id>               Source document version ID. Named
                                   --doc-version (NOT --version) because
                                   commander reserves the global -v/--version
                                   for printing the CLI version — using
                                   --version on this subcommand silently prints
                                   the CLI version and exits without creating
                                   the mapper (gap #30).
  --sheet <s>                      Sheet name
  --field <NAME:TYPE>              Override column type
                                   (Text|Float|Date|Integer). Repeatable.
                                   (default: [])
  --calc <Name=Formula>            Add calculated_fields entry. Repeatable.
                                   (default: [])
  --attr <Coord=Label>             Add attributes entry. Repeatable. (default:
                                   [])
  --footer <Coord=Label>           Add mandatory footer entry. Repeatable.
                                   (default: [])
  --no-improved-etl                Emit null for config.improved_etl (default:
                                   true).
  --value-field-name <s>           config.value_field_name (default "value").
                                   (default: "value")
  --no-ignore-zeros                Do not drop rows whose value column is zero
                                   (default: true).
  --sheets-filter <list>           config.sheets_filter.values —
                                   comma-separated sheet names. (default: "")
  --sheets-filter-exclude          Treat --sheets-filter as an exclude list.
                                   (default: false)
  --rename <CsvHeader=TableField>  Rename a CSV header to a different table
                                   field. Repeatable. (default: [])
  --rescan <mode>                  Rescan mode: latest|all (default: "latest")
  --no-rescan                      Omit rescan from the request
  --json                           Output raw JSON instead of a summary
                                   (default: false)
  --dim <Coord=Label>              Add dimension entry. Repeatable; at least
                                   one is required. (default: [])
  -s, --server <key>               Server key (US, US2, UK, CA, EU, STUDIO,
                                   DEV, DEV-1, TEST, TEST-1, TEST-2, TEST-3,
                                   TEST-4, TEST-5, TEST-6, TEST-7, DEMO) or a
                                   full https://<host>.datarails.com URL.
                                   Required.
  --account <email>                Datarails account email (required when
                                   multiple identities are stored for the
                                   server)
  -h, --help                       display help for command

dr datamappers create flat

Usage: dr datamappers create flat [options] <table_id>

Create a flat-table datamapper (no dimensions or table_id cells)

Arguments:
  table_id                         Table ID (positive integer)

Options:
  --name <s>                       Mapper name
  --doc-version <id>               Source document version ID. Named
                                   --doc-version (NOT --version) because
                                   commander reserves the global -v/--version
                                   for printing the CLI version — using
                                   --version on this subcommand silently prints
                                   the CLI version and exits without creating
                                   the mapper (gap #30).
  --sheet <s>                      Sheet name
  --field <NAME:TYPE>              Override column type
                                   (Text|Float|Date|Integer). Repeatable.
                                   (default: [])
  --calc <Name=Formula>            Add calculated_fields entry. Repeatable.
                                   (default: [])
  --attr <Coord=Label>             Add attributes entry. Repeatable. (default:
                                   [])
  --footer <Coord=Label>           Add mandatory footer entry. Repeatable.
                                   (default: [])
  --no-improved-etl                Emit null for config.improved_etl (default:
                                   true).
  --value-field-name <s>           config.value_field_name (default "value").
                                   (default: "value")
  --no-ignore-zeros                Do not drop rows whose value column is zero
                                   (default: true).
  --sheets-filter <list>           config.sheets_filter.values —
                                   comma-separated sheet names. (default: "")
  --sheets-filter-exclude          Treat --sheets-filter as an exclude list.
                                   (default: false)
  --rename <CsvHeader=TableField>  Rename a CSV header to a different table
                                   field. Repeatable. (default: [])
  --rescan <mode>                  Rescan mode: latest|all (default: "latest")
  --no-rescan                      Omit rescan from the request
  --json                           Output raw JSON instead of a summary
                                   (default: false)
  -s, --server <key>               Server key (US, US2, UK, CA, EU, STUDIO,
                                   DEV, DEV-1, TEST, TEST-1, TEST-2, TEST-3,
                                   TEST-4, TEST-5, TEST-6, TEST-7, DEMO) or a
                                   full https://<host>.datarails.com URL.
                                   Required.
  --account <email>                Datarails account email (required when
                                   multiple identities are stored for the
                                   server)
  -h, --help                       display help for command

dr datamappers create from-file

Usage: dr datamappers create from-file [options] <table_id>

Create a datamapper from a verbatim JSON body (power mode; no convenience-flag
validation)

Arguments:
  table_id             Table ID (positive integer)

Options:
  --file <path>        Path to a JSON file with the full create body
  --rescan <mode>      Rescan mode: latest|all (default: "latest")
  --no-rescan          Omit rescan from the request
  --field <NAME:TYPE>  Override a bootstrapped column type
                       (Text|Float|Date|Integer). Repeatable. Each becomes a
                       `fields_to_change` entry and wins over any type
                       auto-resolved from the body `template_id`. Rarely
                       needed: when the body carries a source `template_id` (as
                       `dr datamappers get` emits), every `map_to` type is
                       resolved from the source template automatically
                       (DR-51801). (default: [])
  --json               Output raw JSON instead of a summary (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr datamappers create multiple

Usage: dr datamappers create multiple [options] <table_id>

Create a multiple-tables datamapper (requires --dim ≥ 1 AND one
--table-id-cell)

Arguments:
  table_id                         Table ID (positive integer)

Options:
  --name <s>                       Mapper name
  --doc-version <id>               Source document version ID. Named
                                   --doc-version (NOT --version) because
                                   commander reserves the global -v/--version
                                   for printing the CLI version — using
                                   --version on this subcommand silently prints
                                   the CLI version and exits without creating
                                   the mapper (gap #30).
  --sheet <s>                      Sheet name
  --field <NAME:TYPE>              Override column type
                                   (Text|Float|Date|Integer). Repeatable.
                                   (default: [])
  --calc <Name=Formula>            Add calculated_fields entry. Repeatable.
                                   (default: [])
  --attr <Coord=Label>             Add attributes entry. Repeatable. (default:
                                   [])
  --footer <Coord=Label>           Add mandatory footer entry. Repeatable.
                                   (default: [])
  --no-improved-etl                Emit null for config.improved_etl (default:
                                   true).
  --value-field-name <s>           config.value_field_name (default "value").
                                   (default: "value")
  --no-ignore-zeros                Do not drop rows whose value column is zero
                                   (default: true).
  --sheets-filter <list>           config.sheets_filter.values —
                                   comma-separated sheet names. (default: "")
  --sheets-filter-exclude          Treat --sheets-filter as an exclude list.
                                   (default: false)
  --rename <CsvHeader=TableField>  Rename a CSV header to a different table
                                   field. Repeatable. (default: [])
  --rescan <mode>                  Rescan mode: latest|all (default: "latest")
  --no-rescan                      Omit rescan from the request
  --json                           Output raw JSON instead of a summary
                                   (default: false)
  --dim <Coord=Label>              Add dimension entry. Repeatable; at least
                                   one is required. (default: [])
  --table-id-cell <Coord=Label>    The table_id (anchor) cell — the cell
                                   carrying the per-section table identifier.
                                   Required; the server allows exactly one.
                                   (default: [])
  -s, --server <key>               Server key (US, US2, UK, CA, EU, STUDIO,
                                   DEV, DEV-1, TEST, TEST-1, TEST-2, TEST-3,
                                   TEST-4, TEST-5, TEST-6, TEST-7, DEMO) or a
                                   full https://<host>.datarails.com URL.
                                   Required.
  --account <email>                Datarails account email (required when
                                   multiple identities are stored for the
                                   server)
  -h, --help                       display help for command

dr datamappers custom-functions

Usage: dr datamappers custom-functions [options]

List the formula-language functions the server's ETL parser accepts.
Authoritative list from `GET /api/templates/mappers/custom_functions`. Useful
when authoring calc-field formulas — gives function names, signatures, and
descriptions verbatim from the server.

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr datamappers delete

Usage: dr datamappers delete [options] <mapper_id>

Delete a datamapper (two-step confirm)

Arguments:
  mapper_id                mapper id (positive integer)

Options:
  --table <id>             Table ID (positive integer)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr datamappers get

Usage: dr datamappers get [options] <mapper_id>

Get a single datamapper. --table is optional — when omitted the CLI sweeps
templates to resolve the parent (mapper ids are unique server-side; the URL
keys on /api/templates/<tid>/mappers/<id> so client-side resolution is the only
path).

Arguments:
  mapper_id           mapper id (positive integer)

Options:
  --table <id>        Table ID (positive integer; optional — auto-resolved if
                      omitted)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr datamappers list

Usage: dr datamappers list [options]

List all datamappers on a table

Options:
  --table <id>        Table ID (positive integer)
  --full              Include each mapper's compiled mapping_rules (the SSDL
                      JSON the ETL engine runs), via
                      /api/templates/<tid>/mappers_full. Mappers whose source
                      filebox is archived are omitted by the server. Read it
                      with --json (default: false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr datamappers preview

Usage: dr datamappers preview [options]

Render a mapper config's projected output for a sample input. Posts to `POST
/api/templates/preview-data` with the operator-supplied JSON (typically built
from a saved mapper config + template_id + document_version + datamapper_id).
Output is the server's `{output: {header, projected_config, …}, err}` envelope,
emitted as JSON.

Options:
  --payload-file <path>  Path to a JSON body for the preview request
  --json                 Output raw JSON (default — there is no compact form
                         for preview output) (default: true)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr datamappers processed-versions

Usage: dr datamappers processed-versions [options] <mapper_id>

List document-versions a mapper has already extracted. GET
`/api/templates/mappers/<id>/processed_versions`.

Arguments:
  mapper_id           mapper id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr datamappers update

Usage: dr datamappers update [options] <mapper_id>

Update a datamapper (payload-file only: config + sheet_name, optionally name).
Publishes the payload as a new version of the mapper, the way the UI "Publish
and scan" does: new columns are added to the table, the new version takes over
the documents of the old one, and the old version is unbound. The new version
has a NEW mapper id, which dr prints. `--rescan latest` (the default)
re-extracts the LATEST version of each bound document, then dr checks that any
calculated fields in the payload appear on the table. For a full historical
rescan (every calculated field re-executed against every document version ever
uploaded), use `dr rescan table <template_id>` instead — that is far more
expensive and higher-blast.

Arguments:
  mapper_id              mapper id (positive integer)

Options:
  --payload-file <path>  Path to a JSON file with the mapper body: config,
                         sheet_name, optional name (required) (default: "")
  --field <NAME:TYPE>    Set a column type via fields_to_change
                         (Text|Float|Date|Integer). Repeatable. Mirrors the UI
                         "Publish and scan" so a calc column referencing a
                         LUT-injected column materialises instead of 500ing on
                         inferred types. Note: the server blocks a type change
                         (HTTP 400) when the template has more than one mapper.
                         (default: [])
  --rescan <mode>        Rescan mode: latest|all (default: "latest")
  --no-rescan            Omit rescan from the request
  --json                 Output raw JSON instead of a summary (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr desk

Usage: dr desk [options] [command]

Desk outbound-email onboarding - teams, SMTP app passwords, SendGrid domain
auth (/api/desk/v1/teams/...). Every verb is org-scoped from the token: the org
comes from --server/--account, never from an argument.

Options:
  -h, --help       display help for command

Commands:
  teams            Inspect the organization's Desk teams
  smtp             Onboard a team's outbound mail via an SMTP app password
  support-email    Register a team's inbound support address
  sendgrid         Onboard the organization's outbound mail via SendGrid domain
                   authentication
  ticket           Work with the organization's Desk tickets
  clone [options]  Clone a reference org's Desk into the token's org: missing
                   users (e-mail domain swapped), missing teams + members, Desk
                   config, tickets and history (POST
                   /api/desk/v1/admin/org-clone; two-step confirm gate). Staff
                   only — run it with `dr login-as` an admin of the TARGET org.
                   Existing users, teams and tickets are matched, never
                   changed; safe to re-run.
  help [command]   display help for command

dr desk clone

Usage: dr desk clone [options]

Clone a reference org's Desk into the token's org: missing users (e-mail domain
swapped), missing teams + members, Desk config, tickets and history (POST
/api/desk/v1/admin/org-clone; two-step confirm gate). Staff only — run it with
`dr login-as` an admin of the TARGET org. Existing users, teams and tickets are
matched, never changed; safe to re-run.

Options:
  --source-org <id>         reference organization id to copy from
  --target-org <id>         organization id to copy into (must be the token
                            org)
  --source-domain <domain>  source e-mail domain (default: inferred from its
                            users)
  --target-domain <domain>  target e-mail domain (default: inferred from its
                            users)
  --dry-run                 Report what would be created without writing
                            anything (default: false)
  --json                    Output raw JSON instead of a summary (default:
                            false)
  --confirm-token <token>   Token from the plan-phase output; required to run
  -s, --server <key>        Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                            DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                            TEST-5, TEST-6, TEST-7, DEMO) or a full
                            https://<host>.datarails.com URL. Required.
  --account <email>         Datarails account email (required when multiple
                            identities are stored for the server)
  -h, --help                display help for command

dr desk sendgrid

Usage: dr desk sendgrid [options] [command]

Onboard the organization's outbound mail via SendGrid domain authentication

Options:
  -h, --help                   display help for command

Commands:
  register [options] <domain>  Register the org's sending domain and print the
                               DNS records to hand over (POST
                               /api/desk/v1/teams/onboarding/sendgrid; two-step
                               confirm gate). Idempotent.
  status [options]             Show the org's stored SendGrid domain state
                               without contacting SendGrid (GET
                               /api/desk/v1/teams/onboarding/sendgrid). Carries
                               no per-record DNS verdicts - use `verify` for
                               those.
  verify [options]             Re-check the DNS records against SendGrid and
                               report each one (POST
                               /api/desk/v1/teams/onboarding/sendgrid/verify).
                               Safe to re-run; not confirm-gated, since it only
                               refreshes state a server-side poller refreshes
                               anyway.
  help [command]               display help for command

dr desk sendgrid register

Usage: dr desk sendgrid register [options] <domain>

Register the org's sending domain and print the DNS records to hand over (POST
/api/desk/v1/teams/onboarding/sendgrid; two-step confirm gate). Idempotent.

Arguments:
  domain                   customer sending domain, e.g. acme.com

Options:
  --json                   Output raw JSON instead of a summary (default:
                           false)
  --confirm-token <token>  Token from the plan-phase output; required to
                           actually apply
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr desk sendgrid status

Usage: dr desk sendgrid status [options]

Show the org's stored SendGrid domain state without contacting SendGrid (GET
/api/desk/v1/teams/onboarding/sendgrid). Carries no per-record DNS verdicts -
use `verify` for those.

Options:
  --domain <domain>   Target a specific registered domain instead of the most
                      recent
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr desk sendgrid verify

Usage: dr desk sendgrid verify [options]

Re-check the DNS records against SendGrid and report each one (POST
/api/desk/v1/teams/onboarding/sendgrid/verify). Safe to re-run; not
confirm-gated, since it only refreshes state a server-side poller refreshes
anyway.

Options:
  --domain <domain>   Target a specific registered domain instead of the most
                      recent
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr desk smtp

Usage: dr desk smtp [options] [command]

Onboard a team's outbound mail via an SMTP app password

Options:
  -h, --help               display help for command

Commands:
  set [options] <team>     Store and verify a team's SMTP app password (POST
                           /api/desk/v1/teams/<team_id>/smtp-connection;
                           two-step confirm gate). The password is read from a
                           file or stdin, never from the command line.
  rotate [options] <team>  Replace a team's stored SMTP app password in place
                           (PUT /api/desk/v1/teams/<team_id>/smtp-connection;
                           two-step confirm gate). Use this when `set` reports
                           an existing connection: the row is never
                           deactivated, so the team keeps sending authenticated
                           throughout. Fails if there is nothing to rotate. The
                           password is read from a file or stdin, never from
                           the command line.
  get [options] <team>     Show a team's stored SMTP connection and whether it
                           actually routes mail (GET
                           /api/desk/v1/teams/<team_id>/smtp-connection). Never
                           returns the password and touches no mail provider,
                           so it is safe while diagnosing.
  test [options] <team>    Re-test a team's stored SMTP credential without
                           re-submitting it (POST
                           /api/desk/v1/teams/<team_id>/smtp-connection/test).
                           Real STARTTLS and AUTH handshake, sends no mail. Run
                           this after the customer fixes their side.
  help [command]           display help for command

dr desk smtp get

Usage: dr desk smtp get [options] <team>

Show a team's stored SMTP connection and whether it actually routes mail (GET
/api/desk/v1/teams/<team_id>/smtp-connection). Never returns the password and
touches no mail provider, so it is safe while diagnosing.

Arguments:
  team                team id, support email, or team name

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr desk smtp rotate

Usage: dr desk smtp rotate [options] <team>

Replace a team's stored SMTP app password in place (PUT
/api/desk/v1/teams/<team_id>/smtp-connection; two-step confirm gate). Use this
when `set` reports an existing connection: the row is never deactivated, so the
team keeps sending authenticated throughout. Fails if there is nothing to
rotate. The password is read from a file or stdin, never from the command line.

Arguments:
  team                     team id, support email, or team name - from `dr desk
                           teams list`

Options:
  --password-file <path>   File containing the new app password. A single
                           trailing newline is stripped.
  --password-stdin         Read the new app password from stdin (default:
                           false)
  --smtp-username <email>  Mailbox to authenticate as. Defaults to the team's
                           support_email.
  --smtp-host <host>       Override the host. Required for anything other than
                           Gmail/O365, which the server refuses to guess.
  --smtp-port <port>       SMTP port (default 587)
  --json                   Output raw JSON instead of a summary (default:
                           false)
  --confirm-token <token>  Token from the plan-phase output; required to
                           actually apply
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr desk smtp set

Usage: dr desk smtp set [options] <team>

Store and verify a team's SMTP app password (POST
/api/desk/v1/teams/<team_id>/smtp-connection; two-step confirm gate). The
password is read from a file or stdin, never from the command line.

Arguments:
  team                     team id, support email, or team name - from `dr desk
                           teams list`

Options:
  --password-file <path>   File containing the app password. A single trailing
                           newline is stripped.
  --password-stdin         Read the app password from stdin (default: false)
  --smtp-username <email>  Mailbox to authenticate as. Defaults to the team's
                           support_email.
  --smtp-host <host>       Override the host. Required for anything other than
                           Gmail/O365, which the server refuses to guess.
  --smtp-port <port>       SMTP port (default 587)
  --json                   Output raw JSON instead of a summary (default:
                           false)
  --confirm-token <token>  Token from the plan-phase output; required to
                           actually apply
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr desk smtp test

Usage: dr desk smtp test [options] <team>

Re-test a team's stored SMTP credential without re-submitting it (POST
/api/desk/v1/teams/<team_id>/smtp-connection/test). Real STARTTLS and AUTH
handshake, sends no mail. Run this after the customer fixes their side.

Arguments:
  team                team id, support email, or team name

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr desk support-email

Usage: dr desk support-email [options] [command]

Register a team's inbound support address

Options:
  -h, --help                    display help for command

Commands:
  set [options] <team> <email>  Register the team's support address so mail to
                                it becomes tickets (PATCH /bo/teams/<team_id>/;
                                two-step confirm gate). Step one of the
                                app-password runbook: do it BEFORE the customer
                                creates their auto-forward rule, or the
                                verification email has nowhere to land.
  help [command]                display help for command

dr desk support-email set

Usage: dr desk support-email set [options] <team> <email>

Register the team's support address so mail to it becomes tickets (PATCH
/bo/teams/<team_id>/; two-step confirm gate). Step one of the app-password
runbook: do it BEFORE the customer creates their auto-forward rule, or the
verification email has nowhere to land.

Arguments:
  team                     team id, support email, or team name
  email                    support address to register

Options:
  --json                   Output raw JSON instead of a summary (default:
                           false)
  --confirm-token <token>  Token from the plan-phase output; required to
                           actually apply
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr desk teams

Usage: dr desk teams [options] [command]

Inspect the organization's Desk teams

Options:
  -h, --help      display help for command

Commands:
  list [options]  List the org's teams with their support emails, for picking a
                  team_id (GET /api/desk/v1/teams/onboarding/teams). Admin
                  only.
  help [command]  display help for command

dr desk teams list

Usage: dr desk teams list [options]

List the org's teams with their support emails, for picking a team_id (GET
/api/desk/v1/teams/onboarding/teams). Admin only.

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr desk ticket

Usage: dr desk ticket [options] [command]

Work with the organization's Desk tickets

Options:
  -h, --help               display help for command

Commands:
  create [options] <team>  Open a Desk ticket on a team (POST
                           /api/desk/v1/tickets/; two-step confirm gate). Desk
                           emails a confirmation to the requester, so this
                           reaches someone outside Datarails. Needs any Desk
                           user of the org - unlike the onboarding verbs it
                           does not require an admin identity.
  help [command]           display help for command

dr desk ticket create

Usage: dr desk ticket create [options] <team>

Open a Desk ticket on a team (POST /api/desk/v1/tickets/; two-step confirm
gate). Desk emails a confirmation to the requester, so this reaches someone
outside Datarails. Needs any Desk user of the org - unlike the onboarding verbs
it does not require an admin identity.

Arguments:
  team                       team id, support email, or team name - from `dr
                             desk teams list`

Options:
  --title <text>             Ticket subject (1-500 characters)
  --requester-email <email>  Who the ticket is on behalf of. Receives the
                             confirmation email.
  --description <text>       Ticket body (up to 50000 chars)
  --description-file <path>  Read the body from a file instead. Use this for
                             anything long - a 50k body does not belong in
                             argv.
  --priority <level>         Ticket priority (default medium) (choices:
                             "urgent", "medium", "low")
  --ticket-type <text>       Ticket type, as configured for the team
  --requester-name <text>    Display name for the requester
  --assigned-to <user_id>    Assign on creation. Forces the status to to_do.
  --contact-id <uuid>        Link an existing Desk contact
  --due-date <iso8601>       Explicit due date. Overrides the computed SLA
                             deadline.
  --no-thread                Do not seed the ticket's conversation thread from
                             the description. By default the description is
                             also posted as the requester's first message,
                             because the Desk UI renders the message thread
                             rather than the description field - without it the
                             ticket looks empty. Sends no email either way.
  --attach <path>            File to attach. Repeat for several. Uploaded after
                             the ticket is created, so the requester's
                             confirmation email goes out before they exist.
  --json                     Output the raw created ticket as JSON (default:
                             false)
  --confirm-token <token>    Token from the plan-phase output; required to
                             actually apply
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr devices

Usage: dr devices [options] [command]

Operations on Datarails devices (IT device inventory — Badge client machines)

Options:
  -h, --help                            display help for command

Commands:
  list [options]                        List devices that have logged in within
                                        the tenant's retention window
  get [options] <id>                    Show details for a single device by id
  logs [options] <id>                   Fetch the device-side log
                                        index/metadata as raw JSON
  request-logs [options] <ids...>       Queue a log-upload request for one or
                                        more devices
  received-logs [options] <machine_id>  List uploaded log bundles for a machine
                                        (after request-logs)
  download-logs [options] <uuid>        Download an uploaded log bundle (binary
                                        zip) by uuid
  commands [options] <machine_id>       List queued / executed remote commands
                                        for a machine
  command-delete [options] [ids...]     Delete remote commands (two-step
                                        confirm): one id, several ids, or every
                                        WAITING command on a machine (--machine
                                        <machine_id> --all-queued). Several
                                        commands are one batch — one plan, one
                                        token, one confirmation.
  help [command]                        display help for command

dr devices command-delete

Usage: dr devices command-delete [options] [ids...]

Delete remote commands (two-step confirm): one id, several ids, or every
WAITING command on a machine (--machine <machine_id> --all-queued). Several
commands are one batch — one plan, one token, one confirmation.

Arguments:
  ids                      command id(s) — positive integers; omit with
                           --all-queued

Options:
  --machine <machine_id>   Machine whose queue to read: required with
                           --all-queued; with ids it adds each command's
                           details to the plan
  --all-queued             Target every WAITING command in the machine's queue
                           (as listed by `devices commands`) (default: false)
  --data-query <id>        With --all-queued: only commands for this data-query
                           id
  --plan <plan_id>         With --all-queued, on confirm: the plan id the plan
                           printed in its confirm command. Exactly the commands
                           that plan listed are deleted
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  --timeout <seconds>      Minimum whole-command budget in seconds. Default 30s
                           for one item; a batch gets 30s + 5s per call (capped
                           at 1800s). This is a floor, so it only ever widens
                           that budget; max 86400s
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr devices commands

Usage: dr devices commands [options] <machine_id>

List queued / executed remote commands for a machine

Arguments:
  machine_id          machine id (UUID-like string)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr devices download-logs

Usage: dr devices download-logs [options] <uuid>

Download an uploaded log bundle (binary zip) by uuid

Arguments:
  uuid                 request-log uuid (from `devices received-logs`)

Options:
  -o, --output <path>  output path (default: <uuid>_log.zip; '-' streams to
                       stdout) (default: "")
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr devices get

Usage: dr devices get [options] <id>

Show details for a single device by id

Arguments:
  id                  device id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr devices list

Usage: dr devices list [options]

List devices that have logged in within the tenant's retention window

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr devices logs

Usage: dr devices logs [options] <id>

Fetch the device-side log index/metadata as raw JSON

Arguments:
  id                  device id (positive integer)

Options:
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr devices received-logs

Usage: dr devices received-logs [options] <machine_id>

List uploaded log bundles for a machine (after request-logs)

Arguments:
  machine_id          machine id (UUID-like string)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr devices request-logs

Usage: dr devices request-logs [options] <ids...>

Queue a log-upload request for one or more devices

Arguments:
  ids                 one or more device ids (positive integers)

Options:
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr documents

Usage: dr documents [options] [command]

Document-level operations (support API toggle, calculate, Budget Management
split)

Options:
  -h, --help                            display help for command

Commands:
  support-api                           Toggle a document's support_api flag
  calculate [options] <doc_id>          Trigger a recompute for a target date
                                        tag (Year/Quarter/Month/Day/Week)
  sheets [options] <doc_id>             List sheet names on a document's latest
                                        version (PUT
                                        /api/documents/<id>/latest_sheet_names
                                        with --template scope)
  debug-zip [options] <doc_version_id>  Download the published-item /
                                        presentation debug zip for a
                                        DocumentVersion (id is from `dr filebox
                                        versions <doc_id>`, NOT a doc id)
  auto-calculate [options] <file>       Calculate a raw .xlsx without a filebox
                                        (DR-48445): upload, poll, and download
                                        the result
  add-functions [options] <file>        Register Datarails functions into a raw
                                        .xlsx (DR-50743): upload, poll, and
                                        download the result
  add-extables [options] <file>         Register Datarails ExTables into a raw
                                        .xlsx (DR-50832): upload, poll, and
                                        download the result
  add-dynamic-ranges [options] <file>   Register Datarails Dynamic Ranges into
                                        a raw .xlsx (DR-50909): upload, poll,
                                        and download the result
  split                                 Budget Management Split: split a
                                        filebox document into
                                        per-dimension-value child files (the ⋮
                                        → Split wizard)
  help [command]                        display help for command

dr documents add-dynamic-ranges

Usage: dr documents add-dynamic-ranges [options] <file>

Register Datarails Dynamic Ranges into a raw .xlsx (DR-50909): upload, poll,
and download the result

Arguments:
  file                       path to the local .xlsx to add dynamic ranges to

Options:
  --range <id>               id of a Datarails Dynamic Range to register
                             (repeatable); its name is resolved from the tenant
                             (default: [])
  --formula <formula>        attach a Datarails DR.* formula column to the
                             range, e.g. --formula "=DR.QTD(rev)" (requires
                             exactly one --range)
  --preserve-static-values   register every --range with
                             Preserve_Static_Values: true, so a refresh keeps
                             hand-entered values
  --out <path>               where to write the result (default:
                             <name>_dynamic_ranges_added.xlsx next to the
                             input)
  --poll-interval <seconds>  seconds between status polls (default: 2)
  --timeout <seconds>        max seconds to wait for the result (default: 300)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr documents add-extables

Usage: dr documents add-extables [options] <file>

Register Datarails ExTables into a raw .xlsx (DR-50832): upload, poll, and
download the result

Arguments:
  file                       path to the local .xlsx to add ExTables to

Options:
  --extable <id>             id of a Datarails ExTable to register
                             (repeatable); its name is resolved from the tenant
                             (default: [])
  --out <path>               where to write the result (default:
                             <name>_extables_added.xlsx next to the input)
  --poll-interval <seconds>  seconds between status polls (default: 2)
  --timeout <seconds>        max seconds to wait for the result (default: 300)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr documents add-functions

Usage: dr documents add-functions [options] <file>

Register Datarails functions into a raw .xlsx (DR-50743): upload, poll, and
download the result

Arguments:
  file                       path to the local .xlsx to add functions to

Options:
  --function <id>            id of a Datarails function to register
                             (repeatable); its name is resolved from the tenant
                             (default: [])
  --out <path>               where to write the result (default:
                             <name>_functions_added.xlsx next to the input)
  --poll-interval <seconds>  seconds between status polls (default: 2)
  --timeout <seconds>        max seconds to wait for the result (default: 300)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr documents auto-calculate

Usage: dr documents auto-calculate [options] <file>

Calculate a raw .xlsx without a filebox (DR-48445): upload, poll, and download
the result

Arguments:
  file                       path to the local .xlsx to calculate

Options:
  --out <path>               where to write the result (default:
                             <name>_auto_calculated.xlsx next to the input)
  --poll-interval <seconds>  seconds between status polls (default: 2)
  --timeout <seconds>        max seconds to wait for the result (default: 300)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr documents calculate

Usage: dr documents calculate [options] <doc_id>

Trigger a recompute for a target date tag (Year/Quarter/Month/Day/Week)

Arguments:
  doc_id               document id (positive integer)

Options:
  --year <YYYY>        target year, e.g. 2026
  --quarter <YYYY-Qn>  target quarter, e.g. 2026-Q2
  --month <YYYY-MM>    target month, e.g. 2026-04
  --day <YYYY-MM-DD>   target day, e.g. 2026-04-15
  --week <YYYY-Www>    target ISO week, e.g. 2026-W14
  --backward           roll backward (default: forward) (default: false)
  --no-roll            skip roll across periods (default: roll)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr documents debug-zip

Usage: dr documents debug-zip [options] <doc_version_id>

Download the published-item / presentation debug zip for a DocumentVersion (id
is from `dr filebox versions <doc_id>`, NOT a doc id)

Arguments:
  doc_version_id      DocumentVersion id (positive integer)

Options:
  --output <path>     Filesystem path to write the .zip to (required; binary is
                      never sent to stdout)
  --type <kind>       Which archive to fetch: published_item (default) or
                      presentation (default: "published_item")
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr documents sheets

Usage: dr documents sheets [options] <doc_id>

List sheet names on a document's latest version (PUT
/api/documents/<id>/latest_sheet_names with --template scope)

Arguments:
  doc_id              document id (positive integer)

Options:
  --template <id>     Target template id — scopes which sheets are returned
  --json              Output raw JSON instead of one-sheet-per-line (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr documents split

Usage: dr documents split [options] [command]

Budget Management Split: split a filebox document into per-dimension-value
child files (the ⋮ → Split wizard)

Options:
  -h, --help                   display help for command

Commands:
  create [options]             Create a split — one child file per dimension
                               value (POST /api/documents/cycles/splits, 201;
                               two-step confirm)
  list [options]               List document splits (latest per document)
  status [options] <split_id>  Show a split's status
  undo [options] <split_id>    Undo a split — archives child files, restores
                               the parent (two-step confirm)
  help [command]               display help for command

dr documents split create

Usage: dr documents split create [options]

Create a split — one child file per dimension value (POST
/api/documents/cycles/splits, 201; two-step confirm)

Options:
  --version <id>                 Source DocumentVersion id (required unless
                                 --payload-file)
  --folder-name <name>           Name for the split folder (required unless
                                 --payload-file)
  --field <id>                   Dimension field id to split by, repeatable for
                                 multi-field splits (default: [])
  --values <list>                Comma-separated dimension values — one child
                                 file per value. For values that themselves
                                 contain commas, use the repeatable --value
                                 flag instead
  --value <v>                    A single dimension value (repeatable);
                                 combines with --values and is the escape hatch
                                 for values containing commas (default: [])
  --scenario <type>              Scenario: Actuals | Forecast | Budget (server
                                 default: Budget)
  --input-method <method>        Fill mode: excel_file | web_editor (the
                                 wizard's "Excel file" vs "Web editor")
  --web-editor-sheets <list>     Comma-separated editable tab names (only with
                                 --input-method web_editor)
  --fixed-values                 Freeze numbers into the child files
                                 (export_as_values=true, the wizard's "Fixed
                                 values"); default is live, formula-linked data
                                 (default: false)
  --custom-tag <id>              DocumentCustomTag id — server derives
                                 dimension tags + date from it
  --date <n>                     Cycle date integer (overridden by
                                 --custom-tag)
  --dimension-tags-value <json>  Dimension tags as a JSON string, e.g. '{"123":
                                 "FY26"}' (overridden by --custom-tag)
  --payload-file <path>          Send this JSON file as the payload verbatim
                                 (all other payload flags ignored). Also the
                                 path for the Resplit flow
                                 (split_values_to_add) — same confirm gate
  --confirm-token <token>        Token from a prior plan run — required to
                                 actually create the split (default: "")
  --json                         Output the raw created split JSON (default:
                                 false)
  -s, --server <key>             Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                                 DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                                 TEST-5, TEST-6, TEST-7, DEMO) or a full
                                 https://<host>.datarails.com URL. Required.
  --account <email>              Datarails account email (required when
                                 multiple identities are stored for the server)
  -h, --help                     display help for command

dr documents split list

Usage: dr documents split list [options]

List document splits (latest per document)

Options:
  --custom-tag <id>              Filter by DocumentCustomTag id
  --dimension-tags-value <json>  Filter by dimension tags JSON string
  --json                         Output raw JSON instead of a table (default:
                                 false)
  -s, --server <key>             Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                                 DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                                 TEST-5, TEST-6, TEST-7, DEMO) or a full
                                 https://<host>.datarails.com URL. Required.
  --account <email>              Datarails account email (required when
                                 multiple identities are stored for the server)
  -h, --help                     display help for command

dr documents split status

Usage: dr documents split status [options] <split_id>

Show a split's status

Arguments:
  split_id            split id (positive integer)

Options:
  --json              Output pretty-printed JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr documents split undo

Usage: dr documents split undo [options] <split_id>

Undo a split — archives child files, restores the parent (two-step confirm)

Arguments:
  split_id                 split id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           undo (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr documents support-api

Usage: dr documents support-api [options] [command]

Toggle a document's support_api flag

Options:
  -h, --help              display help for command

Commands:
  set [options] <doc_id>  Enable or disable support_api for a document
  help [command]          display help for command

dr documents support-api set

Usage: dr documents support-api set [options] <doc_id>

Enable or disable support_api for a document

Arguments:
  doc_id              document id (positive integer)

Options:
  --on                enable support_api (default: false)
  --off               disable support_api (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr dynamic-ranges

Usage: dr dynamic-ranges [options] [command]

Operations on Datarails dynamic ranges (template saved views)

Options:
  -h, --help             display help for command

Commands:
  list [options]         List dynamic ranges on a table
  get [options] <id>     Get a single dynamic range by ID
  create [options]       Create a new dynamic range on a table
  update [options] <id>  Update a dynamic range (read-modify-write). Omitted
                         parts are left untouched, but filters passed here
                         REPLACE all existing filters on the range.
  delete [options] <id>  Delete a dynamic range by ID (two-step confirm)
  data [options] <id>    Fetch data for a dynamic range
  help [command]         display help for command

dr dynamic-ranges create

Usage: dr dynamic-ranges create [options]

Create a new dynamic range on a table

Options:
  --table <id>           Template/table ID (required)
  --name <name>          Dynamic range name (required)
  --fields <csv>         Comma-separated field IDs (required, e.g.
                         "115707,115712")
  --filter <spec>        Include-filter "FIELD_ID=V1,V2" (repeatable); the
                         field need not be in --fields (default: [])
  --exclude <spec>       Exclude-filter "FIELD_ID=V1,V2" (repeatable) (default:
                         [])
  --filters-json <json>  Raw JSON array of {field, values, is_excluded?,
                         override_global_filter?} for advanced/datetime filters
  --json                 Output raw JSON instead of a table (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr dynamic-ranges data

Usage: dr dynamic-ranges data [options] <id>

Fetch data for a dynamic range

Arguments:
  id                  dynamic-range id

Options:
  --table <id>        Template/table ID (required)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr dynamic-ranges delete

Usage: dr dynamic-ranges delete [options] <id>

Delete a dynamic range by ID (two-step confirm)

Arguments:
  id                       dynamic-range id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr dynamic-ranges get

Usage: dr dynamic-ranges get [options] <id>

Get a single dynamic range by ID

Arguments:
  id                  dynamic-range id

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr dynamic-ranges list

Usage: dr dynamic-ranges list [options]

List dynamic ranges on a table

Options:
  --table <id>        Template/table ID (required)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr dynamic-ranges update

Usage: dr dynamic-ranges update [options] <id>

Update a dynamic range (read-modify-write). Omitted parts are left untouched,
but filters passed here REPLACE all existing filters on the range.

Arguments:
  id                     dynamic-range id

Options:
  --table <id>           Template/table ID (defaults to the range's own table)
  --name <name>          New name (default: keep current)
  --fields <csv>         Replace display fields: comma-separated field IDs
  --filter <spec>        Include-filter "FIELD_ID=V1,V2" (repeatable; replaces
                         ALL existing filters) (default: [])
  --exclude <spec>       Exclude-filter "FIELD_ID=V1,V2" (repeatable; replaces
                         ALL existing filters) (default: [])
  --filters-json <json>  Raw JSON array of {field, values, is_excluded?,
                         override_global_filter?} for advanced/datetime filters
                         (replaces ALL existing filters)
  --clear-filters        Remove every filter from the range (sends filters: [])
                         (default: false)
  --json                 Output raw JSON instead of a table (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr entities

Usage: dr entities|companies [options] [command]

Datarails entities (companies) management — wraps /bo/pre_kickoff/* + a few
/api/* lifecycle calls.

Options:
  -h, --help                         display help for command

Commands:
  list [options]                     List entities and groups (GET
                                     /bo/pre_kickoff/manage_companies/v2)
  qbd-availability [options]         List QBD company files (greens=importable,
                                     already_added, grays=blocked) —
                                     discoverability for `dr entities create
                                     qbd`
  netsuite-connections [options]     List NetSuite connections (available +
                                     already-added) — discoverability for `dr
                                     entities create netsuite`
  create                             Create a new entity. Pick a subcommand for
                                     the source system: `qbo`, `xero`, `qbd`,
                                     or `netsuite`. Each has type-specific
                                     required fields.
  rename [options] <doc_ids>         Rename one or more entities (PUT
                                     /bo/pre_kickoff/manage_companies/v2)
  rename-group [options] <doc_ids>   Move one or more entities into a group
                                     (PUT
                                     /bo/pre_kickoff/qbo_manage_companies/v2 —
                                     group rename)
  delete [options] <doc_ids>         Delete one or more entities
                                     (DELETE-with-body
                                     /bo/pre_kickoff/qbo_manage_companies/v2;
                                     two-step confirm gate)
  mark-completed [options] <doc_id>  Mark an entity as manually completed — IT
                                     support override for stuck-state recovery
                                     (PUT
                                     /api/documents/<doc>/mark_as_manually_complited;
                                     server-side path keeps the 'complited'
                                     typo)
  help [command]                     display help for command

dr entities create

Usage: dr entities create [options] [command]

Create a new entity. Pick a subcommand for the source system: `qbo`, `xero`,
`qbd`, or `netsuite`. Each has type-specific required fields.

Options:
  -h, --help          display help for command

Commands:
  qbo [options]       Create a QuickBooks Online entity
  xero [options]      Create a Xero entity
  qbd [options]       Create a QuickBooks Desktop entity from one or more
                      authenticated company files (use `dr entities
                      qbd-availability` to list options)
  netsuite [options]  Create a NetSuite entity from a connection id (use `dr
                      entities netsuite-connections` to list options)
  help [command]      display help for command

dr entities create netsuite

Usage: dr entities create netsuite [options]

Create a NetSuite entity from a connection id (use `dr entities
netsuite-connections` to list options)

Options:
  --connection <id>   Connection id (must appear in
                      netsuite-connections.available)
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr entities create qbd

Usage: dr entities create qbd [options]

Create a QuickBooks Desktop entity from one or more authenticated company files
(use `dr entities qbd-availability` to list options)

Options:
  --company-files <list>  Comma-separated company-file names (must appear in
                          qbd-availability greens)
  --first                 Mark as the first entity of this type in the org
                          (default: false)
  --json                  Output raw JSON instead of a summary (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  -h, --help              display help for command

dr entities create qbo

Usage: dr entities create qbo [options]

Create a QuickBooks Online entity

Options:
  --credential <s>              OAuth credential / SSO token
  --group <s>                   Parent group name (optional)
  --first                       Mark as the first entity of this type in the
                                org (default: false)
  --ignore-credential-conflict  Force-create even if the credential conflicts
                                with an existing entity (default: false)
  --json                        Output raw JSON instead of a summary (default:
                                false)
  -s, --server <key>            Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                                DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                                TEST-5, TEST-6, TEST-7, DEMO) or a full
                                https://<host>.datarails.com URL. Required.
  --account <email>             Datarails account email (required when multiple
                                identities are stored for the server)
  -h, --help                    display help for command

dr entities create xero

Usage: dr entities create xero [options]

Create a Xero entity

Options:
  --credential <s>              OAuth credential / SSO token
  --group <s>                   Parent group name (optional)
  --first                       Mark as the first entity of this type in the
                                org (default: false)
  --ignore-credential-conflict  Force-create even if the credential conflicts
                                with an existing entity (default: false)
  --json                        Output raw JSON instead of a summary (default:
                                false)
  -s, --server <key>            Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                                DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                                TEST-5, TEST-6, TEST-7, DEMO) or a full
                                https://<host>.datarails.com URL. Required.
  --account <email>             Datarails account email (required when multiple
                                identities are stored for the server)
  -h, --help                    display help for command

dr entities delete

Usage: dr entities delete [options] <doc_ids>

Delete one or more entities (DELETE-with-body
/bo/pre_kickoff/qbo_manage_companies/v2; two-step confirm gate)

Arguments:
  doc_ids                  comma-separated document ids to delete

Options:
  --confirm-token <token>  Token from the plan-phase output; required to
                           actually delete
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr entities list

Usage: dr entities list [options]

List entities and groups (GET /bo/pre_kickoff/manage_companies/v2)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr entities mark-completed

Usage: dr entities mark-completed [options] <doc_id>

Mark an entity as manually completed — IT support override for stuck-state
recovery (PUT /api/documents/<doc>/mark_as_manually_complited; server-side path
keeps the 'complited' typo)

Arguments:
  doc_id              document id (positive integer)

Options:
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr entities netsuite-connections

Usage: dr entities netsuite-connections [options]

List NetSuite connections (available + already-added) — discoverability for `dr
entities create netsuite`

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr entities qbd-availability

Usage: dr entities qbd-availability [options]

List QBD company files (greens=importable, already_added, grays=blocked) —
discoverability for `dr entities create qbd`

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr entities rename

Usage: dr entities rename [options] <doc_ids>

Rename one or more entities (PUT /bo/pre_kickoff/manage_companies/v2)

Arguments:
  doc_ids             comma-separated document ids

Options:
  --alias <s>         New display alias
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr entities rename-group

Usage: dr entities rename-group [options] <doc_ids>

Move one or more entities into a group (PUT
/bo/pre_kickoff/qbo_manage_companies/v2 — group rename)

Arguments:
  doc_ids             comma-separated document ids

Options:
  --group <s>         New group name
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr error-enrichments

Usage: dr error-enrichments [options] [command]

Manage integration error-enrichment rules (per-server admin surface)

Options:
  -h, --help                 display help for command

Commands:
  list [options]             List enrichment rules on one server or across
                             servers
  stats [options]            Aggregate rule stats (hits, feedback,
                             needs-attention digest)
  get [options] <ids...>     Show one or more rules in full (pattern, steps,
                             examples, counters)
  create [options]           Create one or more rules (two-step confirm)
  update [options] [ids...]  Partially update one or more rules (two-step
                             confirm)
  delete [options] <ids...>  Delete one or more rules (two-step confirm; one
                             word gate on production)
  test-regex [options]       Validate a pattern server-side against error
                             samples
  export [options]           Download all rules as CSV (the backup primitive),
                             one server or many
  import [options]           Replace ALL rules from a CSV backup (destructive;
                             word gate on production)
  types                      Manage the classification types rules can be filed
                             under (per-server)
  help [command]             display help for command

dr error-enrichments create

Usage: dr error-enrichments create [options]

Create one or more rules (two-step confirm)

Options:
  --confirm-token <token>    Token from the plan step
  --timeout <seconds>        Whole-command budget in seconds. Default 30s for
                             one rule; a batch gets 30s + 5s per rule (capped
                             at 1800s)
  --payload-file <path>      JSON file with serializer-shaped rule fields, or
                             an ARRAY of them to create several
  --integration-type <name>  Integration type name, e.g. NetSuite
  --rank <n>                 Resolver priority within the integration type (>=
                             1)
  --pattern <regex>          Python regex matched against the raw error
  --description <text>       Readable message shown to the user
  --resolution-step <text>   Resolution step (repeatable). To clear all steps,
                             use --payload-file with {"resolution_steps": []}
                             (default: [])
  --example <text>           Raw error example (repeatable). To clear all
                             examples, use --payload-file with {"examples": []}
                             (default: [])
  --classification <c>       Classification type name (see `dr
                             error-enrichments types list`)
  --approved <bool>          true | false
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr error-enrichments delete

Usage: dr error-enrichments delete [options] <ids...>

Delete one or more rules (two-step confirm; one word gate on production)

Options:
  --confirm-token <token>  Token from the plan step
  --timeout <seconds>      Whole-command budget in seconds. Default 30s for one
                           rule; a batch gets 30s + 5s per rule (capped at
                           1800s)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr error-enrichments export

Usage: dr error-enrichments export [options]

Download all rules as CSV (the backup primitive), one server or many

Options:
  --out <path>        Write to a file instead of stdout; with --all-servers /
                      --servers, a DIRECTORY that receives one <SERVER>.csv per
                      server
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  --all-servers       Query every production server (skips servers without a
                      stored login) (default: false)
  --servers <keys>    Comma-separated server keys to query
  --include-test      With --all-servers: include DEV / TEST servers too
                      (default: false)
  -h, --help          display help for command

dr error-enrichments get

Usage: dr error-enrichments get [options] <ids...>

Show one or more rules in full (pattern, steps, examples, counters)

Options:
  --json               Output raw JSON (default: false)
  --timeout <seconds>  Whole-command budget in seconds. Default 30s for one
                       rule; a batch gets 30s + 5s per rule (capped at 1800s)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr error-enrichments import

Usage: dr error-enrichments import [options]

Replace ALL rules from a CSV backup (destructive; word gate on production)

Options:
  --file <path>            CSV file (export format)
  --confirm-token <token>  Token from the plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr error-enrichments list

Usage: dr error-enrichments list [options]

List enrichment rules on one server or across servers

Options:
  --json                     Output raw JSON instead of tables (default: false)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  --all-servers              Query every production server (skips servers
                             without a stored login) (default: false)
  --servers <keys>           Comma-separated server keys to query
  --include-test             With --all-servers: include DEV / TEST servers too
                             (default: false)
  --integration-type <name>  Filter by integration type (repeatable) (default:
                             [])
  --classification <c>       Filter by classification type name (repeatable;
                             see `dr error-enrichments types list`) (default:
                             [])
  --approved <bool>          Filter by approved state (true | false)
  --search <q>               Search pattern / description / type name
  -h, --help                 display help for command

dr error-enrichments stats

Usage: dr error-enrichments stats [options]

Aggregate rule stats (hits, feedback, needs-attention digest)

Options:
  --json                     Output raw JSON instead of tables (default: false)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  --all-servers              Query every production server (skips servers
                             without a stored login) (default: false)
  --servers <keys>           Comma-separated server keys to query
  --include-test             With --all-servers: include DEV / TEST servers too
                             (default: false)
  --integration-type <name>  Filter by integration type (repeatable) (default:
                             [])
  --classification <c>       Filter by classification type name (repeatable;
                             see `dr error-enrichments types list`) (default:
                             [])
  --approved <bool>          Filter by approved state (true | false)
  --search <q>               Search pattern / description / type name
  -h, --help                 display help for command

dr error-enrichments test-regex

Usage: dr error-enrichments test-regex [options]

Validate a pattern server-side against error samples

Options:
  --pattern <regex>      Pattern to validate
  --sample <text>        Raw error sample (repeatable) (default: [])
  --samples-file <path>  File with one sample per line
  --json                 Output raw JSON (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr error-enrichments types

Usage: dr error-enrichments types [options] [command]

Manage the classification types rules can be filed under (per-server)

Options:
  -h, --help        display help for command

Commands:
  list [options]    List classification types on one server or across servers
  create [options]  Add a classification type (two-step confirm)
  help [command]    display help for command

dr error-enrichments types create

Usage: dr error-enrichments types create [options]

Add a classification type (two-step confirm)

Options:
  --name <name>            Type name, e.g. Data-source:Timeout
  --description <text>     What the type covers
  --confirm-token <token>  Token from the plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr error-enrichments types list

Usage: dr error-enrichments types list [options]

List classification types on one server or across servers

Options:
  --json              Output raw JSON instead of tables (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  --all-servers       Query every production server (skips servers without a
                      stored login) (default: false)
  --servers <keys>    Comma-separated server keys to query
  --include-test      With --all-servers: include DEV / TEST servers too
                      (default: false)
  -h, --help          display help for command

dr error-enrichments update

Usage: dr error-enrichments update [options] [ids...]

Partially update one or more rules (two-step confirm)

Options:
  --confirm-token <token>    Token from the plan step
  --timeout <seconds>        Whole-command budget in seconds. Default 30s for
                             one rule; a batch gets 30s + 5s per rule (capped
                             at 1800s)
  --payload-file <path>      JSON file with serializer-shaped rule fields, or
                             an ARRAY of {"id": n, …} per-rule patches
  --integration-type <name>  Integration type name, e.g. NetSuite
  --rank <n>                 Resolver priority within the integration type (>=
                             1)
  --pattern <regex>          Python regex matched against the raw error
  --description <text>       Readable message shown to the user
  --resolution-step <text>   Resolution step (repeatable). To clear all steps,
                             use --payload-file with {"resolution_steps": []}
                             (default: [])
  --example <text>           Raw error example (repeatable). To clear all
                             examples, use --payload-file with {"examples": []}
                             (default: [])
  --classification <c>       Classification type name (see `dr
                             error-enrichments types list`)
  --approved <bool>          true | false
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr extables

Usage: dr extables [options] [command]

Operations on Datarails ExTables (template-derived computed tables)

Options:
  -h, --help             display help for command

Commands:
  list [options]         List ExTables (optionally filtered by template id)
  get [options] <id>     Get a single ExTable's details
  clone [options] <id>   Clone an ExTable under a new name
  delete [options] <id>  Delete an ExTable (two-step confirm)
  help [command]         display help for command

dr extables clone

Usage: dr extables clone [options] <id>

Clone an ExTable under a new name

Arguments:
  id                  extable id to clone (positive integer)

Options:
  --name <name>       Name for the new ExTable
  --json              Output raw JSON server response instead of a summary
                      (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr extables delete

Usage: dr extables delete [options] <id>

Delete an ExTable (two-step confirm)

Arguments:
  id                       extable id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr extables get

Usage: dr extables get [options] <id>

Get a single ExTable's details

Arguments:
  id                  extable id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr extables list

Usage: dr extables list [options]

List ExTables (optionally filtered by template id)

Options:
  --table <id>        Client-side filter: only ExTables whose template equals
                      this id
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr features

Usage: dr features [options] [command]

Operations on Datarails feature flags (read-only listings + per-org toggle)

Options:
  -h, --help      display help for command

Commands:
  list [options]  List feature flags (paginated, or enriched with --enriched)
  groups          Operations on feature-flag groups
  orgs            Operations on the per-organization feature-flag mapping
  help [command]  display help for command

dr features groups

Usage: dr features groups [options] [command]

Operations on feature-flag groups

Options:
  -h, --help          display help for command

Commands:
  list [options]      List feature-flag groups
  get [options] <id>  Show details for a single feature-flag group by id
  help [command]      display help for command

dr features groups get

Usage: dr features groups get [options] <id>

Show details for a single feature-flag group by id

Arguments:
  id                  group id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr features groups list

Usage: dr features groups list [options]

List feature-flag groups

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr features list

Usage: dr features list [options]

List feature flags (paginated, or enriched with --enriched)

Options:
  --search <s>        Substring filter against name/description (default: "")
  --page <n>          1-based page number (default: "1")
  --page-size <n>     Page size (1..500) (default: "50")
  --enriched          Switch to the enriched endpoint (id/name/app_label)
                      (default: false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr features orgs

Usage: dr features orgs [options] [command]

Operations on the per-organization feature-flag mapping

Options:
  -h, --help                 display help for command

Commands:
  list [options] <org_id>    List feature flags enabled on an organization
  add [options] <org_id>     Enable one or more feature flags on an
                             organization (two-step confirm)
  remove [options] <org_id>  Disable one or more feature flags on an
                             organization (two-step confirm)
  help [command]             display help for command

dr features orgs add

Usage: dr features orgs add [options] <org_id>

Enable one or more feature flags on an organization (two-step confirm)

Arguments:
  org_id                   organization id (positive integer)

Options:
  --flag <ref>             Flag id or name (repeatable) (default: [])
  --confirm-token <token>  Token from a prior plan run — required to actually
                           toggle (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr features orgs list

Usage: dr features orgs list [options] <org_id>

List feature flags enabled on an organization

Arguments:
  org_id              organization id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr features orgs remove

Usage: dr features orgs remove [options] <org_id>

Disable one or more feature flags on an organization (two-step confirm)

Arguments:
  org_id                   organization id (positive integer)

Options:
  --flag <ref>             Flag id or name (repeatable) (default: [])
  --confirm-token <token>  Token from a prior plan run — required to actually
                           toggle (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox

Usage: dr filebox|fileboxes [options] [command]

Operations on Datarails fileboxes (documents) and their versions

Options:
  -h, --help                                      display help for command

Commands:
  list [options]                                  List fileboxes on the tenant
  get [options] <doc_id>                          Get a filebox's latest version details
  versions [options] <doc_id>                     List versions of a filebox. Default: active versions only. --archived: only archived (auto_save) versions; --all: active + archived. --archived/--all add an ARCHIVED column.
  tags [options]                                  List available filebox tags (dates + dimensions) on the tenant
  sheets [options] <version_id>                   List sheets in a filebox version (names, indices, row/col counts)
  preview [options] <version_id>                  Preview raw cell data of a filebox version (row 1 is headers)
  create [options]                                Create an empty filebox (no file yet). Resolves the date tag config from /versions/tags. Pass --folder to create a folder filebox instead (no date tag, no version, no data — used to mirror the org-bootstrap hierarchy of Actuals / COA / FX Rates / Configuration).
  upload [options]                                Upload a file to create a new filebox (Actuals|Budget|Forecast|None)
  upload-version [options] <doc_id>               Upload a new version to an existing filebox
  update [options] <id>                           Update filebox settings — `--name` for the common rename case, or `--payload-file` for arbitrary JSON (any field accepted by the server's editable_fields allowlist on PUT /api/documents/<id>: name, parent, auto_save, date_format, use_type, is_present_in_dashboard_reports). For tag config use `set-tag-config`; for re-parenting use `set-parent`.
  push [options] <id>                             Copy a filebox into other organizations (two-step confirm). Destinations must be listed by `dr organizations push-targets`.
  archive [options] <id>                          Archive a filebox (two-step confirmation — soft-deletes; recoverable via admin tools until async cleanup completes)
  archive-version [options] [version_id]          Archive a single filebox version (two-step confirmation — toggles the version-level archive flag). Address it by global version id, or by --doc with --version-number/--latest-active.
  restore-version [options] [version_id]          Restore (un-archive) a single filebox version — inverse of archive-version, no confirm needed. Address it by global version id, or by --doc with --version-number/--latest-archived.
  set-version-include [options] [version_id]      Include a filebox version in the database, or exclude it (two-step confirmation). Address it by global version id, or by --doc with --version-number/--latest-active/--all-except-latest. --all-except-latest sweeps every active version behind the latest and always keeps the latest.
  set-version-date-tag [options] <version_id>     Set the date-tag value on a single document version (PUT tags_and_label)
  set-version-label [options] [version_id]        Set or clear a filebox version's label (date and dimension tags are left unchanged). Address it by global version id, or by --doc with --version-number/--latest-active.
  set-version-workflow [options] <version_id>     Set the WORKFLOW tag value on a single document version (Approve / Reject / move to In Progress / etc.)
  set-version-file-status [options] <version_id>  Set the File Status tag (Draft / Final) on a single document version, then read it back
  set-version-cycle [options] <version_id>        Set the cycle date + scenario name on a version of a forecast/budget filebox (validated against existing cycles)
  download [options] <doc_id>                     Download a filebox version to disk (default: latest version)
  data-query|dataquery                            Read/write/sync the DataIntegrationQuery attached to a filebox
  share [options] <doc_id>                        Share a filebox with one or more users (POST /api/documents/<id>/users)
  shares [options] <doc_id>                       List the users and permission-groups a filebox is shared with
  set-option [options] <doc_id>                   Toggle per-document options (PUT /api/documents/<id>/change_option). Surfaces --bank-integration as a typed flag; other allow-listed options can be passed via --option KEY=VALUE. Unknown keys are rejected — the server accepts any key and stores it silently, so the CLI is the only gatekeeper.
  set-tag-config [options] <doc_id>               Add/remove tenant tags on an existing filebox's tags_config (PUT /api/documents/<id> with tags_config_str). Tag names are matched case-insensitively against /api/documents/versions/tags. Sibling to `filebox create --date-sub-type` which only sets the initial config.
  set-parent [options] <doc_id>                   Move a filebox under a different folder, or use --detach to move it to the root (PUT /api/documents/<id> with `parent`). Sibling to `filebox create --parent`.
  get-auto-calc-settings [options] <doc_id>       Read the AUTO-CALCULATE settings row for a filebox (GET /api/documents/<id>/auto_calculate_settings). Surfaces trigger_by, time_interval, source_files, generate_new_version, selected_dimension, and time_period_for_new_tag. Returns null (auto-calc OFF) when no settings row exists. This reads the AUTO-CALCULATE row, not the Workato data-query sync schedule — for that, see `dr filebox data-query get`.
  set-auto-calc-frequency [options] <doc_id>      Set the AUTO-CALCULATE cron schedule for a filebox (two-step confirmation; PUT /api/documents/<id>/auto_calculate_settings). To inspect the current settings without changing them, use `dr filebox get-auto-calc-settings`. Auto-calculate is a separate Datarails feature from the Workato data-query sync schedule — for that, use `dr filebox data-query set-sync-interval`. The cron string is forwarded to the server verbatim; only basic syntactic checks happen client-side.
  set-sync-frequency [options] <doc_id>           [DEPRECATED — renamed] Alias of `set-auto-calc-frequency`. The old name was misleading: this command controls auto-calculate, NOT the Workato data-query sync schedule. For Workato sync schedule, use `dr filebox data-query set-sync-interval`.
  lock [options] <doc_id>                         Lock a filebox and all descendants (two-step confirmation; PUT /api/documents/<id>/lock with {locked:true, recursive:true}). Cascades to every child document — read-only across the whole subtree until unlocked.
  unlock [options] <doc_id>                       Unlock a filebox and all descendants (PUT /api/documents/<id>/lock with {locked:false, recursive:true}). Inverse of `lock`; no confirmation required.
  lock-date-tag [options] <doc_id>                Lock a single date-tag value on a filebox (two-step confirmation; PUT /api/documents/<id>/datetag/<value>/lock with {locked:true}). Prevents new version uploads matching that date tag while leaving other values writable. The target epoch is resolved from the filebox's actual version tags (tags[].value) so the lock matches real versions — a dimension flag (e.g. --month 2026-04) that matches no version errors instead of silently no-op'ing. Use --value <epoch> to lock a raw value directly.
  unlock-date-tag [options] <doc_id>              Unlock a single date-tag value on a filebox (PUT /api/documents/<id>/datetag/<value>/lock with {locked:false}). Inverse of `lock-date-tag`; no confirmation required. Resolves the target epoch from real version tags (or pass --value <epoch>).
  locked-date-tags [options] <doc_id>             List the date-tag values currently locked on a filebox (GET /api/documents/<id>/locked_datetags)
  validation-rules                                Filebox validation-rules: list option schema or set rules on a document
  kind-explain [options] <filebox_ids...>         Why fileboxes have their type: the stored type and who set it, what the migration's rules make of it, whether the two agree, the rule, why, and the evidence (read-only, support seat only)
  kind-summary [options]                          How far the seat's organization is typed: live and archived fileboxes, typed and untyped, who set the types, and every stored combination (read-only, support seat only)
  rescan-version [options] <version_id>           Re-extract ONE filebox version in place, without changing its tags — the UI version "three dots > Rescan". Only this version is re-extracted (not the rest of its filebox or collection process), with the tables’ current datamappers; its rows in each table are replaced, not duplicated. Two-step confirmation: run once to see the version, filebox, tags and tables and get a token, then re-run with --confirm-token.
  custom-reports                                  SuiteQL custom reports of a filebox's NetSuite connection: named queries its fileboxes share
  help [command]                                  display help for command

dr filebox archive

Usage: dr filebox archive [options] <id>

Archive a filebox (two-step confirmation — soft-deletes; recoverable via admin
tools until async cleanup completes)

Arguments:
  id                       filebox id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           archive (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox archive-version

Usage: dr filebox archive-version [options] [version_id]

Archive a single filebox version (two-step confirmation — toggles the
version-level archive flag). Address it by global version id, or by --doc with
--version-number/--latest-active.

Arguments:
  version_id               document version id (global). Omit to address by
                           --doc + --version-number/--latest-active.

Options:
  --doc <doc_id>           filebox id — resolve the version within this filebox
  --version-number <n>     per-filebox version number to archive (requires
                           --doc)
  --latest-active          archive the latest active version of --doc (requires
                           --doc) (default: false)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           archive (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox create

Usage: dr filebox create [options]

Create an empty filebox (no file yet). Resolves the date tag config from
/versions/tags. Pass --folder to create a folder filebox instead (no date tag,
no version, no data — used to mirror the org-bootstrap hierarchy of Actuals /
COA / FX Rates / Configuration).

Options:
  --name <name>        Filebox display name (required) (default: "")
  --scenario <s>       Scenario: Actuals|Budget|Forecast|None (default:
                       "Actuals")
  --date-sub-type <t>  Date tag sub_type (month|quarter|year|...). Ignored with
                       --no-date or --folder. (default: "month")
  --parent <id>        Parent folder filebox id (0 = no parent) (default: "0")
  --no-date            Create the filebox without any date tag config
  --folder             Create a folder filebox (is_folder=true). No date tag is
                       resolved; --date-sub-type is ignored. Use --parent to
                       nest folders. Closes gap #25.
  --json               Output raw JSON instead of a summary (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr filebox custom-reports

Usage: dr filebox custom-reports [options] [command]

SuiteQL custom reports of a filebox's NetSuite connection: named queries its
fileboxes share

Options:
  -h, --help                                display help for command

Commands:
  list [options] <filebox_id>               List the custom reports of the filebox's NetSuite connection, with how many fileboxes use each
  create [options] <filebox_id>             Create a custom report on the filebox's NetSuite connection and link the filebox to it, replacing its query (two-step confirmation). The filebox's data query must already be SuiteQL. 409 means the name is taken.
  apply [options] <filebox_id> <report_id>  Link the filebox to an existing custom report of its connection, replacing its query with the report's (two-step confirmation)
  help [command]                            display help for command

dr filebox custom-reports apply

Usage: dr filebox custom-reports apply [options] <filebox_id> <report_id>

Link the filebox to an existing custom report of its connection, replacing its
query with the report's (two-step confirmation)

Arguments:
  filebox_id               filebox id (positive integer)
  report_id                custom report id (from custom-reports list)

Options:
  --confirm-token <token>  Token from a prior plan run - required to actually
                           apply (default: "")
  --json                   Output the raw response as JSON (decoded) (default:
                           false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox custom-reports create

Usage: dr filebox custom-reports create [options] <filebox_id>

Create a custom report on the filebox's NetSuite connection and link the
filebox to it, replacing its query (two-step confirmation). The filebox's data
query must already be SuiteQL. 409 means the name is taken.

Arguments:
  filebox_id               filebox id (positive integer)

Options:
  --name <name>            Report name, unique on the connection (required)
  --query-file <path>      File holding the SuiteQL query (required)
  --confirm-token <token>  Token from a prior plan run - required to actually
                           create (default: "")
  --json                   Output the raw response as JSON (decoded) (default:
                           false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox custom-reports list

Usage: dr filebox custom-reports list [options] <filebox_id>

List the custom reports of the filebox's NetSuite connection, with how many
fileboxes use each

Arguments:
  filebox_id          filebox id (positive integer)

Options:
  --json              Output the raw response as JSON (decoded) (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox data-query

Usage: dr filebox data-query|dataquery [options] [command]

Read/write/sync the DataIntegrationQuery attached to a filebox

Options:
  -h, --help                                display help for command

Commands:
  get [options] <filebox_id>                Show the data-query attached to a filebox (or indicate none)
  set [options] <filebox_id>                Create or update the data-query for a filebox (payload-file only). Write `config` and its `config.query` (the "Query for sync" field) as natural nested objects — both are JSON-encoded to strings on the way out, which is what the server's write serializer and the filebox settings UI expect. Exception: a NetSuite query (`objectType: new_net_suite_api …`) is always sent as an object, because the NetSuite sync cannot read a string.
  set-sync-interval [options] <filebox_id>  Set the sync_interval (cron) on an existing data-query for a filebox (PUT /api/documents/<id>/data_query). Controls how often the data-query polls — applies to Workato-backed AND connector-platform (DatarailsConnector) fileboxes. The cron is evaluated as 5-field UTC; a 6th field, if given, is a timezone offset the server folds into UTC. Distinct from `filebox set-auto-calc-frequency`, which controls the unrelated auto-calculate feature.
  clear [options] <filebox_id>              Detach + delete the data-query from a filebox (two-step confirmation)
  sync [options] <filebox_id>               Manually trigger a sync of the filebox's data-query (async on server). --date YYYY-MM-DD (repeatable) scopes the sync to that date, truncated to whatever granularity the filebox's own date tag uses — e.g. --date 2026-07-01 syncs "July 2026" on a monthly filebox, "Q3 2026" on a quarterly one, or the exact day/ISO week on a daily/weekly one. Repeat to backfill several periods in one call. Balances from an aggregator (Plaid, Quiltt, Salt Edge, Flinks) are always today's balance whatever --date says, so backfilling them writes identical versions under different dates (the CLI warns): backfill only transactions, sync balances for the current period and let the nightly schedule build the history. Multi-period balance backfill works only on a direct bank API connection.
  help [command]                            display help for command

dr filebox data-query clear

Usage: dr filebox data-query clear [options] <filebox_id>

Detach + delete the data-query from a filebox (two-step confirmation)

Arguments:
  filebox_id               filebox id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           clear (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox data-query get

Usage: dr filebox data-query get [options] <filebox_id>

Show the data-query attached to a filebox (or indicate none)

Arguments:
  filebox_id          filebox id (positive integer)

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox data-query set

Usage: dr filebox data-query set [options] <filebox_id>

Create or update the data-query for a filebox (payload-file only). Write
`config` and its `config.query` (the "Query for sync" field) as natural nested
objects — both are JSON-encoded to strings on the way out, which is what the
server's write serializer and the filebox settings UI expect. Exception: a
NetSuite query (`objectType: new_net_suite_api …`) is always sent as an object,
because the NetSuite sync cannot read a string.

Arguments:
  filebox_id             filebox id (positive integer)

Options:
  --payload-file <path>  Path to JSON file with the PUT body (required)
                         (default: "")
  --json                 Output raw JSON instead of a summary (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr filebox data-query set-sync-interval

Usage: dr filebox data-query set-sync-interval [options] <filebox_id>

Set the sync_interval (cron) on an existing data-query for a filebox (PUT
/api/documents/<id>/data_query). Controls how often the data-query polls —
applies to Workato-backed AND connector-platform (DatarailsConnector)
fileboxes. The cron is evaluated as 5-field UTC; a 6th field, if given, is a
timezone offset the server folds into UTC. Distinct from `filebox
set-auto-calc-frequency`, which controls the unrelated auto-calculate feature.

Arguments:
  filebox_id          filebox id (positive integer)

Options:
  --cron <expr>       Cron expression (5 or 6 whitespace-separated fields).
                      Forwarded to the server verbatim after basic syntactic
                      checks.
  --offsets <list>    Comma-separated integer period offsets stored as
                      sync_offset_array (0=current period, -1=previous, …),
                      applied on every scheduled run. Omit to keep the existing
                      offsets, or default to [0] when the data-query has none
                      (the server rejects an empty array). 1–10 values, each in
                      [-100, 100].
  --json              Output the server response as JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox data-query sync

Usage: dr filebox data-query sync [options] <filebox_id>

Manually trigger a sync of the filebox's data-query (async on server). --date
YYYY-MM-DD (repeatable) scopes the sync to that date, truncated to whatever
granularity the filebox's own date tag uses — e.g. --date 2026-07-01 syncs
"July 2026" on a monthly filebox, "Q3 2026" on a quarterly one, or the exact
day/ISO week on a daily/weekly one. Repeat to backfill several periods in one
call. Balances from an aggregator (Plaid, Quiltt, Salt Edge, Flinks) are always
today's balance whatever --date says, so backfilling them writes identical
versions under different dates (the CLI warns): backfill only transactions,
sync balances for the current period and let the nightly schedule build the
history. Multi-period balance backfill works only on a direct bank API
connection.

Arguments:
  filebox_id           filebox id (positive integer)

Options:
  --date <YYYY-MM-DD>  sync whatever date-tag period this date falls in, e.g.
                       2026-07-01. Repeatable. (default: [])
  --tag <json>         Advanced: raw server-shape tag JSON, e.g.
                       '[{"id":6,"name":"Month","value":1782907200}]'. Prefer
                       --date — this is an unvalidated escape hatch for tag
                       dimensions --date doesn't cover (e.g. LIST tags).
                       Repeatable. (default: [])
  --wait               After queueing, wait until every --date period has
                       finished, and say whether each wrote a new version, was
                       unchanged (identical output writes no version), or was
                       empty (the server logged an empty response for that
                       period). Exits non-zero on a failed sync or a timeout.
                       Not combinable with --tag. (default: false)
  --timeout <seconds>  With --wait: how long to wait (default 1800, max 86400)
  --json               With --wait: print the result as one JSON object
                       (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr filebox download

Usage: dr filebox download [options] <doc_id>

Download a filebox version to disk (default: latest version)

Arguments:
  doc_id              filebox id (positive integer)

Options:
  --doc-version <id>  Version ID to download (default: latest version of this
                      filebox). Named --doc-version (NOT --version) because the
                      CLI reserves the global -v/--version for printing the CLI
                      version — passing --version here would silently print the
                      version and download nothing. (default: "0")
  --output <path>     Output path (default: server's filename; extension is
                      corrected to match the file content, so a CSV stored as
                      .xlsx lands as .csv) (default: "")
  --force             Overwrite --output if it already exists (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox get

Usage: dr filebox get [options] <doc_id>

Get a filebox's latest version details

Arguments:
  doc_id              filebox id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox get-auto-calc-settings

Usage: dr filebox get-auto-calc-settings [options] <doc_id>

Read the AUTO-CALCULATE settings row for a filebox (GET
/api/documents/<id>/auto_calculate_settings). Surfaces trigger_by,
time_interval, source_files, generate_new_version, selected_dimension, and
time_period_for_new_tag. Returns null (auto-calc OFF) when no settings row
exists. This reads the AUTO-CALCULATE row, not the Workato data-query sync
schedule — for that, see `dr filebox data-query get`.

Arguments:
  doc_id              filebox id (positive integer)

Options:
  --json              Output the raw server response as JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox kind-explain

Usage: dr filebox kind-explain [options] <filebox_ids...>

Why fileboxes have their type: the stored type and who set it, what the
migration's rules make of it, whether the two agree, the rule, why, and the
evidence (read-only, support seat only)

Arguments:
  filebox_ids         filebox ids (positive integers; "12,34" also accepted)

Options:
  --history           Also list the recorded type changes (20 ids per request)
                      (default: false)
  --as-of <date>      Judge a quiet integration as of this day (YYYY-MM-DD, its
                      end UTC); every other signal is read as it is now
  --json              Print the server's answer instead of the readable form
                      (see below) (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox kind-summary

Usage: dr filebox kind-summary [options]

How far the seat's organization is typed: live and archived fileboxes, typed
and untyped, who set the types, and every stored combination (read-only,
support seat only)

Options:
  --json              Print the server's answer unchanged (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox list

Usage: dr filebox list [options]

List fileboxes on the tenant

Options:
  --include-versions  Include versions inline in the response (default: false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox lock

Usage: dr filebox lock [options] <doc_id>

Lock a filebox and all descendants (two-step confirmation; PUT
/api/documents/<id>/lock with {locked:true, recursive:true}). Cascades to every
child document — read-only across the whole subtree until unlocked.

Arguments:
  doc_id                   filebox id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           lock (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox lock-date-tag

Usage: dr filebox lock-date-tag [options] <doc_id>

Lock a single date-tag value on a filebox (two-step confirmation; PUT
/api/documents/<id>/datetag/<value>/lock with {locked:true}). Prevents new
version uploads matching that date tag while leaving other values writable. The
target epoch is resolved from the filebox's actual version tags (tags[].value)
so the lock matches real versions — a dimension flag (e.g. --month 2026-04)
that matches no version errors instead of silently no-op'ing. Use --value
<epoch> to lock a raw value directly.

Arguments:
  doc_id                   filebox id (positive integer)

Options:
  --year <YYYY>            lock the Year tag value (e.g. 2026)
  --quarter <YYYY-Qn>      lock the Quarter tag value (e.g. 2026-Q2)
  --month <YYYY-MM>        lock the Month tag value (e.g. 2026-04)
  --day <YYYY-MM-DD>       lock the Day tag value (e.g. 2026-04-15)
  --week <YYYY-Www>        lock the Week tag value (ISO week, e.g. 2026-W14)
  --value <epoch>          lock the exact date-tag epoch (bypasses dimension
                           resolution — the value from `dr filebox versions
                           <id> --json` tags[].value). Mutually exclusive with
                           the dimension flags.
  --confirm-token <token>  Token from a prior plan run — required to actually
                           lock (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox locked-date-tags

Usage: dr filebox locked-date-tags [options] <doc_id>

List the date-tag values currently locked on a filebox (GET
/api/documents/<id>/locked_datetags)

Arguments:
  doc_id              filebox id (positive integer)

Options:
  --json              Output the raw server response as JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox preview

Usage: dr filebox preview [options] <version_id>

Preview raw cell data of a filebox version (row 1 is headers)

Arguments:
  version_id          version id (positive integer)

Options:
  --sheet <name>      Sheet name. Defaults to first sheet from /desc. (default:
                      "")
  --sheet-ind <n>     Sheet index (0-based). Defaults to 0. (default: "0")
  --start <n>         First row to read (1-based) (default: "1")
  --rows <n>          Number of rows to return (start..start+rows-1) (default:
                      "100")
  --data-only         Return evaluated values only; omit raw formulas (default:
                      false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox push

Usage: dr filebox push [options] <id>

Copy a filebox into other organizations (two-step confirm). Destinations must
be listed by `dr organizations push-targets`.

Arguments:
  id                       source filebox id (positive integer)

Options:
  --to <orgs>              Destination organization ids or names —
                           comma-separated, repeatable, max 50. A name
                           containing a comma must be given as the numeric id.
                           (default: [])
  --override               Push a new version into the filebox previously
                           pushed from this source. Default: create a new
                           filebox, subject to server-side alias matching.
                           (default: false)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           push (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox rescan-version

Usage: dr filebox rescan-version [options] <version_id>

Re-extract ONE filebox version in place, without changing its tags — the UI
version "three dots > Rescan". Only this version is re-extracted (not the rest
of its filebox or collection process), with the tables’ current datamappers;
its rows in each table are replaced, not duplicated. Two-step confirmation: run
once to see the version, filebox, tags and tables and get a token, then re-run
with --confirm-token.

Arguments:
  version_id               document version id (global)

Options:
  --table <table_id>       Re-extract into this table only (repeatable).
                           Default: every active table the filebox is mapped
                           into. (default: [])
  --confirm-token <token>  Token from a prior plan run — required to actually
                           trigger the rescan (default: "")
  --json                   Output the queued rescan as JSON instead of prose
                           (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox restore-version

Usage: dr filebox restore-version [options] [version_id]

Restore (un-archive) a single filebox version — inverse of archive-version, no
confirm needed. Address it by global version id, or by --doc with
--version-number/--latest-archived.

Arguments:
  version_id            document version id (global). Omit to address by --doc
                        + --version-number/--latest-archived.

Options:
  --doc <doc_id>        filebox id — resolve the version within this filebox
  --version-number <n>  per-filebox version number to restore (requires --doc)
  --latest-archived     restore the latest archived version of --doc (requires
                        --doc) (default: false)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr filebox set-auto-calc-frequency

Usage: dr filebox set-auto-calc-frequency [options] <doc_id>

Set the AUTO-CALCULATE cron schedule for a filebox (two-step confirmation; PUT
/api/documents/<id>/auto_calculate_settings). To inspect the current settings
without changing them, use `dr filebox get-auto-calc-settings`. Auto-calculate
is a separate Datarails feature from the Workato data-query sync schedule — for
that, use `dr filebox data-query set-sync-interval`. The cron string is
forwarded to the server verbatim; only basic syntactic checks happen
client-side.

Arguments:
  doc_id                   filebox id (positive integer)

Options:
  --cron <expr>            Cron expression (5 or 6 whitespace-separated
                           fields). Forwarded to the server verbatim.
  --enable                 Bootstrap auto-calculate for this filebox if
                           currently OFF. Without this flag, the command errors
                           when auto-calc is disabled. (default: false)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           set the schedule (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox set-option

Usage: dr filebox set-option [options] <doc_id>

Toggle per-document options (PUT /api/documents/<id>/change_option). Surfaces
--bank-integration as a typed flag; other allow-listed options can be passed
via --option KEY=VALUE. Unknown keys are rejected — the server accepts any key
and stores it silently, so the CLI is the only gatekeeper.

Arguments:
  doc_id                       filebox id (positive integer)

Options:
  --bank-integration <on|off>  Set is_bank_integration to true (on) or false
                               (off)
  --option <kv...>             KEY=VALUE — VALUE is JSON-parsed
                               (true/false/123/"str"). KEY must be allow-listed
                               (currently: is_bank_integration). Repeatable.
                               (default: [])
  --json                       Output the server response as JSON (default:
                               false)
  -s, --server <key>           Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                               DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                               TEST-5, TEST-6, TEST-7, DEMO) or a full
                               https://<host>.datarails.com URL. Required.
  --account <email>            Datarails account email (required when multiple
                               identities are stored for the server)
  -h, --help                   display help for command

dr filebox set-parent

Usage: dr filebox set-parent [options] <doc_id>

Move a filebox under a different folder, or use --detach to move it to the root
(PUT /api/documents/<id> with `parent`). Sibling to `filebox create --parent`.

Arguments:
  doc_id              filebox id (positive integer)

Options:
  --parent <id>       New parent folder filebox id (positive integer). Mutually
                      exclusive with --detach. (default: "")
  --detach            Move the filebox to the root (sends parent=0)
  --json              Output the server response as JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox set-sync-frequency

Usage: dr filebox set-sync-frequency [options] <doc_id>

[DEPRECATED — renamed] Alias of `set-auto-calc-frequency`. The old name was
misleading: this command controls auto-calculate, NOT the Workato data-query
sync schedule. For Workato sync schedule, use `dr filebox data-query
set-sync-interval`.

Arguments:
  doc_id                   filebox id (positive integer)

Options:
  --cron <expr>            Cron expression (5 or 6 whitespace-separated
                           fields). Forwarded to the server verbatim.
  --enable                 Bootstrap auto-calculate for this filebox if
                           currently OFF. Without this flag, the command errors
                           when auto-calc is disabled. (default: false)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           set the schedule (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox set-tag-config

Usage: dr filebox set-tag-config [options] <doc_id>

Add/remove tenant tags on an existing filebox's tags_config (PUT
/api/documents/<id> with tags_config_str). Tag names are matched
case-insensitively against /api/documents/versions/tags. Sibling to `filebox
create --date-sub-type` which only sets the initial config.

Arguments:
  doc_id              filebox id (positive integer)

Options:
  --add <name...>     Tag NAME to add (resolved against /versions/tags).
                      Repeatable. (default: [])
  --remove <name...>  Tag NAME to remove from the doc's current tags_config.
                      Repeatable. (default: [])
  --json              Output the server response as JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox set-version-cycle

Usage: dr filebox set-version-cycle [options] <version_id>

Set the cycle date + scenario name on a version of a forecast/budget filebox
(validated against existing cycles)

Arguments:
  version_id              document version id (positive integer)

Options:
  --doc <doc_id>          parent document id (required to resolve the tag ids)
  --date <date>           cycle date: Unix-second timestamp or YYYY-MM-DD
  --scenario <name>       scenario/cycle name (must already exist, e.g. Best |
                          Budget Cycle 1)
  --date-tag-name <name>  date tag to use when the filebox has more than one
                          DATE tag
  --json                  Output a JSON record describing the write instead of
                          the human confirmation (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  -h, --help              display help for command

dr filebox set-version-date-tag

Usage: dr filebox set-version-date-tag [options] <version_id>

Set the date-tag value on a single document version (PUT tags_and_label)

Arguments:
  version_id           document version id (positive integer)

Options:
  --doc <doc_id>       parent document id (optional; resolved from the version
                       when omitted)
  --year <YYYY>        set the Year tag (e.g. 2026)
  --quarter <YYYY-Qn>  set the Quarter tag (e.g. 2026-Q2)
  --month <YYYY-MM>    set the Month tag (e.g. 2026-04)
  --day <YYYY-MM-DD>   set the Day tag (e.g. 2026-04-15)
  --week <YYYY-Www>    set the Week tag (ISO week, e.g. 2026-W14)
  --json               Output a JSON record describing the write instead of the
                       human confirmation (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr filebox set-version-file-status

Usage: dr filebox set-version-file-status [options] <version_id>

Set the File Status tag (Draft / Final) on a single document version, then read
it back

Arguments:
  version_id          document version id (positive integer)

Options:
  --doc <doc_id>      parent document id (required to resolve the File Status
                      tag from the doc's tags_config)
  --status <s>        New File Status: Draft | Final. Final needs
                      `assign_final`; replacing another Final in the same
                      period needs `override_final`, and the server moves that
                      version to Draft.
  --json              Output a JSON record describing the write instead of the
                      human confirmation (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox set-version-include

Usage: dr filebox set-version-include [options] [version_id]

Include a filebox version in the database, or exclude it (two-step
confirmation). Address it by global version id, or by --doc with
--version-number/--latest-active/--all-except-latest. --all-except-latest
sweeps every active version behind the latest and always keeps the latest.

Arguments:
  version_id               document version id (global). Omit to address by
                           --doc +
                           --version-number/--latest-active/--all-except-latest.

Options:
  --include <on|off>       on = include in database, off = exclude from
                           database
  --doc <doc_id>           filebox id — resolve the version(s) within this
                           filebox
  --version-number <n>     per-filebox version number to change (requires
                           --doc)
  --latest-active          change the latest active version of --doc (requires
                           --doc) (default: false)
  --all-except-latest      change every active version of --doc except the
                           latest (requires --doc) (default: false)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           write (default: "")
  --json                   Output the resolved write as JSON instead of prose
                           (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr filebox set-version-label

Usage: dr filebox set-version-label [options] [version_id]

Set or clear a filebox version's label (date and dimension tags are left
unchanged). Address it by global version id, or by --doc with
--version-number/--latest-active.

Arguments:
  version_id            document version id (global). Omit to address by --doc
                        + --version-number/--latest-active.

Options:
  --label <text>        the new label (at most 256 characters)
  --clear               remove the label (default: false)
  --doc <doc_id>        filebox id — resolve the version within this filebox
  --version-number <n>  per-filebox version number to label (requires --doc)
  --latest-active       label the latest active version of --doc (requires
                        --doc) (default: false)
  --json                Output a JSON record (version_id, doc_id, version,
                        label, previous_label) (default: false)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr filebox set-version-workflow

Usage: dr filebox set-version-workflow [options] <version_id>

Set the WORKFLOW tag value on a single document version (Approve / Reject /
move to In Progress / etc.)

Arguments:
  version_id          document version id (positive integer)

Options:
  --doc <doc_id>      parent document id (required to resolve the WORKFLOW tag
                      id from the doc's tags_config)
  --status <s>        New WORKFLOW value: Not Started | In Progress | Pending |
                      Approved | Rejected. Setting Approved requires the
                      `approve_workflow` permission server-side.
  --json              Output a JSON record describing the write instead of the
                      human confirmation (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox share

Usage: dr filebox share [options] <doc_id>

Share a filebox with one or more users (POST /api/documents/<id>/users)

Arguments:
  doc_id                  filebox id (positive integer)

Options:
  --user <email_role...>  EMAIL:ROLE — ROLE is ADMIN/CONTRIBUTOR/VIEWER (or
                          1/2/3). Repeatable.
  --json                  Output the server response as JSON (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  -h, --help              display help for command

dr filebox shares

Usage: dr filebox shares [options] <doc_id>

List the users and permission-groups a filebox is shared with

Arguments:
  doc_id              filebox id (positive integer)

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox sheets

Usage: dr filebox sheets [options] <version_id>

List sheets in a filebox version (names, indices, row/col counts)

Arguments:
  version_id          version id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox tags

Usage: dr filebox tags [options]

List available filebox tags (dates + dimensions) on the tenant

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox unlock

Usage: dr filebox unlock [options] <doc_id>

Unlock a filebox and all descendants (PUT /api/documents/<id>/lock with
{locked:false, recursive:true}). Inverse of `lock`; no confirmation required.

Arguments:
  doc_id              filebox id (positive integer)

Options:
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox unlock-date-tag

Usage: dr filebox unlock-date-tag [options] <doc_id>

Unlock a single date-tag value on a filebox (PUT
/api/documents/<id>/datetag/<value>/lock with {locked:false}). Inverse of
`lock-date-tag`; no confirmation required. Resolves the target epoch from real
version tags (or pass --value <epoch>).

Arguments:
  doc_id               filebox id (positive integer)

Options:
  --year <YYYY>        lock the Year tag value (e.g. 2026)
  --quarter <YYYY-Qn>  lock the Quarter tag value (e.g. 2026-Q2)
  --month <YYYY-MM>    lock the Month tag value (e.g. 2026-04)
  --day <YYYY-MM-DD>   lock the Day tag value (e.g. 2026-04-15)
  --week <YYYY-Www>    lock the Week tag value (ISO week, e.g. 2026-W14)
  --value <epoch>      lock the exact date-tag epoch (bypasses dimension
                       resolution — the value from `dr filebox versions <id>
                       --json` tags[].value). Mutually exclusive with the
                       dimension flags.
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr filebox update

Usage: dr filebox update [options] <id>

Update filebox settings — `--name` for the common rename case, or
`--payload-file` for arbitrary JSON (any field accepted by the server's
editable_fields allowlist on PUT /api/documents/<id>: name, parent, auto_save,
date_format, use_type, is_present_in_dashboard_reports). For tag config use
`set-tag-config`; for re-parenting use `set-parent`.

Arguments:
  id                     filebox id (positive integer)

Options:
  --payload-file <path>  Path to JSON file with the PUT body (optional — pass
                         --name instead for the common rename case) (default:
                         "")
  --name <name>          New filebox display name (default: "")
  --json                 Output raw JSON instead of a summary (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr filebox upload

Usage: dr filebox upload [options]

Upload a file to create a new filebox (Actuals|Budget|Forecast|None)

Options:
  --name <name>       Filebox display name (required) (default: "")
  --file <path>       Path to the file to upload (required) (default: "")
  --scenario <s>      Scenario: Actuals|Budget|Forecast|None (default:
                      "Actuals")
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox upload-version

Usage: dr filebox upload-version [options] <doc_id>

Upload a new version to an existing filebox

Arguments:
  doc_id                  filebox id (positive integer)

Options:
  --file <path>           Path to the file to upload (required) (default: "")
  --date <date>           Forecast/budget filebox: cycle date (timestamp or
                          YYYY-MM-DD). Use with --scenario.
  --scenario <name>       Forecast/budget filebox: scenario/cycle name (must
                          already exist). Use with --date.
  --date-tag-name <name>  Date tag to use when the filebox has more than one
                          DATE tag
  --label <text>          Label the new version right after the upload (same as
                          `set-version-label --label`)
  --no-reconcile          Upload under the file's literal name without
                          correcting its extension to the byte content. Use
                          only when you intend a wrong-but-deliberate name; the
                          server may then reject it with HTTP 400 "Invalid file
                          signature".
  --json                  Output raw JSON instead of a summary (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  -h, --help              display help for command

dr filebox validation-rules

Usage: dr filebox validation-rules [options] [command]

Filebox validation-rules: list option schema or set rules on a document

Options:
  -h, --help                display help for command

Commands:
  options [options]         Fetch the validation-rule option schema (GET
                            /api/temp_files/validation_rules/options)
  set [options] <doc_uuid>  Set or replace a document's validation rules (POST
                            /api/documents/<doc_uuid>/validation_rules;
                            idempotent)
  help [command]            display help for command

dr filebox validation-rules options

Usage: dr filebox validation-rules options [options]

Fetch the validation-rule option schema (GET
/api/temp_files/validation_rules/options)

Options:
  --json              Output raw JSON (default for this surface) (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr filebox validation-rules set

Usage: dr filebox validation-rules set [options] <doc_uuid>

Set or replace a document's validation rules (POST
/api/documents/<doc_uuid>/validation_rules; idempotent)

Arguments:
  doc_uuid                          document UUID (NOT the integer id)

Options:
  --skip-validation                 Set skip_validation=true (default: false)
  --no-skip-validation              Set skip_validation=false (default)
  --account-regex <s>               Regex applied to a column for validation
  --file-name-keyword <s>           Substring required in the uploaded filename
  --identical-sheet-names           Require identical sheet names (default:
                                    false)
  --headers-row <n>                 1-based row index where headers live
  --column-numbers-to-check <list>  Comma-separated column indices (e.g. 1,2,3)
                                    (default: "")
  --column-names-to-check <list>    Comma-separated column names (e.g. a,b,c)
                                    (default: "")
  --file <path>                     JSON file with the full validation_rules
                                    body (overrides individual flags) (default:
                                    "")
  --json                            Output the server response as JSON
                                    (default: false)
  -s, --server <key>                Server key (US, US2, UK, CA, EU, STUDIO,
                                    DEV, DEV-1, TEST, TEST-1, TEST-2, TEST-3,
                                    TEST-4, TEST-5, TEST-6, TEST-7, DEMO) or a
                                    full https://<host>.datarails.com URL.
                                    Required.
  --account <email>                 Datarails account email (required when
                                    multiple identities are stored for the
                                    server)
  -h, --help                        display help for command

dr filebox versions

Usage: dr filebox versions [options] <doc_id>

List versions of a filebox. Default: active versions only. --archived: only
archived (auto_save) versions; --all: active + archived. --archived/--all add
an ARCHIVED column.

Arguments:
  doc_id              filebox id (positive integer)

Options:
  --archived          Show only archived versions (auto_save). Adds an ARCHIVED
                      column. (default: false)
  --all               Show active + archived versions. Adds an ARCHIVED column.
                      (default: false)
  --included          Show only versions whose include_file flag is on. Adds an
                      INCLUDED column. Combines with --archived/--all. The flag
                      is intent, not delivered rows — turning it on only queues
                      an ETL scan; check `dr scans status <table_id>` for that.
                      Change the flag with `dr filebox set-version-include`.
                      (default: false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr folders

Usage: dr folders [options] [command]

Operations on Datarails folders (dashboard / story picker-tree)

Options:
  -h, --help                 display help for command

Commands:
  list [options]             List folders for an entity type (returns a nested
                             tree)
  create [options]           Create a new folder (picker-tree container)
  reorder [options]          Set the interleaved order of one container
                             (two-step confirm). The order is per-user. --items
                             sends exactly what is given; --move splices the
                             current members and sends them all.
  move [options] <folderId>  Move a folder under another folder or to root
                             (two-step confirm). Appends at the end of the
                             destination; Admin / Data Manager only.
  help [command]             display help for command

dr folders create

Usage: dr folders create [options]

Create a new folder (picker-tree container)

Options:
  --name <name>       Folder name (required, unique within parent)
  --entity-type <t>   folder entity type: dashboard | story (default:
                      "dashboard")
  --parent <id>       Parent folder id (positive integer). Omit for a root
                      folder. (default: "")
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr folders list

Usage: dr folders list [options]

List folders for an entity type (returns a nested tree)

Options:
  --entity-type <t>   folder entity type: dashboard | story (default:
                      "dashboard")
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr folders move

Usage: dr folders move [options] <folderId>

Move a folder under another folder or to root (two-step confirm). Appends at
the end of the destination; Admin / Data Manager only.

Arguments:
  folderId                 folder id (positive integer)

Options:
  --parent <p>             root | destination folder id
  --entity-type <t>        tree to describe the move from: dashboard | story
                           (default: "dashboard")
  --confirm-token <token>  Token from a prior plan run — required to actually
                           move
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr folders reorder

Usage: dr folders reorder [options]

Set the interleaved order of one container (two-step confirm). The order is
per-user. --items sends exactly what is given; --move splices the current
members and sends them all.

Options:
  --entity-type <t>        folder entity type: dashboard | story (default:
                           "dashboard")
  --container <c>          root | folder id
  --items <list>           full ordered list, e.g. folder:12,entity:87 (sent
                           verbatim)
  --move <kind:id>         item to move, e.g. entity:87
  --to-index <n>           0-based target index for --move (past the end =
                           last)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           reorder
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast

Usage: dr forecast [options] [command]

Operate on forecast scenario cycles and planning scenarios

Options:
  -h, --help      display help for command

Commands:
  cycles          Forecast scenario cycles
  scenarios       Forecast planning scenarios
  help [command]  display help for command

dr forecast cycles

Usage: dr forecast cycles [options] [command]

Forecast scenario cycles

Options:
  -h, --help                         display help for command

Commands:
  list [options]                     List scenario cycles
  get [options] <date>               Show a cycle, its scenarios, and its
                                     related documents
  documents [options] <date>         List document IDs attached to a cycle
  lock [options] <date>              Lock a forecast cycle
  unlock [options] <date>            Unlock a forecast cycle
  set-default [options] <date>       Set a forecast cycle as the default
  roll-forward [options] <src-date>  Roll a forecast cycle forward into a
                                     destination cycle
  help [command]                     display help for command

dr forecast cycles documents

Usage: dr forecast cycles documents [options] <date>

List document IDs attached to a cycle

Arguments:
  date                cycle date (YYYY-MM-DD or Unix-second timestamp)

Options:
  --with-names        Look up names (extra GET per id) (default: false)
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr forecast cycles get

Usage: dr forecast cycles get [options] <date>

Show a cycle, its scenarios, and its related documents

Arguments:
  date                cycle date (YYYY-MM-DD or Unix-second timestamp)

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr forecast cycles list

Usage: dr forecast cycles list [options]

List scenario cycles

Options:
  --year <year>        Filter to a single year
  --scenario <family>  planning-scenario family: Forecast (default) or Budget
                       -- budget cycles are a separate family, invisible
                       without this
  --json               Output raw JSON instead of a table (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr forecast cycles lock

Usage: dr forecast cycles lock [options] <date>

Lock a forecast cycle

Arguments:
  date                     cycle date (YYYY-MM-DD or Unix-second timestamp)

Options:
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast cycles roll-forward

Usage: dr forecast cycles roll-forward [options] <src-date>

Roll a forecast cycle forward into a destination cycle

Arguments:
  src-date                 source cycle date (YYYY-MM-DD or timestamp)

Options:
  --to <dest-date>         destination cycle date
  --raw-tags <json>        override the auto-resolved JSON-string tags
                           (default: "")
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast cycles set-default

Usage: dr forecast cycles set-default [options] <date>

Set a forecast cycle as the default

Arguments:
  date                     cycle date (YYYY-MM-DD or Unix-second timestamp)

Options:
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast cycles unlock

Usage: dr forecast cycles unlock [options] <date>

Unlock a forecast cycle

Arguments:
  date                     cycle date (YYYY-MM-DD or Unix-second timestamp)

Options:
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast scenarios

Usage: dr forecast scenarios [options] [command]

Forecast planning scenarios

Options:
  -h, --help                   display help for command

Commands:
  list [options]               List planning scenarios
  get [options] <id>           Show a planning scenario with its versions,
                               splits, and collection processes
  versions [options] <id>      List versions for a planning scenario
  lock [options] <id>          Lock a planning scenario
  unlock [options] <id>        Unlock a planning scenario
  set-default [options] <id>   Set a planning scenario as the cycle default
  delete [options] <id>        Delete a planning scenario (two-step confirm)
  clone [options] <src-id>     Clone a planning scenario into a destination
                               (cycle, scenario-name) pair
  clone-from-budget [options]  Clone a budget cycle into a (forecast cycle,
                               scenario-name) pair
  bulk-edit [options]          Bulk add/delete planning scenarios for a cycle
                               (year-sync)
  create [options]             Create a new planning scenario
  help [command]               display help for command

dr forecast scenarios bulk-edit

Usage: dr forecast scenarios bulk-edit [options]

Bulk add/delete planning scenarios for a cycle (year-sync)

Options:
  --cycle <date>           cycle date (YYYY-MM-DD or timestamp)
  --add <names>            comma-separated scenario names to add (default: "")
  --delete <names>         comma-separated scenario names to delete (default:
                           "")
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast scenarios clone

Usage: dr forecast scenarios clone [options] <src-id>

Clone a planning scenario into a destination (cycle, scenario-name) pair

Arguments:
  src-id                   source scenario id

Options:
  --to-cycle <dest-date>   destination cycle date (preferred name)
  --to <dest-date>         deprecated alias for --to-cycle
  --to-scenario <name>     destination scenario name (the new `Forecast Cycle`
                           tag value the cloned versions get written under).
                           Required unless --raw-tags is set.
  --raw-tags <json>        override the auto-resolved JSON-string tags (must be
                           the full two-tag payload) (default: "")
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast scenarios clone-from-budget

Usage: dr forecast scenarios clone-from-budget [options]

Clone a budget cycle into a (forecast cycle, scenario-name) pair

Options:
  --source-budget-cycle <id>  source budget cycle id (custom_tag id)
  --to-cycle <dest-date>      destination forecast cycle date (preferred name)
  --to <dest-date>            deprecated alias for --to-cycle
  --to-scenario <name>        destination forecast scenario name (the `Forecast
                              Cycle` tag value the cloned versions get written
                              under). Required unless --raw-tags is set.
  --documents <ids>           comma-separated document IDs to clone (default:
                              all) (default: "")
  --raw-tags <json>           override the auto-resolved JSON-string tags (must
                              be the full two-tag payload) (default: "")
  --confirm-token <token>     Token from a prior plan run (default: "")
  -s, --server <key>          Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                              DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                              TEST-5, TEST-6, TEST-7, DEMO) or a full
                              https://<host>.datarails.com URL. Required.
  --account <email>           Datarails account email (required when multiple
                              identities are stored for the server)
  -h, --help                  display help for command

dr forecast scenarios create

Usage: dr forecast scenarios create [options]

Create a new planning scenario

Options:
  --cycle <date>           Cycle date (YYYY-MM-DD or timestamp)
  --name <value>           Scenario name
  --default                Set as cycle default (default: false)
  --locked                 Create in locked state (default: false)
  --scenario <family>      Planning-scenario family: Forecast (default) or
                           Budget
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast scenarios delete

Usage: dr forecast scenarios delete [options] <id>

Delete a planning scenario (two-step confirm)

Arguments:
  id                       scenario id

Options:
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast scenarios get

Usage: dr forecast scenarios get [options] <id>

Show a planning scenario with its versions, splits, and collection processes

Arguments:
  id                         scenario id

Options:
  --no-versions              Suppress versions sub-fetch
  --no-splits                Suppress splits sub-fetch
  --no-collection-processes  Suppress collection-processes sub-fetch
  --json                     Output raw JSON (default: false)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr forecast scenarios list

Usage: dr forecast scenarios list [options]

List planning scenarios

Options:
  --cycle <date>       Filter to a single cycle
  --year <year>        Filter to a single year (server-side)
  --scenario <family>  planning-scenario family: Forecast (default) or Budget
                       -- budget cycles are a separate family, invisible
                       without this
  --json               Output raw JSON (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr forecast scenarios lock

Usage: dr forecast scenarios lock [options] <id>

Lock a planning scenario

Arguments:
  id                       scenario id

Options:
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast scenarios set-default

Usage: dr forecast scenarios set-default [options] <id>

Set a planning scenario as the cycle default

Arguments:
  id                       scenario id

Options:
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast scenarios unlock

Usage: dr forecast scenarios unlock [options] <id>

Unlock a planning scenario

Arguments:
  id                       scenario id

Options:
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr forecast scenarios versions

Usage: dr forecast scenarios versions [options] <id>

List versions for a planning scenario

Arguments:
  id                  scenario id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr functions

Usage: dr functions [options] [command]

Operations on Datarails template functions

Options:
  -h, --help                  display help for command

Commands:
  list [options]              List functions on this tenant
  get [options] <id>          Get a single function by ID
  create [options]            Create a new function
  update [options] <id>       Update a function (name-only routes to the rename
                              endpoint; structural changes read-modify-write a
                              full PUT)
  set-filters [options] <id>  Replace a function's row-level filters from a
                              JSON file (FULL replace — an empty array clears
                              all; dry-run unless --confirm)
  data [options] <id>         Evaluate a function the way the Excel add-in does
                              (PUT /api/functions/<id>/data/v2): one value per
                              filter-value combination; dates are sent as Excel
                              serials
  drilldown [options] <id>    The rows behind a function value (PUT
                              /api/functions/<id>/drilldown/v4); with --out, a
                              result too large to return inline is exported as
                              CSV automatically
  delete [options] <id>       Delete a function by ID (two-step confirm)
  help [command]              display help for command

dr functions create

Usage: dr functions create [options]

Create a new function

Options:
  --name <name>           Function name (no whitespace; required)
  --template <id>         Template ID (required)
  --field <id>            Value field ID (required)
  --agg <kind>            Aggregation: SUM, COUNT, AVG, MIN, MAX (default: SUM)
                          (default: "SUM")
  --date-field <id|name>  Default aggregation date field (a Date field of the
                          template). Needed for DR.YTD/QTD/MTD/… and `functions
                          data --agg YTD`; without it a warning is printed
  --json                  Output raw JSON instead of a table (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  -h, --help              display help for command

dr functions data

Usage: dr functions data [options] <id>

Evaluate a function the way the Excel add-in does (PUT
/api/functions/<id>/data/v2): one value per filter-value combination; dates are
sent as Excel serials

Arguments:
  id                         function id

Options:
  --filter <NAME=V1,V2>      Dimension filter by field name (or id);
                             repeatable. Several values return one result per
                             value. A value on a Date field is converted like
                             --date (default: [])
  --date <NAME=DATE[,DATE]>  Date filter, e.g. "Reporting Date=2025-01-31"
                             (YYYY-MM-DD, M/D/YYYY, an ISO datetime, an Excel
                             serial, or epoch seconds; a bare month is
                             refused); repeatable (default: [])
  --agg <period>             Period aggregation: DEFAULT, YTD, YTG, QTD, QTG,
                             MTD, MTG (default: "DEFAULT")
  --timeout <seconds>        Whole-command budget in seconds (default 30)
  --json                     Print the server body verbatim (default: false)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr functions delete

Usage: dr functions delete [options] <id>

Delete a function by ID (two-step confirm)

Arguments:
  id                       function id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr functions drilldown

Usage: dr functions drilldown [options] <id>

The rows behind a function value (PUT /api/functions/<id>/drilldown/v4); with
--out, a result too large to return inline is exported as CSV automatically

Arguments:
  id                         function id

Options:
  --filter <NAME=V1,V2>      Dimension filter by field name (or id); repeatable
                             (default: [])
  --exclude <NAME=V1,V2>     Exclude these values of a field; repeatable
                             (default: [])
  --date <NAME=DATE[,DATE]>  Date filter, e.g. "Reporting Date=2025-01-31";
                             repeatable (default: [])
  --agg <period>             Period aggregation: DEFAULT, YTD, YTG, QTD, QTG,
                             MTD, MTG (default: "DEFAULT")
  --columns <names>          Comma-separated columns to print (default: the
                             filtered fields and the value field)
  --limit <n>                Rows to print; 0 = all (default: "20")
  --out <file.csv>           Write every row and column to a CSV file; a result
                             over the inline cap is fetched through the server
                             CSV export
  --csv                      Always use the server CSV export (needs --out)
                             (default: false)
  --timeout <seconds>        Whole-command budget in seconds (default 30, or
                             300 with --out)
  --json                     Print the server body verbatim (with --out: a JSON
                             summary) (default: false)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr functions get

Usage: dr functions get [options] <id>

Get a single function by ID

Arguments:
  id                  function id

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr functions list

Usage: dr functions list [options]

List functions on this tenant

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr functions set-filters

Usage: dr functions set-filters [options] <id>

Replace a function's row-level filters from a JSON file (FULL replace — an
empty array clears all; dry-run unless --confirm)

Arguments:
  id                  function id

Options:
  --file <path>       JSON: an array (or {"filters":[...]}) of
                      {field:<FlatTableField id>, values:[...], is_excluded?,
                      show_in_graph?, override_global_filter?}. An empty array
                      clears all filters.
  --confirm           Actually apply the change (default is dry-run) (default:
                      false)
  --json              Output structured JSON instead of text (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr functions update

Usage: dr functions update [options] <id>

Update a function (name-only routes to the rename endpoint; structural changes
read-modify-write a full PUT)

Arguments:
  id                      function id

Options:
  --name <name>           New function name (no whitespace)
  --field <id>            New value field ID
  --agg <kind>            New aggregation: SUM, COUNT, AVG, MIN, MAX
  --template <id>         New template ID
  --date-field <id|name>  Set the default aggregation date field (a Date field)
                          used by DR.YTD/QTD/MTD/…
  --json                  Output raw JSON instead of a table (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  -h, --help              display help for command

dr fx

Usage: dr fx [options] [command]

Foreign exchange: rates (read) and FX configuration — posting/reporting fields,
currency-aware widgets and Excel functions

Options:
  -h, --help                             display help for command

Commands:
  set-posting [options] [template_id]    Mark a table field as the Monetary POSTING amount (PUT /api/templates/fields/<id> with fx_role=posting_amount). Default target: the field named "Posting Amount" (case/underscore-insensitive); override with --field <id|name>. Refuses when another field already holds the posting role. Pass --all-tables instead of a template id to sweep every table in the org — that is the onboarding shape, and a table it cannot judge (no candidate, two candidates, another field already holding the role) is reported and skipped rather than stopping the run. Two-step confirm (plan first, then re-run with --confirm-token).
  set-reporting [options] [template_id]  Mark table field(s) as Monetary REPORTING amounts with a currency code + symbol (PUT /api/templates/fields/<id> with fx_role=reporting_amount). With no flags it auto-detects, preferring what is already configured: a field that already carries a reporting currency keeps it (so a re-run over a part-configured table is a no-op); otherwise fields named "<CODE> Amount" / "<CODE> Reporting Amount" take the code from their name prefix; otherwise a single field named "Reporting Amount" or "Amount" takes its code from the table's "Reporting Currency" column when that column holds exactly one distinct value. A name prefix that contradicts the stored currency is refused rather than guessed. Explicit forms: --field <id|name> --code <CODE> [--symbol <S>] for one field, or repeatable --map "<field>=<CODE>[:<SYMBOL>]" for several. Symbols default from the ISO catalog (matching the web app); codes are validated against the catalog plus the org's custom currencies (bypass with --allow-custom). One reporting field per currency per table is enforced. Pass --all-tables instead of a template id to sweep the whole org heuristically — the onboarding shape; a table whose currency cannot be determined is reported and skipped so an implementor can ask the customer, never guessed. Two-step confirm (plan first, then re-run with --confirm-token).
  add-currency [options] <code>          Register an org-level custom currency (POST /api/v1/currencies/custom-currencies) — a code the ISO list does not carry, such as BUSD for "budgeted USD" (compare actuals to budget without FX noise). Codes are 2-5 letters or digits, upper-cased. Re-running with a different --symbol updates it, mirroring the web app. `fx set-reporting --allow-custom` registers an unknown code automatically, so this is for pre-registering one before a bulk run, or fixing a symbol.
  default-currency [options] [code]      Show or set the organization-wide DEFAULT reporting currency (GET/PUT /api/v1/currencies/default-currency) — the star in the dashboard currency dropdown. With no argument it prints the current default plus every currency the org can offer. With <code> it sets that default; --none records the "None" choice, meaning the posting currency. The default is what every dashboard starts on when the viewer has made no choice, and what an AI agent uses when it has no currency of its own, so a code the selector cannot offer is refused (--allow-unlisted overrides). Setting it needs Super Admin server-side. Dry-run by default — re-run with --confirm to apply.
  convert-functions [options]            Enable currency conversion (is_fx_aware=true) on every eligible Excel/DR.GET function (PUT /api/functions/<id>, full read-modify-write preserving filters and calc-values). Eligible = the value field is Monetary AND carries an fx_role (the server rejects the flip otherwise); functions whose aggregator is not SUM are skipped unless --force-sum switches them to SUM (currency conversion is SUM-only). Use --off to sweep the other way and turn conversion off — a rollback, which ignores eligibility and the aggregator and acts on the stored flag alone. Dry-run by default — prints the plan; re-run with --confirm to apply. Scope with --template <id>.
  convert-widgets [options]              Enable currency conversion (is_fx_aware=true) on every eligible dashboard widget (PUT /api/dashboards/<d>/widgets/<w>, round-tripping the widget body verbatim). Eligible = the value section holds exactly one field, that field is Monetary, and it carries an fx_role. Widgets whose aggregator is not SUM are skipped unless --force-sum switches them to SUM. The server has the final say on the flag — a widget it deems ineligible is reported as failed. Each converted widget also switches to the Auto currency symbol (options.autoCurrencySymbol=true — the sign of the currency selected on the dashboard), as the widget editor does; --no-auto-symbol keeps the stored number format instead. Use --off to sweep the other way and turn conversion off — a rollback, which ignores eligibility and the aggregator and acts on the stored flag alone (and clears Auto, which only renders on a currency-aware widget). Dry-run by default — prints the plan; re-run with --confirm to apply. Scope with --dashboard <id> or sweep --all.
  rates [options]                        List current FX rates (base, date, rate-per-currency)
  help [command]                         display help for command

dr fx add-currency

Usage: dr fx add-currency [options] <code>

Register an org-level custom currency (POST
/api/v1/currencies/custom-currencies) — a code the ISO list does not carry,
such as BUSD for "budgeted USD" (compare actuals to budget without FX noise).
Codes are 2-5 letters or digits, upper-cased. Re-running with a different
--symbol updates it, mirroring the web app. `fx set-reporting --allow-custom`
registers an unknown code automatically, so this is for pre-registering one
before a bulk run, or fixing a symbol.

Arguments:
  code                Currency code (2-5 letters/digits, e.g. BUSD)

Options:
  --symbol <symbol>   Display symbol (omit to leave unset — consumers render
                      the code)
  --json              Output a structured JSON result instead of prose
                      (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr fx convert-functions

Usage: dr fx convert-functions [options]

Enable currency conversion (is_fx_aware=true) on every eligible Excel/DR.GET
function (PUT /api/functions/<id>, full read-modify-write preserving filters
and calc-values). Eligible = the value field is Monetary AND carries an fx_role
(the server rejects the flip otherwise); functions whose aggregator is not SUM
are skipped unless --force-sum switches them to SUM (currency conversion is
SUM-only). Use --off to sweep the other way and turn conversion off — a
rollback, which ignores eligibility and the aggregator and acts on the stored
flag alone. Dry-run by default — prints the plan; re-run with --confirm to
apply. Scope with --template <id>.

Options:
  --template <id>      Only functions on this template (table) id
  --force-sum          Also convert non-SUM functions by switching their
                       aggregator to SUM (default: false)
  --off                Reverse direction: turn currency conversion OFF on every
                       currency-aware function in scope (default: false)
  --confirm            Actually apply the changes (default is dry-run)
                       (default: false)
  --json               Output a structured JSON result instead of text
                       (default: false)
  --timeout <seconds>  Minimum whole-command budget in seconds. Default 30s for
                       one item; a batch gets 30s + 5s per call (capped at
                       1800s). This is a floor, so it only ever widens that
                       budget; max 86400s
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr fx convert-widgets

Usage: dr fx convert-widgets [options]

Enable currency conversion (is_fx_aware=true) on every eligible dashboard
widget (PUT /api/dashboards/<d>/widgets/<w>, round-tripping the widget body
verbatim). Eligible = the value section holds exactly one field, that field is
Monetary, and it carries an fx_role. Widgets whose aggregator is not SUM are
skipped unless --force-sum switches them to SUM. The server has the final say
on the flag — a widget it deems ineligible is reported as failed. Each
converted widget also switches to the Auto currency symbol
(options.autoCurrencySymbol=true — the sign of the currency selected on the
dashboard), as the widget editor does; --no-auto-symbol keeps the stored number
format instead. Use --off to sweep the other way and turn conversion off — a
rollback, which ignores eligibility and the aggregator and acts on the stored
flag alone (and clears Auto, which only renders on a currency-aware widget).
Dry-run by default — prints the plan; re-run with --confirm to apply. Scope
with --dashboard <id> or sweep --all.

Options:
  --dashboard <id>     Convert widgets on this dashboard only
  --all                Convert widgets on every dashboard (default: false)
  --force-sum          Also convert non-SUM widgets by switching their
                       aggregator to SUM (default: false)
  --no-auto-symbol     Keep each converted widget's stored number format (its
                       fixed currency sign, if any) instead of switching it to
                       the Auto currency symbol
  --off                Reverse direction: turn currency conversion OFF on every
                       currency-aware widget in scope (default: false)
  --confirm            Actually apply the changes (default is dry-run)
                       (default: false)
  --json               Output a structured JSON result instead of text
                       (default: false)
  --timeout <seconds>  Minimum whole-command budget in seconds. Default 30s for
                       one item; a batch gets 30s + 5s per call (capped at
                       1800s). This is a floor, so it only ever widens that
                       budget; max 86400s
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr fx default-currency

Usage: dr fx default-currency [options] [code]

Show or set the organization-wide DEFAULT reporting currency (GET/PUT
/api/v1/currencies/default-currency) — the star in the dashboard currency
dropdown. With no argument it prints the current default plus every currency
the org can offer. With <code> it sets that default; --none records the "None"
choice, meaning the posting currency. The default is what every dashboard
starts on when the viewer has made no choice, and what an AI agent uses when it
has no currency of its own, so a code the selector cannot offer is refused
(--allow-unlisted overrides). Setting it needs Super Admin server-side. Dry-run
by default — re-run with --confirm to apply.

Arguments:
  code                Currency code to make the org default (omit to show the
                      current one)

Options:
  --none              Set the default to None — the posting currency (default:
                      false)
  --allow-unlisted    Accept a code the org's reporting-currency catalog does
                      not list (default: false)
  --confirm           Actually apply the change (default is dry-run) (default:
                      false)
  --json              Output a structured JSON result instead of prose
                      (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr fx rates

Usage: dr fx rates [options]

List current FX rates (base, date, rate-per-currency)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr fx set-posting

Usage: dr fx set-posting [options] [template_id]

Mark a table field as the Monetary POSTING amount (PUT
/api/templates/fields/<id> with fx_role=posting_amount). Default target: the
field named "Posting Amount" (case/underscore-insensitive); override with
--field <id|name>. Refuses when another field already holds the posting role.
Pass --all-tables instead of a template id to sweep every table in the org —
that is the onboarding shape, and a table it cannot judge (no candidate, two
candidates, another field already holding the role) is reported and skipped
rather than stopping the run. Two-step confirm (plan first, then re-run with
--confirm-token).

Arguments:
  template_id              template (table) id — see `dr templates list`; omit
                           with --all-tables

Options:
  --all-tables             Sweep every table in the org instead of one
                           (default: false)
  --field <ref>            Field id or name to mark (default: the "Posting
                           Amount" field)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           write (default: "")
  --json                   Output a structured JSON result instead of prose
                           (default: false)
  --timeout <seconds>      Minimum whole-command budget in seconds. Default 30s
                           for one item; a batch gets 30s + 5s per call (capped
                           at 1800s). This is a floor, so it only ever widens
                           that budget; max 86400s
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr fx set-reporting

Usage: dr fx set-reporting [options] [template_id]

Mark table field(s) as Monetary REPORTING amounts with a currency code + symbol
(PUT /api/templates/fields/<id> with fx_role=reporting_amount). With no flags
it auto-detects, preferring what is already configured: a field that already
carries a reporting currency keeps it (so a re-run over a part-configured table
is a no-op); otherwise fields named "<CODE> Amount" / "<CODE> Reporting Amount"
take the code from their name prefix; otherwise a single field named "Reporting
Amount" or "Amount" takes its code from the table's "Reporting Currency" column
when that column holds exactly one distinct value. A name prefix that
contradicts the stored currency is refused rather than guessed. Explicit forms:
--field <id|name> --code <CODE> [--symbol <S>] for one field, or repeatable
--map "<field>=<CODE>[:<SYMBOL>]" for several. Symbols default from the ISO
catalog (matching the web app); codes are validated against the catalog plus
the org's custom currencies (bypass with --allow-custom). One reporting field
per currency per table is enforced. Pass --all-tables instead of a template id
to sweep the whole org heuristically — the onboarding shape; a table whose
currency cannot be determined is reported and skipped so an implementor can ask
the customer, never guessed. Two-step confirm (plan first, then re-run with
--confirm-token).

Arguments:
  template_id              template (table) id — see `dr templates list`; omit
                           with --all-tables

Options:
  --all-tables             Sweep every table in the org (heuristic only — a
                           table whose currency cannot be determined is
                           reported and skipped, not guessed) (default: false)
  --map <spec>             Field-to-currency mapping
                           "<field>=<CODE>[:<SYMBOL>]" (repeatable; field = id
                           or name) (default: [])
  --field <ref>            Single-field mode: field id or name
  --code <code>            Currency code for --field (e.g. USD, EUR, or an org
                           custom code)
  --symbol <symbol>        Currency symbol for --field (default: from the ISO
                           catalog)
  --allow-custom           Accept a currency code that is neither ISO nor an
                           org custom currency (default: false)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           write (default: "")
  --json                   Output a structured JSON result instead of a table
                           (default: false)
  --timeout <seconds>      Minimum whole-command budget in seconds. Default 30s
                           for one item; a batch gets 30s + 5s per call (capped
                           at 1800s). This is a floor, so it only ever widens
                           that budget; max 86400s
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr integrations

Usage: dr integrations|integration [options] [command]

Customer-integration triage (NetSuite, Salesforce, QuickBooks, etc.)

Options:
  -h, --help                 display help for command

Commands:
  list [options]             List all integrations on this tenant
  get [options] <id>         Get a single integration (config credentials are
                             masked unless --show-secrets)
  types [options]            List supported connector types (NetSuite,
                             Salesforce, ...)
  status [options] <id>      Integration status, last run, and error
                             description (short form)
  query-status [options]     Per-query sync status (by DataIntegrationQuery
                             IDs)
  errors [options] <id>      Error explanation + resolution steps for a failed
                             integration (or --query-id for per-query)
  sync [options] <id>        Trigger a manual resync; optionally poll until
                             SYNCED/ERROR
  test-connection [options]  Dry-run: validate a proposed integration body
                             without saving
  add [options]              Create a new integration (payload-file only —
                             per-connector shape differs)
  update [options] <id>      Update an integration (payload-file only — admin
                             only)
  delete [options] <id>      Delete an integration (two-step confirmation —
                             cascades to queries + documents)
  revoke [options] <id>      Disconnect a DatarailsConnector OAuth data source:
                             clear the grant, then revoke it at the vendor
                             (two-step confirmation)
  share                      Grant access to an integration (users by email, or
                             permission groups by id)
  it                         IT-admin surface for file-sync integrations
                             (OneDrive / SharePoint / Egnyte). Requires
                             IT-admin permissions.
  sftp                       Self-serve SFTP fileboxes (the embedded SFTP
                             integration)
  netsuite                   NetSuite 3.0 -> SuiteQL in-place migration helpers
  help [command]             display help for command

dr integrations add

Usage: dr integrations add [options]

Create a new integration (payload-file only — per-connector shape differs)

Options:
  --payload-file <path>  Path to JSON body (required) (default: "")
  --json                 Output raw JSON response instead of a summary
                         (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr integrations delete

Usage: dr integrations delete [options] <id>

Delete an integration (two-step confirmation — cascades to queries + documents)

Arguments:
  id                       integration id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr integrations errors

Usage: dr integrations errors [options] <id>

Error explanation + resolution steps for a failed integration (or --query-id
for per-query)

Arguments:
  id                  integration id (positive integer)

Options:
  --query-id <id>     Per-query error (uses data_query/error_explanation)
                      (default: "0")
  --json              Output raw JSON instead of a formatted report (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations get

Usage: dr integrations get [options] <id>

Get a single integration (config credentials are masked unless --show-secrets)

Arguments:
  id                  integration id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  --show-secrets      Fetch from /data-sources/ which returns cleartext
                      credentials (IT-admin only). Pair with --json to see
                      values. (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations it

Usage: dr integrations it [options] [command]

IT-admin surface for file-sync integrations (OneDrive / SharePoint / Egnyte).
Requires IT-admin permissions.

Options:
  -h, --help             display help for command

Commands:
  list [options]         List file-sync integrations visible to this IT account
  get [options] <id>     Fetch one IT integration (config masked by default —
                         use --show-secrets or --json)
  add [options]          Create a new IT integration (payload-file only —
                         per-connector shape)
  update [options] <id>  Update an IT integration (full body via
                         --payload-file, or surgical --set-config K=V)
  delete [options] <id>  Delete an IT integration (two-step confirm-token flow)
  resync [options] <id>  Trigger a manual resync on an IT integration
  help [command]         display help for command

dr integrations it add

Usage: dr integrations it add [options]

Create a new IT integration (payload-file only — per-connector shape)

Options:
  --payload-file <path>  Path to JSON body (required) (default: "")
  --json                 Output raw JSON response (unmasked) (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr integrations it delete

Usage: dr integrations it delete [options] <id>

Delete an IT integration (two-step confirm-token flow)

Arguments:
  id                       integration id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr integrations it get

Usage: dr integrations it get [options] <id>

Fetch one IT integration (config masked by default — use --show-secrets or
--json)

Arguments:
  id                  integration id (positive integer)

Options:
  --json              Output raw JSON (unmasked) (default: false)
  --show-secrets      Include cleartext credentials in the formatted output
                      (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations it list

Usage: dr integrations it list [options]

List file-sync integrations visible to this IT account

Options:
  --search <q>        Free-text search (id, name, org name, sync_user email)
                      (default: "")
  --page <n>          Page number (1-indexed) (default: "1")
  --page-size <n>     Page size (1..500) (default: "50")
  --json              Output raw JSON (includes unmasked credentials) (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations it resync

Usage: dr integrations it resync [options] <id>

Trigger a manual resync on an IT integration

Arguments:
  id                  integration id (positive integer)

Options:
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations it update

Usage: dr integrations it update [options] <id>

Update an IT integration (full body via --payload-file, or surgical
--set-config K=V)

Arguments:
  id                     integration id (positive integer)

Options:
  --payload-file <path>  Path to a JSON body (full replace) (default: "")
  --set-config <kv>      Surgical config update: --set-config
                         "client_secret=newvalue". Repeatable. (default: [])
  --json                 Output raw JSON response (unmasked) (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr integrations list

Usage: dr integrations list [options]

List all integrations on this tenant

Options:
  --search <q>        Free-text search (matches name, org, type, id) (default:
                      "")
  --page <n>          Page number (1-indexed) (default: "1")
  --page-size <n>     Page size (server default: 50) (default: "50")
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations netsuite

Usage: dr integrations netsuite [options] [command]

NetSuite 3.0 -> SuiteQL in-place migration helpers

Options:
  -h, --help                                   display help for command

Commands:
  readiness [options] <integration_id>         Probe whether a NetSuite 3.0 connection is ready for SuiteQL (one live SuiteQL call). On CONFIRMED it stamps bundle_version 3 on the connection (two-step confirmation); --dry-run probes without writing. Any other outcome stamps nothing and, without --dry-run, exits non-zero. 409 (refused) causes, from the server: "Connection is SuiteQL-native or has no NetSuite 3.0 filebox", "connection account id is not a valid NetSuite account id"; missing credentials are the NOT_CONNECTED outcome, not a 409.
  saved-search-sql [options] <integration_id>  Show a saved search's SQL as translated by the connection's 3.0 bundle, its name, and the SuiteQL library entry it matches (none: create a custom report instead). Read-only. 409 (refused) causes, from the server: "Connection is SuiteQL-native or has no NetSuite 3.0 filebox", "connection account id is not a valid NetSuite account id", "connection has no credentials: <fields>". 502: the bundle call failed, or the SQL is over 100,000 characters.
  help [command]                               display help for command

dr integrations netsuite readiness

Usage: dr integrations netsuite readiness [options] <integration_id>

Probe whether a NetSuite 3.0 connection is ready for SuiteQL (one live SuiteQL
call). On CONFIRMED it stamps bundle_version 3 on the connection (two-step
confirmation); --dry-run probes without writing. Any other outcome stamps
nothing and, without --dry-run, exits non-zero. 409 (refused) causes, from the
server: "Connection is SuiteQL-native or has no NetSuite 3.0 filebox",
"connection account id is not a valid NetSuite account id"; missing credentials
are the NOT_CONNECTED outcome, not a 409.

Arguments:
  integration_id           NetSuite connection (data integration) id

Options:
  --dry-run                Probe only: never stamp the connection, no
                           confirmation needed (default: false)
  --confirm-token <token>  Token from a prior plan run - required to actually
                           stamp (default: "")
  --json                   Output the raw response as JSON (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr integrations netsuite saved-search-sql

Usage: dr integrations netsuite saved-search-sql [options] <integration_id>

Show a saved search's SQL as translated by the connection's 3.0 bundle, its
name, and the SuiteQL library entry it matches (none: create a custom report
instead). Read-only. 409 (refused) causes, from the server: "Connection is
SuiteQL-native or has no NetSuite 3.0 filebox", "connection account id is not a
valid NetSuite account id", "connection has no credentials: <fields>". 502: the
bundle call failed, or the SQL is over 100,000 characters.

Arguments:
  integration_id       NetSuite connection (data integration) id

Options:
  --saved-search <id>  NetSuite saved search id: a numeric internal id
                       (negative for standard searches) or a customsearch*
                       script id (required)
  --out <path>         Also write the decoded SQL to this file, owner-only
                       (0600); a regular file is overwritten, a symlink or
                       hard-linked file is refused. If the write fails the SQL
                       is printed and the command exits non-zero (e.g. for
                       filebox custom-reports create --query-file)
  --json               Output the raw response as JSON (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr integrations query-status

Usage: dr integrations query-status [options]

Per-query sync status (by DataIntegrationQuery IDs)

Options:
  --query-id <id>     Query ID (repeatable). At least one required. (default:
                      [])
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations revoke

Usage: dr integrations revoke [options] <id>

Disconnect a DatarailsConnector OAuth data source: clear the grant, then revoke
it at the vendor (two-step confirmation)

Arguments:
  id                       integration id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run - required to actually
                           revoke (default: "")
  --json                   Output the raw response as JSON (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr integrations sftp

Usage: dr integrations sftp [options] [command]

Self-serve SFTP fileboxes (the embedded SFTP integration)

Options:
  -h, --help                        display help for command

Commands:
  create [options]                  Create a filebox and set up SFTP on it in
                                    one step, as the UI's SFTP wizard does:
                                    creates its folder /<name>_<id> in the
                                    org's SFTP container. Needs the
                                    integrations__sftp flag on the org.
  provision [options] <filebox_id>  Set up SFTP on an existing filebox, as the
                                    UI does: creates its folder /<name>_<id> in
                                    the org's SFTP container and connects it to
                                    the org's SFTP data source. Safe to re-run;
                                    flags left out keep their stored values.
                                    Needs the integrations__sftp flag on the
                                    org and filebox ownership.
  help [command]                    display help for command

dr integrations sftp create

Usage: dr integrations sftp create [options]

Create a filebox and set up SFTP on it in one step, as the UI's SFTP wizard
does: creates its folder /<name>_<id> in the org's SFTP container. Needs the
integrations__sftp flag on the org.

Options:
  --name <name>        Filebox display name (required) (default: "")
  --scenario <s>       Scenario: Actuals|Budget|Forecast|None (default:
                       "Actuals")
  --date-sub-type <t>  Date tag sub_type (month|quarter|year|...) (default:
                       "month")
  --parent <id>        Parent folder filebox id (0 = no parent) (default: "0")
  --no-date            Create the filebox without a date tag
  --json               Output raw JSON instead of a summary (default: false)
  --date-method <m>    How arriving files get their date tag. Omitted: the
                       stored value, or upload_date for a new date-tagged
                       filebox (choices: "filename", "upload_date")
  --date-format <f>    Date format in the file name (with --date-method
                       filename) (choices: "YYYYMMDD", "YYYYMM", "MMM-YYYY",
                       "YYYY-MM-DD", "YYYY-MM", "MMM YYYY", "MM-DD-YYYY",
                       "DD.MM.YYYY", "DD-MMM-YYYY", "MMM-YY")
  --date-position <p>  Where the date sits in the file name (with --date-method
                       filename) (choices: "beginning", "end")
  --backfill <n>       Number of backfill subfolders <folder>/-1 … <folder>/-N
                       (upload_date only)
  --show-secrets       Print the SFTP password instead of redacting it. It is
                       the org's: one SFTP user serves all its fileboxes
                       (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr integrations sftp provision

Usage: dr integrations sftp provision [options] <filebox_id>

Set up SFTP on an existing filebox, as the UI does: creates its folder
/<name>_<id> in the org's SFTP container and connects it to the org's SFTP data
source. Safe to re-run; flags left out keep their stored values. Needs the
integrations__sftp flag on the org and filebox ownership.

Arguments:
  filebox_id           filebox id (positive integer)

Options:
  --json               Output raw JSON instead of a summary (default: false)
  --date-method <m>    How arriving files get their date tag. Omitted: the
                       stored value, or upload_date for a new date-tagged
                       filebox (choices: "filename", "upload_date")
  --date-format <f>    Date format in the file name (with --date-method
                       filename) (choices: "YYYYMMDD", "YYYYMM", "MMM-YYYY",
                       "YYYY-MM-DD", "YYYY-MM", "MMM YYYY", "MM-DD-YYYY",
                       "DD.MM.YYYY", "DD-MMM-YYYY", "MMM-YY")
  --date-position <p>  Where the date sits in the file name (with --date-method
                       filename) (choices: "beginning", "end")
  --backfill <n>       Number of backfill subfolders <folder>/-1 … <folder>/-N
                       (upload_date only)
  --show-secrets       Print the SFTP password instead of redacting it. It is
                       the org's: one SFTP user serves all its fileboxes
                       (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr integrations share

Usage: dr integrations share [options] [command]

Grant access to an integration (users by email, or permission groups by id)

Options:
  -h, --help                         display help for command

Commands:
  users [options] <integration_id>   Share an integration with one or more
                                     users (by email)
  groups [options] <integration_id>  Share an integration with one or more
                                     permission groups (by id)
  help [command]                     display help for command

dr integrations share groups

Usage: dr integrations share groups [options] <integration_id>

Share an integration with one or more permission groups (by id)

Arguments:
  integration_id      integration id (positive integer)

Options:
  --group-id <id>     Permission-group ID (repeatable). At least one required.
                      (default: [])
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations share users

Usage: dr integrations share users [options] <integration_id>

Share an integration with one or more users (by email)

Arguments:
  integration_id      integration id (positive integer)

Options:
  --email <addr>      User email (repeatable). At least one required. (default:
                      [])
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations status

Usage: dr integrations status [options] <id>

Integration status, last run, and error description (short form)

Arguments:
  id                  integration id (positive integer)

Options:
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations sync

Usage: dr integrations sync [options] <id>

Trigger a manual resync; optionally poll until SYNCED/ERROR

Arguments:
  id                  integration id (positive integer)

Options:
  --wait <duration>   Poll until status leaves SYNCING, up to this duration (0
                      = no polling; max 24h) (default: "0")
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations test-connection

Usage: dr integrations test-connection [options]

Dry-run: validate a proposed integration body without saving

Options:
  --config-file <path>  Path to JSON file with the full integration body
                        (required) (default: "")
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr integrations types

Usage: dr integrations types [options]

List supported connector types (NetSuite, Salesforce, ...)

Options:
  --search <q>        Filter by name or type (substring) (default: "")
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr integrations update

Usage: dr integrations update [options] <id>

Update an integration (payload-file only — admin only)

Arguments:
  id                     integration id (positive integer)

Options:
  --payload-file <path>  Path to JSON file with the PUT body (required)
                         (default: "")
  --json                 Output raw JSON instead of a summary (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr kb

Usage: dr kb [options] [command]

Datarails Help Center search and browsing. Use this BEFORE running other dr
commands when the user describes a problem in product terms ("reconciliation
isn't pairing", "FX translation looks off") rather than dr-cli terms. KB is
global content, not tenant-specific — no --server flag.

Options:
  -h, --help                                  display help for command

Commands:
  search [options] <query>                    Full-text search of the Help Center. Returns articles with markdown bodies. Use when the user describes intent in product vocabulary rather than dr-cli verbs.
  get [options] <article-id>                  Fetch one Help Center article by ID. Use when you already have an ID from a URL the user pasted or from a prior search_kb call — faster than re-searching.
  categories [options]                        List all Help Center categories (top-level KB taxonomy).
  sections [options]                          List Help Center sections, optionally filtered to one category.
  articles-in-section [options] <section-id>  Enumerate articles in a section. Metadata-only by default; use --with-bodies for full markdown.
  recent [options]                            Articles updated within the last N days. Use when troubleshooting a feature the customer says is "new" or "just changed".
  attachments [options] <article-id>          List all attachments on an article (inline images + non-inline files like PDFs).
  article-images [options] <article-id>       Download inline images from an article to disk. Use when screenshots in the article matter for the answer (the LLM can Read each downloaded file).
  help [command]                              display help for command

dr kb article-images

Usage: dr kb article-images [options] <article-id>

Download inline images from an article to disk. Use when screenshots in the
article matter for the answer (the LLM can Read each downloaded file).

Options:
  --out-dir <dir>  directory to write images into (default ./kb-images-<id>)
  --limit <n>      max images to download (1-10, default 5) (default: "5")
  --locale <code>  Help Center locale (default en-us) (default: "en-us")
  --json           emit JSON instead of human-readable
  -h, --help       display help for command

dr kb articles-in-section

Usage: dr kb articles-in-section [options] <section-id>

Enumerate articles in a section. Metadata-only by default; use --with-bodies
for full markdown.

Options:
  --limit <n>      max results (1-100, default 25) (default: "25")
  --with-bodies    include markdown bodies in the result
  --locale <code>  Help Center locale (default en-us) (default: "en-us")
  --json           emit JSON instead of human-readable
  -h, --help       display help for command

dr kb attachments

Usage: dr kb attachments [options] <article-id>

List all attachments on an article (inline images + non-inline files like
PDFs).

Options:
  --locale <code>  Help Center locale (default en-us) (default: "en-us")
  --json           emit JSON instead of human-readable
  -h, --help       display help for command

dr kb categories

Usage: dr kb categories [options]

List all Help Center categories (top-level KB taxonomy).

Options:
  --locale <code>  Help Center locale (default en-us) (default: "en-us")
  --json           emit JSON instead of human-readable
  -h, --help       display help for command

dr kb get

Usage: dr kb get [options] <article-id>

Fetch one Help Center article by ID. Use when you already have an ID from a URL
the user pasted or from a prior search_kb call — faster than re-searching.

Options:
  --locale <code>  Help Center locale (default en-us) (default: "en-us")
  --json           emit JSON instead of human-readable
  -h, --help       display help for command

dr kb recent

Usage: dr kb recent [options]

Articles updated within the last N days. Use when troubleshooting a feature the
customer says is "new" or "just changed".

Options:
  --days <n>       window in days (default 30) (default: "30")
  --limit <n>      max results (1-100, default 25) (default: "25")
  --locale <code>  Help Center locale (default en-us) (default: "en-us")
  --json           emit JSON instead of human-readable
  -h, --help       display help for command

dr kb sections

Usage: dr kb sections [options]

List Help Center sections, optionally filtered to one category.

Options:
  --category <id>  filter to a specific category id
  --limit <n>      max results (1-100, default 50) (default: "50")
  --locale <code>  Help Center locale (default en-us) (default: "en-us")
  --json           emit JSON instead of human-readable
  -h, --help       display help for command

dr login

Usage: dr login [options]

Authenticate with a Datarails server, via browser or a stored API key

Options:
  -s, --server <key>  Server key. Prompts if omitted.
  --timeout <ms>      Overall login timeout in milliseconds (default 600000 =
                      10m for the browser flow, 30000 for --api-key)
  --api-key           Authenticate with a user API key instead of the browser.
                      The key is read from a hidden prompt (TTY) or from stdin
                      (pipe), never from an argument.
  -h, --help          display help for command

dr login-as

Usage: dr login-as [options] <email>

Impersonate a user via JWT (requires an operator `dr login` first)

Arguments:
  email                  target user email to impersonate

Options:
  --as <operator-email>  operator session to authorize with (auto-picked if
                         sole)
  --user-id <n>          impersonate this user id directly (skips the directory
                         lookup)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  -h, --help             display help for command

dr logout

Usage: dr logout [options]

Remove saved credentials for a Datarails server

Options:
  -s, --server <key>  Server key to log out of
  --all               Log out of every stored server
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr lut

Usage: dr lut|lookups [options] [command]

Operations on Datarails LUTs (lookup-table documents)

Options:
  -h, --help                          display help for command

Commands:
  list [options]                      List LUTs configured under a template
  list-by-doc [options] <doc_id>      List LUTs sourced from a given document
  unmapped [options]                  List LUT documents with unmapped items
                                      (count of LUT keys missing from the
                                      source data)
  data [options] <doc_id> <lut_id>    Show a LUT's mapped key→value data
  create [options]                    Create a filebox-sourced LUT under a
                                      template (body from --payload-file). For
                                      a table-sourced lookup use
                                      `create-table-lookup`.
  create-table-lookup [options]       Create a table-sourced LUT: a lookup on
                                      --table fed by columns from
                                      --source-table
  update-table-lookup [options] <id>  Update a table-sourced LUT by id
                                      (overlays only the flags you pass onto
                                      its current config). Use this instead of
                                      `update` for table lookups — it handles
                                      the server's
                                      must-resend-source_template_id/keys/fields
                                      requirement for you.
  update [options] <id>               Update a LUT (body from --payload-file)
  delete [options] <id>               Delete a LUT (two-step confirm)
  reorder [options]                   Reorder LUTs under a template
  save-mappings [options] <doc_id>    Save LUT mapping data on a document (POST
                                      /api/documents/<doc>/web_update_lut) —
                                      the FE "Save" action, and the way to
                                      resolve unmapped items from the CLI.
  export [options] <doc_id>           Download the document's LUT data as .xlsx
                                      (GET /api/documents/<doc>/lut-file)
  help [command]                      display help for command

dr lut create

Usage: dr lut create [options]

Create a filebox-sourced LUT under a template (body from --payload-file). For a
table-sourced lookup use `create-table-lookup`.

Options:
  --table <id>           template id (positive integer)
  --payload-file <path>  Path to a JSON body for the new LUT (required)
  --json                 Output raw JSON server response instead of a table
                         (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr lut create-table-lookup

Usage: dr lut create-table-lookup [options]

Create a table-sourced LUT: a lookup on --table fed by columns from
--source-table

Options:
  --table <id>           target table id the lookup is created on (positive
                         integer)
  --source-table <id>    source table id whose columns feed the lookup
                         (positive integer; must differ from --table)
  --keys <list>          comma-separated source column names used as lookup
                         keys (e.g. "Account Group L0")
  --fields <list>        comma-separated source column names to pull into the
                         target (e.g. "Account Group L3")
  --key-len <n>          number of key columns (positive integer; defaults to
                         the count of --keys)
  --name <name>          optional display name for the lookup (default: "")
  --order <n>            position among the table's lookups (non-negative)
                         (default: "0")
  --rescan-option <opt>  rescan policy (default: LATEST_IN_DIM) (default:
                         "LATEST_IN_DIM")
  --no-check-misses      do not flag lookup keys missing from the source data
                         (default: check)
  --no-validate-loops    skip the server guard that rejects a source table
                         already targeting this one (default: validate)
  --json                 Output raw JSON server response instead of a table
                         (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr lut data

Usage: dr lut data [options] <doc_id> <lut_id>

Show a LUT's mapped key→value data

Arguments:
  doc_id              document id (positive integer)
  lut_id              lut id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr lut delete

Usage: dr lut delete [options] <id>

Delete a LUT (two-step confirm)

Arguments:
  id                       lut id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr lut export

Usage: dr lut export [options] <doc_id>

Download the document's LUT data as .xlsx (GET /api/documents/<doc>/lut-file)

Arguments:
  doc_id              document id (positive integer)

Options:
  --output <path>     Local path to write the .xlsx attachment
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr lut list

Usage: dr lut list [options]

List LUTs configured under a template

Options:
  --table <id>        template id (positive integer)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr lut list-by-doc

Usage: dr lut list-by-doc [options] <doc_id>

List LUTs sourced from a given document

Arguments:
  doc_id              document id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr lut reorder

Usage: dr lut reorder [options]

Reorder LUTs under a template

Options:
  --ids <list>           Comma-separated lut ids in desired order (e.g.
                         42,17,9) (default: "")
  --payload-file <path>  Path to a JSON body for the reorder request (default:
                         "")
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr lut save-mappings

Usage: dr lut save-mappings [options] <doc_id>

Save LUT mapping data on a document (POST /api/documents/<doc>/web_update_lut)
— the FE "Save" action, and the way to resolve unmapped items from the CLI.

Arguments:
  doc_id                     document id (positive integer)

Options:
  --file <path>              JSON file holding a bare ARRAY (not an object) of
                             sheet objects: sheet_name, document_version_id
                             (must be the latest), and create rows. Each row is
                             a list of {column_header, value} cells, key
                             columns first. Omit "header" — the CLI reads the
                             sheet's own. Full example: `dr skill print dr-cli
                             --file reference/lookups.md`.
  --allow-header-rename      Send a "header" that differs from the sheet's own
                             row 1, renaming the columns in the customer's
                             file. Refused without this flag. (default: false)
  --poll-interval <seconds>  seconds between join polls (default: 2)
  --timeout <seconds>        max seconds to wait for the write to finish
                             (default: 300). The server answers 409 after 0.5s
                             and keeps writing in the background, so the
                             command joins the running task until it reports a
                             result.
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr lut unmapped

Usage: dr lut unmapped [options]

List LUT documents with unmapped items (count of LUT keys missing from the
source data)

Options:
  --all               include LUT documents with zero unmapped items (default:
                      false)
  --limit <n>         maximum rows to display (positive integer) (default:
                      "50")
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr lut update

Usage: dr lut update [options] <id>

Update a LUT (body from --payload-file)

Arguments:
  id                     lut id (positive integer)

Options:
  --payload-file <path>  Path to a JSON body for the update (required)
  --json                 Output raw JSON server response instead of a table
                         (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr lut update-table-lookup

Usage: dr lut update-table-lookup [options] <id>

Update a table-sourced LUT by id (overlays only the flags you pass onto its
current config). Use this instead of `update` for table lookups — it handles
the server's must-resend-source_template_id/keys/fields requirement for you.

Arguments:
  id                           lut id (positive integer)

Options:
  --table <id>                 target table the lookup lives on (positive
                               integer; used to locate it — there is no per-id
                               lookup fetch)
  --source-table <id>          change the source table id (positive integer;
                               must differ from --table)
  --keys <list>                replace the lookup key columns (comma-separated
                               source column names)
  --fields <list>              replace the pulled columns (comma-separated
                               source column names)
  --key-len <n>                change the number of key columns (positive
                               integer)
  --name <name>                change the display name
  --order <n>                  change the position among the table's lookups
                               (non-negative)
  --rescan-option <opt>        change the rescan policy (e.g. LATEST_IN_DIM)
  --check-misses <true|false>  set whether to flag missing keys (omit to keep
                               the current value)
  --no-validate-loops          skip the server loop guard for this request
                               (default: validate)
  --json                       Output raw JSON server response instead of a
                               table (default: false)
  -s, --server <key>           Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                               DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                               TEST-5, TEST-6, TEST-7, DEMO) or a full
                               https://<host>.datarails.com URL. Required.
  --account <email>            Datarails account email (required when multiple
                               identities are stored for the server)
  -h, --help                   display help for command

dr mapper-recipes

Usage: dr mapper-recipes [options] [command]

Operate on the mapper-recipe library (saved/reusable mapper-config templates
the FE's "Saved mappers" / "Save mapper to library" modals back). Three
subcommands: list, get, save.

Options:
  -h, --help          display help for command

Commands:
  list [options]      List all mapper recipes available to the operator
  get [options] <id>  Get a single mapper recipe (config + fields_to_change
                      inline)
  save [options]      Save a mapper config + fields_to_change pair as a
                      reusable recipe. The wire shape stringifies `config` and
                      `fields_to_change` to JSON strings — this command takes
                      plain JSON files and handles the stringify.
  help [command]      display help for command

dr mapper-recipes get

Usage: dr mapper-recipes get [options] <id>

Get a single mapper recipe (config + fields_to_change inline)

Arguments:
  id                  Recipe id (positive integer)

Options:
  --json              Output raw JSON (default — recipes are too large for a
                      table) (default: true)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr mapper-recipes list

Usage: dr mapper-recipes list [options]

List all mapper recipes available to the operator

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr mapper-recipes save

Usage: dr mapper-recipes save [options]

Save a mapper config + fields_to_change pair as a reusable recipe. The wire
shape stringifies `config` and `fields_to_change` to JSON strings — this
command takes plain JSON files and handles the stringify.

Options:
  --name <name>         Display name for the recipe
  --description <text>  Optional description (default: "")
  --from-version <id>   Document-version id the recipe is derived from
                        (positive integer)
  --config-file <path>  Path to a JSON file containing the mapper config
  --fields-file <path>  Path to a JSON file containing the fields_to_change
                        array
  --json                Output raw JSON server response (default: false)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr mcp

Usage: dr mcp [options] [command]

Manage MCP servers exposed by dr-cli. Most users don't need this — the standard
installer auto-registers all bundled MCPs.

Options:
  -h, --help         display help for command

Commands:
  register <name>    Add the named MCP to Claude Code (writes ~/.claude.json)
  unregister <name>  Remove the named MCP from Claude Code
  list [options]     List the MCP servers dr-cli exposes and whether they are
                     registered with Claude Code
  help [command]     display help for command

dr mcp list

Usage: dr mcp list [options]

List the MCP servers dr-cli exposes and whether they are registered with Claude
Code

Options:
  --json      emit JSON instead of human-readable
  -h, --help  display help for command

dr mcp register

Usage: dr mcp register [options] <name>

Add the named MCP to Claude Code (writes ~/.claude.json)

Options:
  -h, --help  display help for command

dr mcp serve

Usage: dr mcp serve [options] <name>

Launch the named MCP server over stdio (invoked by Claude Code; not for direct
use)

Options:
  -h, --help  display help for command

dr mcp unregister

Usage: dr mcp unregister [options] <name>

Remove the named MCP from Claude Code

Options:
  -h, --help  display help for command

dr mec

Usage: dr mec [options] [command]

Month-end close (MEC) configuration

Options:
  -h, --help      display help for command

Commands:
  close-dates     Close-date map (year/month → close-day)
  workflow        Manage MEC workflows (templates, processes, steps, tasks,
                  members) — gated on `month_end_close`
  help [command]  display help for command

dr mec close-dates

Usage: dr mec close-dates [options] [command]

Close-date map (year/month → close-day)

Options:
  -h, --help      display help for command

Commands:
  get [options]   Show the org's close-date map
  set [options]   Replace the org's close-date map (PUT, IT-admin only)
  help [command]  display help for command

dr mec close-dates get

Usage: dr mec close-dates get [options]

Show the org's close-date map

Options:
  --year <YYYY>       Filter to a single year (optional)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr mec close-dates set

Usage: dr mec close-dates set [options]

Replace the org's close-date map (PUT, IT-admin only).

Wire format: { "<year>": { "<month>": <unix-seconds-epoch> } }.
The inner value is a Unix-second epoch (UTC) — the close timestamp,
NOT a day-of-month integer.

IMPORTANT: server semantics are per-year MERGE, per-month REPLACE.
Sending {"2025": {"1": 1738756800}} overwrites every month in 2025
(any existing months wiped) but leaves 2024 untouched.

Round-trip workflow (preferred — `get` and `set` use the same shape):
  dr mec close-dates get --json > file.json
  # edit file.json (epoch values; recompute via Date.UTC if needed)
  dr mec close-dates set --file file.json

Options:
  --file <path>       JSON file with { year: { month: unix-seconds-epoch } }
                      map (output of `dr mec close-dates get --json`)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr mec workflow

Usage: dr mec workflow [options] [command]

Manage MEC workflows (templates, processes, steps, tasks, members) — gated on
`month_end_close`

Options:
  -h, --help                 display help for command

Commands:
  list [options]             List MEC workflow templates the caller can see
  get [options] <id>         Show a MEC workflow template by id
  process                    MEC process instances (running close periods)
  step                       MEC workflow steps
  task                       MEC tasks (file + checklist)
  member                     MEC workflow members and per-member doc-permission
                             checks
  group                      MEC workflow groups
  periods [options]          List MEC close periods that have an active process
  accounts                   Account-grouped task views (reconciliation module
                             integration)
  create [options]           Create a new MEC workflow template (always starts
                             INACTIVE)
  update [options] <id>      Edit a MEC workflow template (PUT
                             /process_templates/<id>)
  activate [options] <id>    Activate a MEC workflow template
  deactivate [options] <id>  Deactivate a MEC workflow template
  archive [options] <id>     Archive a MEC workflow template (soft-delete;
                             restorable).
  restore [options] <id>     Restore an archived MEC workflow template.
  delete [options] <id>      Alias for `archive` — soft-deletes (no v2
                             hard-delete endpoint exists).
  clone [options] <id>       Clone a MEC workflow template into a new process
                             instance
  help [command]             display help for command

dr mec workflow accounts

Usage: dr mec workflow accounts [options] [command]

Account-grouped task views (reconciliation module integration)

Options:
  -h, --help               display help for command

Commands:
  tasks [options]          Detail-level tasks for a specific account in a given
                           period
  task-statuses [options]  Task status counts grouped by account / entity
  help [command]           display help for command
dr mec workflow accounts task-statuses
Usage: dr mec workflow accounts task-statuses [options]

GET /api/v2/accounts/task_statuses

Options:
  --date-tag <unix>   Unix-seconds period anchor
  --entity <name>     Filter to a single entity
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command
dr mec workflow accounts tasks
Usage: dr mec workflow accounts tasks [options]

GET /api/usertasks/v2/accounts/tasks — returns the full task
detail (doc + non-doc tasks) for a SPECIFIC account in a period.

All three of --date-tag, --account-name, --account-group are
required (server returns 400 otherwise). Use
`mec workflow accounts task-statuses` for the overview view
across all accounts in a period.

Options:
  --date-tag <unix>       Unix-seconds period anchor
  --account-name <name>   Account name (required)
  --account-group <name>  Account group (required)
  --entity <name>         Filter to a single entity
  --json                  Output raw JSON (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  -h, --help              display help for command

dr mec workflow activate

Usage: dr mec workflow activate [options] <id>

Set is_active=true. WILL fire async email notifications to assignees on every
step whose notify_automatically=true. Requires --yes-share-data when any such
step has tasks.

Arguments:
  id                       numeric workflow template id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command

dr mec workflow archive

Usage: dr mec workflow archive [options] <id>

Archive a MEC workflow template (soft-delete; restorable).

Arguments:
  id                       numeric workflow template id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr mec workflow clone

Usage: dr mec workflow clone [options] <id>

Create a new instance of an existing MEC template (e.g. April → May).

Existing members carry over to the new instance — requires
--yes-share-data in addition to the confirm token.

--copy-from defaults to the template’s newest instance by date_tag.
Without --name the server derives the period label for the new
instance (e.g. "September 2026").

Arguments:
  id                        numeric workflow template id

Options:
  --date-tag <unix>         Unix-seconds date_tag for the new instance
  --copy-from <process-id>  Existing instance to copy from (default: newest)
  --name <text>             Name for the new instance (default: server-derived
                            period label)
  --start-time <unix>       Unix-seconds start time for the new instance
  --tag <id=value>          Additional non-date dimension tag, e.g. --tag
                            12=Q3-Plan. Repeatable.
  --json                    Output the new instance as JSON (default: false)
  --confirm-token <token>   Token from a prior plan step
  -s, --server <key>        Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                            DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                            TEST-5, TEST-6, TEST-7, DEMO) or a full
                            https://<host>.datarails.com URL. Required.
  --account <email>         Datarails account email (required when multiple
                            identities are stored for the server)
  --yes-share-data          Acknowledge that this operation grants data access
                            to a new audience (separate from --confirm-token;
                            required for member/group writes, bulk grants, and
                            activating a workflow whose steps cascade
                            notifications).
  -h, --help                display help for command

dr mec workflow create

Usage: dr mec workflow create [options]

Create a MEC workflow template (`POST /api/processes/v2/process_templates`).

Requires `type: "Month End Close"` — non-MEC types are rejected
with a redirect to `dr workflow create`. The new template is
always created with is_active=false; no notifications fire until
`dr mec workflow activate` is run separately.

Options:
  --file <path>            Path to a JSON file matching the MEC template-create
                           shape
  --json                   Output the created template as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr mec workflow deactivate

Usage: dr mec workflow deactivate [options] <id>

Set is_active=false. No notifications fire.

Arguments:
  id                       numeric workflow template id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr mec workflow delete

Usage: dr mec workflow delete [options] <id>

Alias for `archive` — soft-deletes (no v2 hard-delete endpoint exists).

Arguments:
  id                       numeric workflow template id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr mec workflow get

Usage: dr mec workflow get [options] <id>

Show a MEC workflow template by id

Arguments:
  id                  numeric workflow template id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr mec workflow group

Usage: dr mec workflow group [options] [command]

MEC workflow groups

Options:
  -h, --help                                 display help for command

Commands:
  list [options] <template-id>               List groups with access to a MEC workflow template
  add [options] <template-id>                Add group(s) to a MEC workflow template
  update [options] <template-id> <group-id>  Change a group's role on a MEC workflow template
  remove [options] <template-id> <group-id>  Remove a group from a MEC workflow template
  grant-bulk [options]                       Bulk-grant a role to many groups across many MEC workflows
  help [command]                             display help for command
dr mec workflow group add
Usage: dr mec workflow group add [options] <template-id>

Add group(s) to a MEC workflow template

Arguments:
  template-id              numeric workflow template id

Options:
  --file <path>            JSON array of {permission_group, role}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command
dr mec workflow group grant-bulk
Usage: dr mec workflow group grant-bulk [options]

POST /api/processes/groups/grant_permissions_bulk.

WARNING: server cascades table permissions for linked LUT
templates. Requires --yes-share-data.

Options:
  --file <path>            JSON file with {permission_groups, entities_ids,
                           role}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command
dr mec workflow group list
Usage: dr mec workflow group list [options] <template-id>

List groups with access to a MEC workflow template

Arguments:
  template-id         numeric workflow template id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command
dr mec workflow group remove
Usage: dr mec workflow group remove [options] <template-id> <group-id>

Remove a group from a MEC workflow template

Arguments:
  template-id              numeric workflow template id
  group-id                 numeric permission-group id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow group update
Usage: dr mec workflow group update [options] <template-id> <group-id>

Change a group's role on a MEC workflow template

Arguments:
  template-id              numeric workflow template id
  group-id                 numeric permission-group id

Options:
  --role <role>            WORKFLOW_V2_OWNER_ROLE or WORKFLOW_V2_EDITOR_ROLE
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command

dr mec workflow list

Usage: dr mec workflow list [options]

List MEC workflow templates (`GET /api/processes/v2/process_templates`
with `only_mec=true` forced). Defaults to non-archived templates.

Options:
  --archived          Show archived templates instead of active ones (default:
                      false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr mec workflow member

Usage: dr mec workflow member [options] [command]

MEC workflow members and per-member doc-permission checks

Options:
  -h, --help                                display help for command

Commands:
  list [options] <template-id>              List members of a MEC workflow template
  check [options] <template-id>             Pre-check missing doc permissions for emails (read-only)
  add [options] <template-id>               Add member(s) to a MEC workflow template (sharing op)
  update [options] <template-id> <user-id>  Change a member's role on a MEC workflow template
  remove [options] <template-id> <user-id>  Remove a member from a MEC workflow template
  grant-bulk [options]                      Bulk-grant a role to many emails across many MEC workflows
  help [command]                            display help for command
dr mec workflow member add
Usage: dr mec workflow member add [options] <template-id>

Add members to a MEC workflow template (`POST /process_templates/<tid>/users`).

Runs the documented pre-share permission audit first (PUT
/users/check) so the plan-step shows which documents each
email is missing access to. Requires --yes-share-data.

Arguments:
  template-id              numeric workflow template id

Options:
  --file <path>            JSON file with {emails, role}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command
dr mec workflow member check
Usage: dr mec workflow member check [options] <template-id>

Run the workflow-add pre-share audit without granting anything.

Calls `PUT /process_templates/<tid>/users/check` — server is idempotent
and returns per-email diagnostics of which documents the address
cannot yet access.

Arguments:
  template-id         numeric workflow template id

Options:
  --emails <list>     Comma-separated email addresses
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command
dr mec workflow member grant-bulk
Usage: dr mec workflow member grant-bulk [options]

POST /api/processes/users/grant_permissions_bulk.

WARNING: server cascades table permissions for linked LUT
templates. Requires --yes-share-data.

Options:
  --file <path>            JSON file with {emails, entities_ids, role}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command
dr mec workflow member list
Usage: dr mec workflow member list [options] <template-id>

List members of a MEC workflow template

Arguments:
  template-id         numeric workflow template id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command
dr mec workflow member remove
Usage: dr mec workflow member remove [options] <template-id> <user-id>

Remove a member from a MEC workflow template

Arguments:
  template-id              numeric workflow template id
  user-id                  numeric user id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow member update
Usage: dr mec workflow member update [options] <template-id> <user-id>

Change a member's role on a MEC workflow template

Arguments:
  template-id              numeric workflow template id
  user-id                  numeric user id

Options:
  --role <role>            WORKFLOW_V2_OWNER_ROLE, WORKFLOW_V2_EDITOR_ROLE, or
                           a numeric role id (see ROLE_ID in `mec workflow
                           member list`)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command

dr mec workflow periods

Usage: dr mec workflow periods [options]

List the periods that currently have an active MEC process
(`GET /api/processes/v2/process_periods`).

This endpoint also doubles as the MEC feature-flag probe — calling
any MEC command on a non-MEC tenant fails fast with the same
response.

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr mec workflow process

Usage: dr mec workflow process [options] [command]

MEC process instances (running close periods)

Options:
  -h, --help             display help for command

Commands:
  list [options]         List process instances
  get [options] <id>     Show a process instance with embedded steps
  delete [options] <id>  Delete a MEC process instance (cascades to all its
                         tasks)
  help [command]         display help for command
dr mec workflow process delete
Usage: dr mec workflow process delete [options] <id>

Delete a MEC process instance (cascades to all its tasks)

Arguments:
  id                       numeric process instance id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow process get
Usage: dr mec workflow process get [options] <id>

Show a process instance with embedded steps

Arguments:
  id                  numeric process instance id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command
dr mec workflow process list
Usage: dr mec workflow process list [options]

List process instances

Options:
  --template <id>     Filter to a single template id
  --active            Filter to active instances only
  --inactive          Filter to inactive instances only
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr mec workflow restore

Usage: dr mec workflow restore [options] <id>

Restore an archived MEC workflow template.

Arguments:
  id                       numeric workflow template id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr mec workflow step

Usage: dr mec workflow step [options] [command]

MEC workflow steps

Options:
  -h, --help                               display help for command

Commands:
  get [options] <process-id> <step-id>     Show a step with embedded tasks
  create [options] <process-id>            Create a new step on a MEC process instance
  update [options] <process-id> <step-id>  Edit a MEC step
  delete [options] <process-id> <step-id>  Delete a MEC step (cascades to all its tasks)
  reorder [options] <template-id>          Reorder steps on a MEC template
  help [command]                           display help for command
dr mec workflow step create
Usage: dr mec workflow step create [options] <process-id>

Create a new step on a MEC process instance

Arguments:
  process-id               numeric process instance id

Options:
  --file <path>            JSON file matching the step-create shape
  --json                   Output the created step as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow step delete
Usage: dr mec workflow step delete [options] <process-id> <step-id>

Delete a MEC step (cascades to all its tasks)

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow step get
Usage: dr mec workflow step get [options] <process-id> <step-id>

Show a step with embedded tasks

Arguments:
  process-id          numeric process instance id
  step-id             numeric step id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command
dr mec workflow step reorder
Usage: dr mec workflow step reorder [options] <template-id>

Reorder steps on a MEC template

Arguments:
  template-id              numeric template id

Options:
  --file <path>            JSON array of {id, index, y_index}
  --order <pairs>          Shorthand: "id:n,id2:n2,..." (mutually exclusive
                           with --file)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow step update
Usage: dr mec workflow step update [options] <process-id> <step-id>

Edit a MEC step

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --file <path>            JSON file with partial step shape
  --json                   Output the updated step as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr mec workflow task

Usage: dr mec workflow task [options] [command]

MEC tasks (file + checklist)

Options:
  -h, --help                                             display help for command

Commands:
  list [options] <process-id> <step-id>                  List tasks on a step (derived client-side from step get)
  get [options] <process-id> <step-id> <task-id>         Show one task by id (derived client-side from step get)
  add-file [options] <process-id> <step-id>              Bulk-add filebox tasks to a MEC step (with optional reconciliation_tags)
  add-checklist [options] <process-id> <step-id>         Bulk-add checklist tasks to a MEC step
  update [options] <process-id> <step-id>                Bulk-update MEC tasks (file or non-file)
  update-one [options] <process-id> <step-id> <task-id>  Update a single MEC checklist task by id
  delete [options] <process-id> <step-id>                Bulk-delete MEC tasks (file or non-file) by id
  notify [options] <process-id> <step-id>                Send MEC tasks to their assignees (fires async email)
  approve [options] <process-id> <step-id>               Approve a batch of MEC tasks
  reject [options] <process-id> <step-id>                Reject a batch of MEC tasks
  sign-off [options] <process-id> <step-id>              Mark MEC tasks complete (or re-open with --is-sign-off false)
  help [command]                                         display help for command
dr mec workflow task add-checklist
Usage: dr mec workflow task add-checklist [options] <process-id> <step-id>

Bulk-add checklist tasks to a MEC step

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --file <path>            JSON file (array)
  --json                   Output the created tasks as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow task add-file
Usage: dr mec workflow task add-file [options] <process-id> <step-id>

Bulk-add filebox tasks to a MEC step (with optional reconciliation_tags)

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --file <path>            JSON file (array) — see design doc
  --json                   Output the created tasks as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow task approve
Usage: dr mec workflow task approve [options] <process-id> <step-id>

Approve a batch of MEC tasks

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --file <path>            JSON file with {tasks, email?, resend?}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow task delete
Usage: dr mec workflow task delete [options] <process-id> <step-id>

Bulk-delete MEC tasks (file or non-file) by id

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --ids <list>             Comma-separated task ids
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow task get
Usage: dr mec workflow task get [options] <process-id> <step-id> <task-id>

Show one task by id (derived client-side from step get)

Arguments:
  process-id          numeric process instance id
  step-id             numeric step id
  task-id             numeric task id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command
dr mec workflow task list
Usage: dr mec workflow task list [options] <process-id> <step-id>

List tasks on a step (derived client-side from step get)

Arguments:
  process-id          numeric process instance id
  step-id             numeric step id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command
dr mec workflow task notify
Usage: dr mec workflow task notify [options] <process-id> <step-id>

Send MEC tasks to their assignees (fires async email)

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --type <type>            "file" or "non-file"
  --file <path>            JSON file with assignees + email blob
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow task reject
Usage: dr mec workflow task reject [options] <process-id> <step-id>

Reject a batch of MEC tasks

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --file <path>            JSON file with {tasks, email?, resend?}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow task sign-off
Usage: dr mec workflow task sign-off [options] <process-id> <step-id>

Mark MEC tasks complete (or re-open with --is-sign-off false)

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --type <type>            "file" or "non-file"
  --ids <list>             Comma-separated task ids
  --is-sign-off <bool>     true (default) to complete, false to re-open
                           (default: "true")
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow task update
Usage: dr mec workflow task update [options] <process-id> <step-id>

Bulk-update MEC tasks (file or non-file)

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --type <type>            "file" or "non-file"
  --file <path>            JSON file (array)
  --json                   Output as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr mec workflow task update-one
Usage: dr mec workflow task update-one [options] <process-id> <step-id> <task-id>

Update a single MEC checklist task by id

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id
  task-id                  numeric checklist task id

Options:
  --file <path>            JSON file (single checklist row)
  --json                   Output the updated task as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr mec workflow update

Usage: dr mec workflow update [options] <id>

Edit a MEC workflow template (PUT /process_templates/<id>)

Arguments:
  id                       numeric workflow template id

Options:
  --file <path>            JSON file with the partial template shape
  --json                   Output the updated template as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr metrics

Usage: dr metrics [options] [command]

Operations on Datarails KPIs (finance-os metrics)

Options:
  -h, --help                       display help for command

Commands:
  list [options]                   List KPIs on this tenant (default:
                                   semantic/rich view)
  get [options] <metric_id>        Get a single metric definition (raw internal
                                   shape)
  data [options]                   Compute KPI values (scenario + date range +
                                   optional filters)
  drilldown [options]              Drill down to source rows behind one or more
                                   KPIs
  create                           Create a metric (BASE, CALC or DRIVER)
  categories                       Operations on metric categories
  dimensions                       Operations on metric dimensions
  update [options] <id>            Update a metric in place (partial PATCH).
                                   Pass at least one of the optional flags
                                   below; unspecified fields are left as-is.
  delete [options] <ids...>        Delete one or more metrics by ID (two-step
                                   confirm). Passing multiple ids deletes them
                                   as a single confirmed batch — one plan, one
                                   token.
  re-aggregate [options] [ids...]  Trigger semantic-layer re-aggregation
                                   (rebuild pre-aggregated metric values). Pass
                                   metric ids for a targeted refresh, or --all
                                   for an org-wide rebuild (two-step confirm).
                                   Returns 202 = queued in the background, not
                                   finished.
  migrate [options]                Run the org-wide metrics + dimensions
                                   migration: backfill metric
                                   category/time-aggregation/source tables and
                                   convert V1 KPI dimension fields to V2
                                   dimensions. Org-admin only. --dry-run
                                   previews the full summary with every write
                                   rolled back; the live run requires the
                                   two-step confirm.
  suggestions                      AI-suggested metrics — agent-generated;
                                   requires the
                                   semantic_layer__ai_metric_suggestions
                                   Unleash flag and an org-admin user.
                                   `profile` is the exception: read-only
                                   table/field profiling, no flag needed
  driver                           Driver definition and values of a DRIVER
                                   metric, per scenario context (--scenario /
                                   --cycle / --planning-scenario: free-text
                                   names, matched exactly)
  calculations                     Scenario-bound formulas of a CALC metric,
                                   one per scenario context (--scenario /
                                   --cycle / --planning-scenario: free-text
                                   names, matched exactly)
  what-if [options]                Evaluate a formula with driver values
                                   overridden for this call only (nothing is
                                   saved). Window: the 3 months ending at
                                   --reference-month. Prints the result, then
                                   each overridden driver's contribution.
  help [command]                   display help for command

dr metrics calculations

Usage: dr metrics calculations [options] [command]

Scenario-bound formulas of a CALC metric, one per scenario context (--scenario
/ --cycle / --planning-scenario: free-text names, matched exactly)

Options:
  -h, --help             display help for command

Commands:
  list [options] <id>    List a CALC metric's scenario calculations
  add [options] <id>     Bind a formula to one scenario context (reads the
                         list, appends, writes the full list back). Refused
                         when that context already has one, unless --replace.
  remove [options] <id>  Remove the calculation bound to one scenario context
                         (two-step confirm; the plan prints the formula being
                         removed)
  help [command]         display help for command

dr metrics calculations add

Usage: dr metrics calculations add [options] <id>

Bind a formula to one scenario context (reads the list, appends, writes the
full list back). Refused when that context already has one, unless --replace.

Arguments:
  id                          CALC metric id (positive integer)

Options:
  --scenario <name>           Scenario name — free text, matched exactly
                              (default: "Actuals")
  --cycle <label>             Scenario cycle label — free text, matched exactly
                              (default: none)
  --planning-scenario <name>  Planning scenario name — free text, matched
                              exactly (default: none)
  --formula <s>               Formula in the `metrics create calc` syntax: each
                              metric name in square brackets, e.g. "[Headcount]
                              * [Avg Salary]"
  --replace                   Overwrite an existing calculation for the same
                              context (default: false)
  --json                      Output the stored calculations as raw JSON
                              (default: false)
  -s, --server <key>          Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                              DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                              TEST-5, TEST-6, TEST-7, DEMO) or a full
                              https://<host>.datarails.com URL. Required.
  --account <email>           Datarails account email (required when multiple
                              identities are stored for the server)
  -h, --help                  display help for command

dr metrics calculations list

Usage: dr metrics calculations list [options] <id>

List a CALC metric's scenario calculations

Arguments:
  id                  CALC metric id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics calculations remove

Usage: dr metrics calculations remove [options] <id>

Remove the calculation bound to one scenario context (two-step confirm; the
plan prints the formula being removed)

Arguments:
  id                          CALC metric id (positive integer)

Options:
  --scenario <name>           Scenario name — free text, matched exactly
                              (default: "Actuals")
  --cycle <label>             Scenario cycle label — free text, matched exactly
                              (default: none)
  --planning-scenario <name>  Planning scenario name — free text, matched
                              exactly (default: none)
  --confirm-token <token>     Token from a prior plan run — required to
                              actually remove (default: "")
  -s, --server <key>          Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                              DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                              TEST-5, TEST-6, TEST-7, DEMO) or a full
                              https://<host>.datarails.com URL. Required.
  --account <email>           Datarails account email (required when multiple
                              identities are stored for the server)
  -h, --help                  display help for command

dr metrics categories

Usage: dr metrics categories [options] [command]

Operations on metric categories

Options:
  -h, --help             display help for command

Commands:
  list [options]         List metric categories on this tenant
  create [options]       Create a new metric category (server auto-assigns
                         color)
  get [options] <id>     Get a single metric category by ID
  update [options] <id>  Rename a metric category by ID (requires org-admin)
  delete [options] <id>  Delete a metric category by ID (two-step confirm;
                         requires org-admin)
  help [command]         display help for command

dr metrics categories create

Usage: dr metrics categories create [options]

Create a new metric category (server auto-assigns color)

Options:
  --name <s>          Category name (required)
  --json              Output the created category as raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics categories delete

Usage: dr metrics categories delete [options] <id>

Delete a metric category by ID (two-step confirm; requires org-admin)

Arguments:
  id                       category id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr metrics categories get

Usage: dr metrics categories get [options] <id>

Get a single metric category by ID

Arguments:
  id                  category id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics categories list

Usage: dr metrics categories list [options]

List metric categories on this tenant

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics categories update

Usage: dr metrics categories update [options] <id>

Rename a metric category by ID (requires org-admin)

Arguments:
  id                  category id (positive integer)

Options:
  --name <s>          New category name (required, must be unique within the
                      org)
  --json              Output the updated category as raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics create

Usage: dr metrics create [options] [command]

Create a metric (BASE, CALC or DRIVER)

Options:
  -h, --help        display help for command

Commands:
  base [options]    Create a BASE metric (table-derived)
  calc [options]    Create a CALC metric (formula-based)
  driver [options]  Create a DRIVER metric (entered values, no source table or
                    formula). Set its definition and values per scenario with
                    `dr metrics driver set` / `driver values set`.
  help [command]    display help for command

dr metrics create base

Usage: dr metrics create base [options]

Create a BASE metric (table-derived)

Options:
  --name <name>              Metric name (required)
  --template <id>            Template ID (required)
  --value-field <id>         Value field ID (required)
  --date-field <id>          Date field ID (required)
  --aggregator <kind>        Value-field aggregation: SUM, COUNT,
                             CUMULATIVE_SUM, CUMULATIVE_COUNT (default: SUM).
                             The CUMULATIVE_* variants accumulate across
                             periods (running total); they default
                             time-aggregation to EOP and cannot use
                             --time-aggregation SUM. (default: "SUM")
  --time-aggregation <kind>  Time-axis aggregation across the period (SUM | EOP
                             | AVG); when omitted the server defaults to SUM
                             (EOP for a cumulative aggregator). Use EOP for
                             end-of-period balance-sheet measures (e.g.
                             'Current Assets').
  --filter <kv>              Include filter "<field_id>=<v1>[,v2,...]"
                             (repeatable) (default: [])
  --exclude-filter <kv>      Exclude filter "<field_id>=<v1>[,v2,...]"
                             (repeatable) (default: [])
  --description <s>          Description
  --category <id>            Category ID
  --dimensions <ids>         Comma-separated Dimension PKs (NOT template field
                             IDs — list via 'dr metrics dimensions list')
  --json                     Output raw JSON instead of a table (default:
                             false)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr metrics create calc

Usage: dr metrics create calc [options]

Create a CALC metric (formula-based)

Options:
  --name <name>       Metric name (required)
  --formula <s>       Presented formula. Each referenced metric name MUST be
                      wrapped in square brackets, e.g. "[Revenue]-[COGS]" or
                      "[Revenue] / [Headcount]". Bare names like
                      "revenue/headcount" are rejected (the server's flattener
                      silently produces a broken metric). Reserved tokens are
                      the exception — write them bare: DAYS_IN_PERIOD (days in
                      the aggregation period, e.g. "[Revenue] /
                      DAYS_IN_PERIOD") and PERIODS_IN_YEAR (annualization
                      factor of the query window: 12 at month grain, 4 at
                      quarter, 1 at year; such metrics reject day-grain
                      queries). Time modifiers:
                      [M].SHIFT(year|quarter|month|day|consumption_period,
                      offset<=0) and [M].AS_OF(year_end|quarter_end|month_end);
                      the consumption_period unit steps by the query grain
                      instead of a fixed unit.
  --description <s>   Description
  --category <id>     Category ID
  --dimensions <ids>  Comma-separated Dimension PKs (NOT template field IDs —
                      list via 'dr metrics dimensions list')
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics create driver

Usage: dr metrics create driver [options]

Create a DRIVER metric (entered values, no source table or formula). Set its
definition and values per scenario with `dr metrics driver set` / `driver
values set`.

Options:
  --name <name>       Metric name (required)
  --description <s>   Description
  --category <id>     Category ID
  --dimensions <ids>  Comma-separated Dimension PKs (NOT template field IDs —
                      list via 'dr metrics dimensions list')
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics data

Usage: dr metrics data [options]

Compute KPI values (scenario + date range + optional filters)

Options:
  --id <n>                    Metric ID (repeatable, comma-separated also
                              accepted) (default: [])
  --scenario <name>           Scenario name; repeatable, or comma-separated
                              (e.g. Actuals,Budget) (default: "")
  --cycle <name>              Scenario cycle filter (server-side); repeatable
                              or comma-separated. A value that matches no cycle
                              returns zero rows; omit for the rolling scenario.
                              (default: "")
  --planning-scenario <name>  Planning scenario (free-text name, matched
                              exactly); repeatable or comma-separated. Omit for
                              none. (default: "")
  --from <date>               Date range start (YYYY-MM-DD) (default: "")
  --to <date>                 Date range end (YYYY-MM-DD) (default: "")
  --period <p>                Aggregation period: day|month|quarter|year
                              (default: "month")
  --agg <t>                   Aggregation type: DEFAULT|MTD|QTD|YTD|MTG|QTG|YTG
                              (the *TG "to go" variants accumulate forward from
                              the current period to the period end) (default:
                              "DEFAULT")
  --filter <spec>             Dimension filter "Name=V1,V2" (repeatable)
                              (default: [])
  --json                      Output raw JSON instead of a table (default:
                              false)
  -s, --server <key>          Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                              DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                              TEST-5, TEST-6, TEST-7, DEMO) or a full
                              https://<host>.datarails.com URL. Required.
  --account <email>           Datarails account email (required when multiple
                              identities are stored for the server)
  -h, --help                  display help for command

dr metrics delete

Usage: dr metrics delete [options] <ids...>

Delete one or more metrics by ID (two-step confirm). Passing multiple ids
deletes them as a single confirmed batch — one plan, one token.

Arguments:
  ids                      metric id(s) — one or more positive integers

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  --timeout <seconds>      Minimum whole-command budget in seconds. Default 30s
                           for one item; a batch gets 30s + 5s per call (capped
                           at 1800s). This is a floor, so it only ever widens
                           that budget; max 86400s
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr metrics dimensions

Usage: dr metrics dimensions [options] [command]

Operations on metric dimensions

Options:
  -h, --help              display help for command

Commands:
  list [options]          List metric dimensions on this tenant
  get [options] <id>      Get a single metric dimension
  create [options]        Create a metric dimension
  update [options] <id>   Update a metric dimension by ID (PUT — --mapping
                          replaces all field_mappings)
  delete [options] <id>   Delete a metric dimension by ID (two-step confirm)
  preview [options] <id>  Preview a dimension's unique values across its mapped
                          tables
  suggestions             AI-suggested dimensions — agent-generated; requires
                          the semantic_layer__ai_dimension_suggestions Unleash
                          flag and an org-admin user. `profile` is the
                          exception: read-only table/field profiling, no flag
                          needed
  help [command]          display help for command

dr metrics dimensions create

Usage: dr metrics dimensions create [options]

Create a metric dimension

Options:
  --name <s>               Dimension name (required; must be unique within the
                           org)
  --description <s>        Optional description
  --mapping <table:field>  Table-field mapping <TABLE_ID>:<FIELD_ID> (required;
                           repeat for multiple tables — one mapping per table)
                           (default: [])
  --json                   Output the created dimension as raw JSON instead of
                           a table (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr metrics dimensions delete

Usage: dr metrics dimensions delete [options] <id>

Delete a metric dimension by ID (two-step confirm)

Arguments:
  id                       dimension id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr metrics dimensions get

Usage: dr metrics dimensions get [options] <id>

Get a single metric dimension

Arguments:
  id                  dimension id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics dimensions list

Usage: dr metrics dimensions list [options]

List metric dimensions on this tenant

Options:
  --search <s>        Filter dimensions by name (case-insensitive contains)
  --template <id>     Filter to dimensions used on a template id
  --metric <id>       Filter to dimensions used by a metric id
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics dimensions preview

Usage: dr metrics dimensions preview [options] <id>

Preview a dimension's unique values across its mapped tables

Arguments:
  id                  dimension id (positive integer)

Options:
  --limit <n>         Cap on rows to show (default 50; --json bypasses)
                      (default: "50")
  --json              Output the raw unique-values response (uncapped)
                      (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics dimensions suggestions

Usage: dr metrics dimensions suggestions [options] [command]

AI-suggested dimensions — agent-generated; requires the
semantic_layer__ai_dimension_suggestions Unleash flag and an org-admin user.
`profile` is the exception: read-only table/field profiling, no flag needed

Options:
  -h, --help         display help for command

Commands:
  list [options]     List AI dimension suggestions and the latest
                     generation-run status (last_run)
  refresh [options]  Trigger the AI dimension-suggestion agent (202 = queued;
                     generation is debounced ~5 minutes server-side). 409 = a
                     run is already live — check `suggestions list` instead of
                     re-triggering
  profile [options]  Profile every table and field on this tenant and emit
                     scored candidate dimension groups (read-only; writes
                     nothing). One call replaces the per-field discovery loop
                     an agent would otherwise run
  help [command]     display help for command
dr metrics dimensions suggestions list
Usage: dr metrics dimensions suggestions list [options]

List AI dimension suggestions and the latest generation-run status (last_run)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command
dr metrics dimensions suggestions profile
Usage: dr metrics dimensions suggestions profile [options]

Profile every table and field on this tenant and emit scored candidate
dimension groups (read-only; writes nothing). One call replaces the per-field
discovery loop an agent would otherwise run

Options:
  --json                Output raw JSON instead of a summary table (default:
                        false)
  --concurrency <n>     Profile requests in flight (1-64, default 6)
  --tables <ids...>     Restrict to these table ids (comma- or
                        space-separated). Default: every table
  --max-values <n>      Cap distinct values echoed per field (default 120; 0 =
                        counts only)
  --out <file>          Write the JSON payload to a file instead of stdout
                        (owner-only, mode 0600)
  --suppression <file>  JSON file supplying {existing_dimensions, dismissed} —
                        either key wins over the API fetch, the other is still
                        fetched. Use when the caller already holds them and a
                        mid-run change would make two fetches disagree
  --timeout <seconds>   Wall-clock budget for the whole sweep (default 600)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command
dr metrics dimensions suggestions refresh
Usage: dr metrics dimensions suggestions refresh [options]

Trigger the AI dimension-suggestion agent (202 = queued; generation is
debounced ~5 minutes server-side). 409 = a run is already live — check
`suggestions list` instead of re-triggering

Options:
  --wait               Poll last_run until the run finishes; exits non-zero on
                       FAILED/timeout (default: false)
  --timeout <seconds>  Max seconds to poll with --wait (default 1200 — live
                       runs take 13-15 minutes: ~5-minute dispatch debounce
                       plus generation) (default: "1200")
  --json               Output raw JSON instead of text (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr metrics dimensions update

Usage: dr metrics dimensions update [options] <id>

Update a metric dimension by ID (PUT — --mapping replaces all field_mappings)

Arguments:
  id                       dimension id (positive integer)

Options:
  --name <s>               New dimension name (must be unique within the org)
  --description <s>        New description (pass an empty string to clear)
  --mapping <table:field>  Replace the dimension's field mappings with
                           TABLE_ID:FIELD_ID (repeatable; one mapping per
                           table). Sending --mapping replaces the ENTIRE
                           existing list. (default: [])
  --clear-mappings         Wipe all field_mappings (sends field_mappings: []).
                           Mutually exclusive with --mapping. (default: false)
  --json                   Output the updated dimension as raw JSON instead of
                           a table (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr metrics drilldown

Usage: dr metrics drilldown [options]

Drill down to source rows behind one or more KPIs

Options:
  --id <n>            Metric ID (repeatable, max 50; comma-separated also
                      accepted) (default: [])
  --from <date>       Date range start (YYYY-MM-DD) (default: "")
  --to <date>         Date range end (YYYY-MM-DD) (default: "")
  --filter <spec>     Dimension filter "Name=V1,V2" (repeatable) (default: [])
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics driver

Usage: dr metrics driver [options] [command]

Driver definition and values of a DRIVER metric, per scenario context
(--scenario / --cycle / --planning-scenario: free-text names, matched exactly)

Options:
  -h, --help             display help for command

Commands:
  get [options] <id>     Show the driver definition for one scenario context
  set [options] <id>     Create or update the driver definition for one
                         scenario context. Only the flags given are sent;
                         omitted fields keep their stored values.
  delete [options] <id>  Delete the driver for one scenario context, and all of
                         its values (two-step confirm)
  values                 The entered value grid of a driver, per scenario
                         context
  help [command]         display help for command

dr metrics driver delete

Usage: dr metrics driver delete [options] <id>

Delete the driver for one scenario context, and all of its values (two-step
confirm)

Arguments:
  id                          DRIVER metric id (positive integer)

Options:
  --scenario <name>           Scenario name — free text, matched exactly
                              (default: "Actuals")
  --cycle <label>             Scenario cycle label — free text, matched exactly
                              (default: none)
  --planning-scenario <name>  Planning scenario name — free text, matched
                              exactly (default: none)
  --confirm-token <token>     Token from a prior plan run — required to
                              actually delete (default: "")
  -s, --server <key>          Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                              DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                              TEST-5, TEST-6, TEST-7, DEMO) or a full
                              https://<host>.datarails.com URL. Required.
  --account <email>           Datarails account email (required when multiple
                              identities are stored for the server)
  -h, --help                  display help for command

dr metrics driver get

Usage: dr metrics driver get [options] <id>

Show the driver definition for one scenario context

Arguments:
  id                          DRIVER metric id (positive integer)

Options:
  --scenario <name>           Scenario name — free text, matched exactly
                              (default: "Actuals")
  --cycle <label>             Scenario cycle label — free text, matched exactly
                              (default: none)
  --planning-scenario <name>  Planning scenario name — free text, matched
                              exactly (default: none)
  --json                      Output raw JSON instead of a table (default:
                              false)
  -s, --server <key>          Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                              DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                              TEST-5, TEST-6, TEST-7, DEMO) or a full
                              https://<host>.datarails.com URL. Required.
  --account <email>           Datarails account email (required when multiple
                              identities are stored for the server)
  -h, --help                  display help for command

dr metrics driver set

Usage: dr metrics driver set [options] <id>

Create or update the driver definition for one scenario context. Only the flags
given are sent; omitted fields keep their stored values.

Arguments:
  id                              DRIVER metric id (positive integer)

Options:
  --scenario <name>               Scenario name — free text, matched exactly
                                  (default: "Actuals")
  --cycle <label>                 Scenario cycle label — free text, matched
                                  exactly (default: none)
  --planning-scenario <name>      Planning scenario name — free text, matched
                                  exactly (default: none)
  --unit <s>                      Display unit; "" clears it
  --additive                      Values add up across members and periods
  --non-additive                  Values do not add up (rates, prices,
                                  headcount averages)
  --baseline <n|null>             Baseline value used where no cell is entered;
                                  "null" clears it
  --min <n|null>                  Lowest allowed value; "null" clears it
  --max <n|null>                  Highest allowed value; "null" clears it
  --grain-dimension <dimId|null>  Dimension PK the value grid is keyed by;
                                  "null" clears it. Refused while values exist.
  --json                          Output raw JSON instead of a table (default:
                                  false)
  -s, --server <key>              Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                                  DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                                  TEST-5, TEST-6, TEST-7, DEMO) or a full
                                  https://<host>.datarails.com URL. Required.
  --account <email>               Datarails account email (required when
                                  multiple identities are stored for the
                                  server)
  -h, --help                      display help for command

dr metrics driver values

Usage: dr metrics driver values [options] [command]

The entered value grid of a driver, per scenario context

Options:
  -h, --help          display help for command

Commands:
  get [options] <id>  Show the value grid (MEMBER, PERIOD, VALUE) for one
                      scenario context
  set [options] <id>  REPLACE the whole value grid for one scenario context
                      from a file — cells not in the file are deleted. The
                      driver must exist for that context (`driver set` first).
  help [command]      display help for command
dr metrics driver values get
Usage: dr metrics driver values get [options] <id>

Show the value grid (MEMBER, PERIOD, VALUE) for one scenario context

Arguments:
  id                          DRIVER metric id (positive integer)

Options:
  --scenario <name>           Scenario name — free text, matched exactly
                              (default: "Actuals")
  --cycle <label>             Scenario cycle label — free text, matched exactly
                              (default: none)
  --planning-scenario <name>  Planning scenario name — free text, matched
                              exactly (default: none)
  --json                      Output raw JSON instead of a table (default:
                              false)
  -s, --server <key>          Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                              DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                              TEST-5, TEST-6, TEST-7, DEMO) or a full
                              https://<host>.datarails.com URL. Required.
  --account <email>           Datarails account email (required when multiple
                              identities are stored for the server)
  -h, --help                  display help for command
dr metrics driver values set
Usage: dr metrics driver values set [options] <id>

REPLACE the whole value grid for one scenario context from a file — cells not
in the file are deleted. The driver must exist for that context (`driver set`
first).

Arguments:
  id                          DRIVER metric id (positive integer)

Options:
  --scenario <name>           Scenario name — free text, matched exactly
                              (default: "Actuals")
  --cycle <label>             Scenario cycle label — free text, matched exactly
                              (default: none)
  --planning-scenario <name>  Planning scenario name — free text, matched
                              exactly (default: none)
  --file <path>               A .csv with header member,period,value (period
                              YYYY-MM or YYYY-MM-01, empty = the member's
                              default; value empty = null; member empty when
                              the driver has no grain), or a .json holding
                              {"values": [...]} or a bare array of {member,
                              period, value}. Max 20000 cells; duplicate
                              (member, period) cells are rejected.
  --json                      Output the stored grid as raw JSON (default:
                              false)
  -s, --server <key>          Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                              DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                              TEST-5, TEST-6, TEST-7, DEMO) or a full
                              https://<host>.datarails.com URL. Required.
  --account <email>           Datarails account email (required when multiple
                              identities are stored for the server)
  -h, --help                  display help for command

dr metrics get

Usage: dr metrics get [options] <metric_id>

Get a single metric definition (raw internal shape)

Arguments:
  metric_id           metric id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics list

Usage: dr metrics list [options]

List KPIs on this tenant (default: semantic/rich view)

Options:
  --raw               Use the raw metrics list instead of the semantic view
                      (default: false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics migrate

Usage: dr metrics migrate [options]

Run the org-wide metrics + dimensions migration: backfill metric
category/time-aggregation/source tables and convert V1 KPI dimension fields to
V2 dimensions. Org-admin only. --dry-run previews the full summary with every
write rolled back; the live run requires the two-step confirm.

Options:
  --dry-run                Compute the full migration summary but roll back
                           every write — free preview, runs immediately without
                           confirm (default: false)
  --confirm-token <token>  Token from a prior live plan run — required to
                           actually execute the migration (default: "")
  --json                   Output the raw 200 response as JSON (includes
                           per-metric/per-KPI details) (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr metrics re-aggregate

Usage: dr metrics re-aggregate [options] [ids...]

Trigger semantic-layer re-aggregation (rebuild pre-aggregated metric values).
Pass metric ids for a targeted refresh, or --all for an org-wide rebuild
(two-step confirm). Returns 202 = queued in the background, not finished.

Arguments:
  ids                      metric ids to re-aggregate (positive integers, max
                           100; enumerate via 'dr metrics list')

Options:
  --all                    Rebuild every table in the org instead of specific
                           metrics. Heavy: queues one background job per table;
                           requires the two-step confirm. (default: false)
  --confirm-token <token>  Token from a prior --all plan run — required to
                           actually trigger the org-wide rebuild (default: "")
  --wait                   After queuing, poll until re-aggregation of the
                           given ids reaches a terminal state
                           (succeeded/failed), then print a summary. Targeted
                           ids only — not supported with --all. Exits non-zero
                           if any metric fails or the wait times out. (default:
                           false)
  --timeout <seconds>      Max seconds to wait when --wait is set (positive
                           integer, max 86400; default 300) (default: "300")
  --json                   Output the raw 202 response as JSON (with --wait,
                           one final wait-summary object) (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr metrics suggestions

Usage: dr metrics suggestions [options] [command]

AI-suggested metrics — agent-generated; requires the
semantic_layer__ai_metric_suggestions Unleash flag and an org-admin user.
`profile` is the exception: read-only table/field profiling, no flag needed

Options:
  -h, --help         display help for command

Commands:
  list [options]     List AI metric suggestions and the latest generation-run
                     status (last_run)
  refresh [options]  Trigger the AI metric-suggestion agent (202 = queued;
                     generation is debounced ~5 minutes server-side). 409 = a
                     run is already live — check `suggestions list` instead of
                     re-triggering
  profile [options]  Profile every table on this tenant and emit the facts a
                     metric needs — reporting axis, row grain, candidate
                     measures, and the metrics already defined (read-only;
                     writes nothing). One call replaces the per-field discovery
                     loop an agent would otherwise run
  help [command]     display help for command

dr metrics suggestions list

Usage: dr metrics suggestions list [options]

List AI metric suggestions and the latest generation-run status (last_run)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr metrics suggestions profile

Usage: dr metrics suggestions profile [options]

Profile every table on this tenant and emit the facts a metric needs —
reporting axis, row grain, candidate measures, and the metrics already defined
(read-only; writes nothing). One call replaces the per-field discovery loop an
agent would otherwise run

Options:
  --json               Output raw JSON instead of a summary table (default:
                       false)
  --concurrency <n>    Requests in flight (1-64, default 6)
  --tables <ids...>    Restrict to these table ids (comma- or space-separated).
                       Default: every table
  --sample-rows <n>    Rows per sample window (1-1000, default 200)
  --windows <n>        Sample windows per table (1-10, default 3). Rows come
                       back in storage order, so one window is the head of the
                       table, not a sample of it; extra windows are what make
                       disagreement visible
  --max-values <n>     Cap sample values echoed per categorical (default 120; 0
                       = counts only)
  --out <file>         Write the JSON payload to a file instead of stdout
                       (owner-only, mode 0600)
  --timeout <seconds>  Wall-clock budget for the whole sweep (default 600)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr metrics suggestions refresh

Usage: dr metrics suggestions refresh [options]

Trigger the AI metric-suggestion agent (202 = queued; generation is debounced
~5 minutes server-side). 409 = a run is already live — check `suggestions list`
instead of re-triggering

Options:
  --wait               Poll last_run until the run finishes; exits non-zero on
                       FAILED/timeout (default: false)
  --timeout <seconds>  Max seconds to poll with --wait (default 1200 — live
                       runs take 13-15 minutes: ~5-minute dispatch debounce
                       plus generation) (default: "1200")
  --json               Output raw JSON instead of text (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr metrics update

Usage: dr metrics update [options] <id>

Update a metric in place (partial PATCH). Pass at least one of the optional
flags below; unspecified fields are left as-is.

Arguments:
  id                         metric id (positive integer)

Options:
  --name <s>                 New metric name
  --description <s>          New description (pass an empty string to clear —
                             sent as null so a get→update→get round-trip is
                             byte-stable; gap finding n3)
  --category <id>            New category ID, or "null" to clear
  --dimensions <ids>         Comma-separated Dimension PKs replacing the
                             current set; empty string clears (NOT template
                             field IDs — list via 'dr metrics dimensions list')
  --time-aggregation <kind>  New time-aggregation: SUM | EOP | AVG
                             (case-insensitive). Only meaningful on BASE; CALC
                             ignores at rollup — gap #27.
  --aggregator <kind>        New value-field aggregation: SUM | COUNT |
                             CUMULATIVE_SUM | CUMULATIVE_COUNT (BASE only —
                             server ignores on CALC). CUMULATIVE_* cannot use
                             --time-aggregation SUM.
  --template <id>            Re-point the metric to a different template
                             (table). Server requires
                             --value-field/--date-field IDs that exist on the
                             new template — typically pass them together. Also
                             scopes --dimensions PK validation.
  --value-field <id>         New value-field ID
  --date-field <id>          New date-field ID
  --template-scope <id>      Template id used ONLY to scope --dimensions PK
                             validation. Use this when validating dimensions
                             against a specific template without re-pointing
                             the metric. Implied automatically when --template
                             is set.
  --filter <kv>              Include filter "<field_id>=<v1>[,v2,...]" —
                             replaces the existing filter list (repeatable;
                             pair with --exclude-filter) (default: [])
  --exclude-filter <kv>      Exclude filter "<field_id>=<v1>[,v2,...]" —
                             replaces the existing filter list (repeatable;
                             pair with --filter) (default: [])
  --clear-filters            Clear all filters on the metric (sends `filters:
                             []`) (default: false)
  --hide                     Set is_hidden=true
  --unhide                   Set is_hidden=false
  --json                     Output the raw updated metric as JSON (default:
                             false)
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr metrics what-if

Usage: dr metrics what-if [options]

Evaluate a formula with driver values overridden for this call only (nothing is
saved). Window: the 3 months ending at --reference-month. Prints the result,
then each overridden driver's contribution.

Options:
  --formula <s>                Formula in the `metrics create calc` syntax,
                               e.g. "[Headcount] * [Avg Salary]"
  --driver-file <path>         JSON object keyed by driver metric name:
                               {"Headcount": {"baseline_value": 12, "values":
                               [{"member": "", "period": "2026-01-01", "value":
                               15}]}}
  --driver <Name=baseline>     Override a driver's baseline, e.g.
                               "Headcount=15" ("null" clears it); repeatable,
                               wins over --driver-file. At most 20 drivers.
                               (default: [])
  --reference-month <YYYY-MM>  Latest month of the window (default: current
                               month)
  --time-aggregation <kind>    SUM | AVG | EOP (server default: SUM)
  --dimension <dimName>        Break the result down by this dimension (display
                               name); repeatable (default: [])
  --json                       Output the raw response as JSON (default: false)
  -s, --server <key>           Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                               DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                               TEST-5, TEST-6, TEST-7, DEMO) or a full
                               https://<host>.datarails.com URL. Required.
  --account <email>            Datarails account email (required when multiple
                               identities are stored for the server)
  -h, --help                   display help for command

dr multi-product

Usage: dr multi-product [options] [command]

Multi-product service — product-content catalog + per-org assignment
(/api/multi-product/v1/...).

Options:
  -h, --help       display help for command

Commands:
  product-content  Inspect the global product-content catalog
  org-products     Read or replace an organization's assigned product contents
  help [command]   display help for command

dr multi-product org-products

Usage: dr multi-product org-products [options] [command]

Read or replace an organization's assigned product contents

Options:
  -h, --help               display help for command

Commands:
  list [options] <org_id>  List an organization's assigned product contents
                           (GET
                           /api/multi-product/v1/organizations/<org_id>/products)
  set [options] <org_id>   Replace an organization's product list (PUT
                           /api/multi-product/v1/organizations/<org_id>/products;
                           two-step confirm gate — replace semantics)
  help [command]           display help for command

dr multi-product org-products list

Usage: dr multi-product org-products list [options] <org_id>

List an organization's assigned product contents (GET
/api/multi-product/v1/organizations/<org_id>/products)

Arguments:
  org_id              organization id (positive integer)

Options:
  --json              Output raw JSON instead of a grouped summary (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr multi-product org-products set

Usage: dr multi-product org-products set [options] <org_id>

Replace an organization's product list (PUT
/api/multi-product/v1/organizations/<org_id>/products; two-step confirm gate —
replace semantics)

Arguments:
  org_id                   organization id (positive integer)

Options:
  --file <path>            Path to a JSON file containing the full new product
                           list (array of {type, items:[{id,name}]})
  --json                   Output raw JSON instead of a summary (default:
                           false)
  --db-only                Send ?db_only=true — write the catalog rows only and
                           SKIP the data-import workflow. Default (omitted)
                           runs the full add-product flow that triggers the
                           importer. Use --db-only only when you explicitly
                           want the product to appear in the MP DB without
                           ingesting data; omit it when you also want the data
                           import to run. (default: false)
  --confirm-token <token>  Token from the plan-phase output; required to
                           actually apply
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr multi-product product-content

Usage: dr multi-product product-content [options] [command]

Inspect the global product-content catalog

Options:
  -h, --help      display help for command

Commands:
  list [options]  List all available product contents (GET
                  /api/multi-product/v1/product_content/list)
  help [command]  display help for command

dr multi-product product-content list

Usage: dr multi-product product-content list [options]

List all available product contents (GET
/api/multi-product/v1/product_content/list)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr odata

Usage: dr odata [options] [command]

Read tables over OData V1 exactly as Excel / Power BI / SQLConnector receive
them (read-only)

Options:
  -h, --help                     display help for command

Commands:
  tables [options]               List the tables this user can read over OData,
                                 with their variants
  metadata [options] <table-id>  Columns and EDM types of a table, in $metadata
                                 order
  data [options] <table-id>      Read table rows over OData. Without
                                 --top/--all: one page of --page-size rows.
                                 --top N: at most N rows. --all: page until the
                                 table is exhausted. Rows stream as each page
                                 arrives.
  help [command]                 display help for command

dr odata data

Usage: dr odata data [options] <table-id>

Read table rows over OData. Without --top/--all: one page of --page-size rows.
--top N: at most N rows. --all: page until the table is exhausted. Rows stream
as each page arrives.

Arguments:
  table-id             table (template) id

Options:
  --variant <variant>  latest (default), cleared, full (all versions) or
                       full-cleared — the four collections OData clients see
  --key <base64>       Use this OData key verbatim instead of the one the
                       service document lists
  --top <n>            Return at most N rows
  --all                Page until the table is exhausted (default: false)
  --page-size <n>      Rows per request ($top) (default 30000)
  --select <columns>   Comma-separated OData column names (see `dr odata
                       metadata`)
  --filter <expr>      OData $filter expression, passed through to the server
  --csv                Output CSV (default: false)
  --json               Output a JSON array, streamed (default: false)
  --timeout <seconds>  Budget for each request in seconds (default 120)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr odata metadata

Usage: dr odata metadata [options] <table-id>

Columns and EDM types of a table, in $metadata order

Arguments:
  table-id             table (template) id

Options:
  --variant <variant>  latest (default), cleared, full (all versions) or
                       full-cleared — the four collections OData clients see
  --json               Output JSON (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr odata tables

Usage: dr odata tables [options]

List the tables this user can read over OData, with their variants

Options:
  --json              Output JSON, including each variant key (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr organizations

Usage: dr organizations|orgs [options] [command]

Inspect and create Datarails organizations (via /api/it/organizations)

Options:
  -h, --help                   display help for command

Commands:
  list [options]               List organizations visible to the authenticated
                               account
  push-targets [options]       List organizations this account may push a
                               dashboard or filebox into (destinations accepted
                               by `dr dashboards push` / `dr filebox push`)
  get [options] <org_id>       Get one organization by id (filtered from
                               /api/it/organizations — no per-id endpoint
                               exposed)
  add [options]                Create a new organization (tenant). Server
                               returns 403 if the active session lacks the
                               right permission; surface the message verbatim
                               and re-impersonate as needed.
  contacts [options]           List the active org's user contacts (per-tenant
                               directory; the FE source for the share-with-user
                               picker)
  permission-groups [options]  List the active org's permission groups (named
                               user bundles with a shared role)
  create-group [options]       Create a permission group (POST
                               /api/it/permission_groups). Dry-run unless
                               --confirm. Requires an org-admin /
                               supporting-manager / contributor operator; the
                               server 403s if --org is not one of your
                               accessible tenants.
  update-group [options] <id>  Rename a permission group (PUT
                               /api/it/permission_groups/<id>). Only the name
                               is editable — role is immutable and members have
                               their own flow. Dry-run unless --confirm. The
                               server 403s a rename of a default/system group.
  delete-group [options] <id>  Delete a permission group (two-step confirm).
                               Removes the group and its access to shared
                               assets; members remain in Datarails.
  bulk-groups [options]        Provision permission groups and membership from
                               a CSV (header: group_name,role,members). Creates
                               missing groups and adds members additively to
                               existing ones. Dry-run unless --confirm; --json
                               on both paths.
  export                       Export a full organization to the shared blob
                               store (for org migration/duplication). Requires
                               a datarails.com admin/support-manager identity.
  import                       Import an exported organization from the shared
                               blob store. Requires a datarails.com
                               admin/support-manager identity.
  help [command]               display help for command

dr organizations add

Usage: dr organizations add [options]

Create a new organization (tenant). Server returns 403 if the active session
lacks the right permission; surface the message verbatim and re-impersonate as
needed.

Options:
  --domain <d>              Organization domain (required unless
                            --payload-file)
  --name <n>                Display name (defaults to --domain)
  --license-type <l>        License type (server default: Enterprise)
  --category <c>            Category e.g. production, demo (server default:
                            production)
  --account-id <id>         Account id to attach the new org to. Defaults to
                            the caller's parent-org account_id server-side;
                            pass this to keep a cloned tenant on the source
                            org's account.
  --from-template <org_id>  Source organization id to clone from. The source
                            must have use_as_template=true on the BE; otherwise
                            the server returns 400 "Wrong
                            from_organization_template". Clone runs
                            asynchronously after the POST returns.
  --use-as-template         Mark the new organization as a template
                            (use_as_template=true). Default false. (default:
                            false)
  --include-input-versions  When cloning from a template, also clone input file
                            versions. Requires --from-template. (default:
                            false)
  --payload-file <path>     Path to a full JSON body — overrides
                            --domain/--name/etc. (also overrides
                            --from-template / --use-as-template /
                            --include-input-versions; the operator owns the
                            body shape).
  --json                    Output the raw server JSON response instead of a
                            summary (default: false)
  -s, --server <key>        Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                            DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                            TEST-5, TEST-6, TEST-7, DEMO) or a full
                            https://<host>.datarails.com URL. Required.
  --account <email>         Datarails account email (required when multiple
                            identities are stored for the server)
  -h, --help                display help for command

dr organizations bulk-groups

Usage: dr organizations bulk-groups [options]

Provision permission groups and membership from a CSV (header:
group_name,role,members). Creates missing groups and adds members additively to
existing ones. Dry-run unless --confirm; --json on both paths.

Options:
  --file <csv>         CSV file to apply
  --organization <id>  Target org id for created groups (else derived from the
                       tenant's groups)
  --confirm            Actually apply (without it, dry-run only) (default:
                       false)
  --json               Output structured JSON instead of text (default: false)
  --timeout <seconds>  Minimum whole-command budget in seconds. Default 30s for
                       one item; a batch gets 30s + 5s per call (capped at
                       1800s). This is a floor, so it only ever widens that
                       budget; max 86400s
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr organizations contacts

Usage: dr organizations contacts [options]

List the active org's user contacts (per-tenant directory; the FE source for
the share-with-user picker)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr organizations create-group

Usage: dr organizations create-group [options]

Create a permission group (POST /api/it/permission_groups). Dry-run unless
--confirm. Requires an org-admin / supporting-manager / contributor operator;
the server 403s if --org is not one of your accessible tenants.

Options:
  --org <id>          Target organization id (sent in the body; must be one of
                      your accessible orgs)
  --name <n>          Group name (unique per organization)
  --role <r>          Role enum name shared by the group (VIEWER | CONTRIBUTOR
                      | ADMIN); case-insensitive
  --member <email>    Initial member email (repeatable). Each must be
                      accessible to you, in the target org, and not outrank
                      --role. (default: [])
  --confirm           Actually create (without it, dry-run only) (default:
                      false)
  --json              Output structured JSON instead of text (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr organizations delete-group

Usage: dr organizations delete-group [options] <id>

Delete a permission group (two-step confirm). Removes the group and its access
to shared assets; members remain in Datarails.

Arguments:
  id                       permission group id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr organizations export

Usage: dr organizations export [options] [command]

Export a full organization to the shared blob store (for org
migration/duplication). Requires a datarails.com admin/support-manager
identity.

Options:
  -h, --help        display help for command

Commands:
  create [options]  Queue a full-org export (POST /api/organizations/export).
                    Returns immediately; completion is signaled by EMAIL to you
                    — there is no status API to poll. Requires a datarails.com
                    admin/support-manager identity on this server.
  delete [options]  Delete an export's artifacts — server-side record + blob
                    folder (two-step confirm). Org data is NOT touched. Use
                    before re-exporting, or as cleanup after a finished
                    migration.
  help [command]    display help for command

dr organizations export create

Usage: dr organizations export create [options]

Queue a full-org export (POST /api/organizations/export). Returns immediately;
completion is signaled by EMAIL to you — there is no status API to poll.
Requires a datarails.com admin/support-manager identity on this server.

Options:
  --domain <d>            Source organization domain to export
  --new-domain <d>        Rewrite the export to this destination domain (also
                          becomes the new org name and the blob folder name the
                          import reads)
  --keep-user-passwords   Preserve source-org user logins in the copy (a REAL
                          migration needs this). Without it, a renamed export
                          randomizes EVERY user password in the imported org —
                          a fresh secret per org, recorded nowhere; access the
                          copy via impersonation. (default: false)
  --allow-foreign-server  Allow cross-server use of the export. REQUIRED when
                          exporting from any non-US server. (default: false)
  --exported-before       Resume/redo an export that already has a server-side
                          record (without this, a repeat export is rejected)
                          (default: false)
  --json                  Output the (password-redacted) server echo as JSON
                          (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  -h, --help              display help for command

dr organizations export delete

Usage: dr organizations export delete [options]

Delete an export's artifacts — server-side record + blob folder (two-step
confirm). Org data is NOT touched. Use before re-exporting, or as cleanup after
a finished migration.

Options:
  --domain <d>             Source organization domain of the export
  --new-domain <d>         The destination domain the export was created with
                           (names the blob folder to delete)
  --allow-foreign-server   Also allow deleting a blob created by another server
                           env (default: false)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr organizations get

Usage: dr organizations get [options] <org_id>

Get one organization by id (filtered from /api/it/organizations — no per-id
endpoint exposed)

Arguments:
  org_id              organization id (positive integer)

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr organizations import

Usage: dr organizations import [options] [command]

Import an exported organization from the shared blob store. Requires a
datarails.com admin/support-manager identity.

Options:
  -h, --help             display help for command

Commands:
  run [options]          Queue an org import from an export blob (POST
                         /api/organizations/import). Returns immediately;
                         completion is signaled by EMAIL to you — there is no
                         status API to poll. The org row appears right away but
                         is NOT usable until the email arrives.
  delete-orgs [options]  PERMANENTLY delete an imported organization — the full
                         org-delete flow, ALL tenant data destroyed (two-step
                         confirm; prod runs also require the interactive word
                         gate). Only orgs created via the import API are
                         accepted.
  help [command]         display help for command

dr organizations import delete-orgs

Usage: dr organizations import delete-orgs [options]

PERMANENTLY delete an imported organization — the full org-delete flow, ALL
tenant data destroyed (two-step confirm; prod runs also require the interactive
word gate). Only orgs created via the import API are accepted.

Options:
  --domain <d>             Imported organization domain to delete
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr organizations import run

Usage: dr organizations import run [options]

Queue an org import from an export blob (POST /api/organizations/import).
Returns immediately; completion is signaled by EMAIL to you — there is no
status API to poll. The org row appears right away but is NOT usable until the
email arrives.

Options:
  --domain <d>        The domain chosen at export time via --new-domain (it
                      names the blob folder the import reads; the source domain
                      when exported without a rename)
  --temporary         Import as a TEMPORARY org, marked for auto-deletion by
                      the server GC. Default is a real, permanent import.
                      (default: false)
  --no-skip-models    Fail the import when the blob carries model types this
                      server cannot import. By default they are skipped
                      (typical version skew between servers; the completion
                      email lists anything skipped).
  --imported-before   Resume/redo an import this API already ran for the same
                      domain (default: false)
  --json              Output the raw server acknowledgment as JSON (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr organizations list

Usage: dr organizations list [options]

List organizations visible to the authenticated account

Options:
  --mini              Use the lightweight /mini endpoint (id + name only; much
                      faster for large tenants) (default: false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr organizations permission-groups

Usage: dr organizations permission-groups [options]

List the active org's permission groups (named user bundles with a shared role)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr organizations push-targets

Usage: dr organizations push-targets [options]

List organizations this account may push a dashboard or filebox into
(destinations accepted by `dr dashboards push` / `dr filebox push`)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr organizations update-group

Usage: dr organizations update-group [options] <id>

Rename a permission group (PUT /api/it/permission_groups/<id>). Only the name
is editable — role is immutable and members have their own flow. Dry-run unless
--confirm. The server 403s a rename of a default/system group.

Arguments:
  id                  permission group id (positive integer)

Options:
  --name <n>          New group name (unique per organization)
  --confirm           Actually rename (without it, dry-run only) (default:
                      false)
  --json              Output structured JSON instead of text (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr palettes

Usage: dr palettes [options] [command]

Operations on Datarails widget color palettes (per-org)

Options:
  -h, --help          display help for command

Commands:
  list [options]      List the caller's org palettes (server default ordering)
  get [options] <id>  Fetch a single palette by id (list + client-side filter)
  create [options]    Create a palette from a JSON file (IT admin; POST
                      /api/it/organizations/<org>/palettes)
  help [command]      display help for command

dr palettes create

Usage: dr palettes create [options]

Create a palette from a JSON file (IT admin; POST
/api/it/organizations/<org>/palettes)

Options:
  --file <path>        JSON: {colors:[10 hex/rgba], name?, variance_color?,
                       is_default?}. Round-tripping `dr palettes get --json`
                       output is supported — extra fields (id, organization)
                       are ignored.
  --organization <id>  Target organization id (positive integer). Required —
                       the IT admin endpoint keys on the URL PK, not the caller
                       session org.
  --json               Output raw JSON instead of a table (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr palettes get

Usage: dr palettes get [options] <id>

Fetch a single palette by id (list + client-side filter)

Arguments:
  id                  palette id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr palettes list

Usage: dr palettes list [options]

List the caller's org palettes (server default ordering)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reconciliation

Usage: dr reconciliation|recon [options] [command]

Reconciliation (MEC) — read-only commands

Options:
  -h, --help      display help for command

Commands:
  accounts        Reconciliation accounts
  processes       Reconciliation processes
  evidences       Reconciliation evidences (v1 + v2 supporting items)
  filebox         Reconciliation filebox connections + sync state
  audit           Reconciliation audit-export jobs
  help [command]  display help for command

dr reconciliation accounts

Usage: dr reconciliation accounts [options] [command]

Reconciliation accounts

Options:
  -h, --help                               display help for command

Commands:
  list [options]                           Accounts with members and amounts for a date
  entities [options]                       List entities that have reconciliation accounts
  entity-currencies [options]              List entity → currency mappings (with org default currency)
  info [options]                           Per-account metadata for a date (id, name, group, entity)
  progress [options]                       Reconciliation progress summary (tasks + amounts)
  settings [options]                       Per-account settings (frequency, thresholds)
  update-settings [options]                Update reconciliation account settings (PATCH /accounts/settings, admin-only)
  set-assignee [options] [account_uuid]    Set the Preparer or Reviewer on an account, or on many from a CSV (PATCH /accounts/members)
  clear-assignee [options] [account_uuid]  Clear the Preparer or Reviewer slot of one account, or many with --file
  set-due-date [options] <account_uuid>    Set or clear the Preparer/Reviewer due-date on an account (PATCH /accounts/members)
  sign [options] <account_uuid>            Sign off (or with --revoke, un-sign) on an account as Preparer or Reviewer (PATCH /accounts/<a>/members/<m>/sign)
  help [command]                           display help for command

dr reconciliation accounts clear-assignee

Usage: dr reconciliation accounts clear-assignee [options] [account_uuid]

Clear the Preparer or Reviewer slot (sets user_id=0 + Unassigned name/email; preserves due_date, resets sign-off)

Bulk form — one plan and one token for many slots:
  dr reconciliation accounts clear-assignee --file slots.csv --date 2025-04-30
  # CSV header: account_id,type — one row per (account, role)

Arguments:
  account_uuid             account uuid; omit with --file

Options:
  --date <YYYY-MM-DD>      Reporting date
  --type <s>               Preparer | Reviewer (case-sensitive); required
                           without --file
  --file <path>            CSV of slots to clear (header account_id,type); one
                           plan + one token for the whole file
  --json                   Output the cleared member record(s) as JSON instead
                           of a confirmation (default: false)
  --timeout <seconds>      With --file: Minimum whole-command budget in
                           seconds. Default 30s for one item; a batch gets 30s
                           + 5s per call (capped at 1800s). This is a floor, so
                           it only ever widens that budget; max 86400s
  --confirm-token <token>  Token from a prior plan run — required to actually
                           clear (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr reconciliation accounts entities

Usage: dr reconciliation accounts entities [options]

List entities that have reconciliation accounts

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reconciliation accounts entity-currencies

Usage: dr reconciliation accounts entity-currencies [options]

List entity → currency mappings (with org default currency)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reconciliation accounts info

Usage: dr reconciliation accounts info [options]

Per-account metadata for a date (id, name, group, entity)

Options:
  --date <YYYY-MM-DD>  Reporting date (required)
  --json               Output raw JSON instead of a table (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr reconciliation accounts list

Usage: dr reconciliation accounts list [options]

Accounts with members and amounts for a date

Options:
  --date <YYYY-MM-DD>  Reporting date (required)
  --entity <e>         Filter by entity (repeatable) (default: [])
  --json               Output raw JSON instead of a table (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr reconciliation accounts progress

Usage: dr reconciliation accounts progress [options]

Reconciliation progress summary (tasks + amounts)

Options:
  --date <YYYY-MM-DD>  Reporting date (required)
  --entity <e>         Filter by entity (single value, optional) (default: "")
  --json               Output raw JSON instead of a table (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr reconciliation accounts set-assignee

Usage: dr reconciliation accounts set-assignee [options] [account_uuid]

Set the Preparer or Reviewer on an account (PATCH /accounts/members; resets prior sign-off for the role).

Single account:
  dr reconciliation accounts set-assignee <account_uuid> --date 2025-04-30 --type Preparer --user-id 85827

Many accounts — one CSV row per (account, role), one plan and one confirm token for the file:
  dr reconciliation accounts set-assignee --file assignees.csv --date 2025-04-30

CSV header: account_id,type,user_id[,user_name,user_email]. Blank name/email cells are
fetched via /api/it/users/<id> (IT-only). Rows whose slot already holds that user are
skipped, so re-running the same file after a failure plans only what did not land.

Arguments:
  account_uuid             account uuid (from `dr reconciliation accounts
                           list`); omit with --file

Options:
  --date <YYYY-MM-DD>      Reporting date — used to fetch the account's current
                           members for the read-modify-write
  --type <s>               Preparer | Reviewer (case-sensitive); required
                           without --file
  --user-id <n>            Numeric user id (PK); required without --file
  --user-name <s>          User display name; if omitted, fetched via
                           /api/it/users/<id> (IT-only)
  --user-email <s>         User email; if omitted, fetched via
                           /api/it/users/<id> (IT-only)
  --file <path>            CSV of assignments
                           (account_id,type,user_id[,user_name,user_email])
                           instead of one account
  --json                   Output the patched member record(s) as JSON instead
                           of a confirmation (default: false)
  --timeout <seconds>      With --file: Minimum whole-command budget in
                           seconds. Default 30s for one item; a batch gets 30s
                           + 5s per call (capped at 1800s). This is a floor, so
                           it only ever widens that budget; max 86400s
  --confirm-token <token>  Token from a prior plan run — required to actually
                           update (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr reconciliation accounts set-due-date

Usage: dr reconciliation accounts set-due-date [options] <account_uuid>

Set or clear the Preparer/Reviewer due-date on an account (PATCH
/accounts/members)

Arguments:
  account_uuid             account uuid

Options:
  --date <YYYY-MM-DD>      Reporting date
  --type <s>               Preparer | Reviewer (case-sensitive)
  --due-date <YYYY-MM-DD>  New due date (midnight UTC of the specified day)
  --epoch <n>              New due date as Unix-seconds epoch (escape hatch
                           when an exact server-stored value is needed)
  --clear                  Clear the due-date (sends due_date: null) (default:
                           false)
  --json                   Output the patched member record as JSON (default:
                           false)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           update (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr reconciliation accounts settings

Usage: dr reconciliation accounts settings [options]

Per-account settings (frequency, thresholds)

Options:
  --entity <e>        Filter by entity (single value, optional) (default: "")
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reconciliation accounts sign

Usage: dr reconciliation accounts sign [options] <account_uuid>

Sign off (or with --revoke, un-sign) on an account as Preparer or Reviewer
(PATCH /accounts/<a>/members/<m>/sign)

Arguments:
  account_uuid             account uuid

Options:
  --date <YYYY-MM-DD>      Reporting date
  --type <s>               Preparer | Reviewer (case-sensitive)
  --revoke                 Revoke a prior sign-off instead of signing (sends
                           is_sign_off: false) (default: false)
  --json                   Output a JSON record of the operation (default:
                           false)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           sign/revoke (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr reconciliation accounts update-settings

Usage: dr reconciliation accounts update-settings [options]

Update reconciliation account settings (PATCH /accounts/settings, admin-only).

Round-trip workflow:
  dr reconciliation accounts settings --json > settings.json
  # edit settings.json
  dr reconciliation accounts update-settings --file settings.json

Note: if `dr ... settings --json` returns rows with null entity or
account_group, fill those in manually before re-uploading; the parser
rejects null/missing for those fields.

Options:
  --file <path>            JSON file with the array of settings (output of `dr
                           reconciliation accounts settings --json`)
  --timeout <seconds>      Minimum whole-command budget in seconds. Default 30s
                           for one item; a batch gets 30s + 5s per call (capped
                           at 1800s). This is a floor, so it only ever widens
                           that budget; max 86400s
  --confirm-token <token>  Token from a prior plan run — required to actually
                           update (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr reconciliation audit

Usage: dr reconciliation audit [options] [command]

Reconciliation audit-export jobs

Options:
  -h, --help                 display help for command

Commands:
  status [options] <job_id>  Poll an audit-export job by id
  help [command]             display help for command

dr reconciliation audit status

Usage: dr reconciliation audit status [options] <job_id>

Poll an audit-export job by id

Arguments:
  job_id              Audit-export job id (any non-empty string)

Options:
  --json              Output raw JSON instead of a key:value block (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reconciliation evidences

Usage: dr reconciliation evidences [options] [command]

Reconciliation evidences (v1 + v2 supporting items)

Options:
  -h, --help                    display help for command

Commands:
  list [options]                [DEPRECATED — v1 surface] Evidences attached to
                                one account on a process. The v1 per-account
                                lookup is being phased out in favour of
                                `evidences supporting` (v2, scoped by process).
                                Will print a stderr deprecation warning on
                                invocation; still functional for backward
                                compat.
  get [options] <evidence_id>   Fetch a single evidence by id
  process [options]             All evidences across a process (optionally
                                filtered by type). Pass --process <uuid> OR
                                (--entity + --date) — the CLI resolves the UUID
                                from the natural keys when --process is
                                omitted.
  supporting [options]          Supporting items (v2) on a process. Pass
                                --process <uuid> OR (--entity + --date) — the
                                natural-key form resolves the process UUID and
                                ALSO filters the response to that same entity
                                in one step.
  file [options] <evidence_id>  Download an evidence file to --output. Pass
                                --process <uuid> OR (--entity + --date). Do NOT
                                pass --account-uuid (the v2 path);
                                --account-uuid is deprecated and prints a
                                stderr warning when used.
  create [options]              Upload a file as a v2 supporting item and
                                attach it to one or more accounts with amounts.
                                Pass --process <uuid> OR (--entity + --date).
  help [command]                display help for command

dr reconciliation evidences create

Usage: dr reconciliation evidences create [options]

Upload a file as a v2 supporting item and attach it to one or more accounts
with amounts. Pass --process <uuid> OR (--entity + --date).

Options:
  --file <path>                Filesystem path to the file to upload
  --name <s>                   Display name (defaults to the file basename)
  --account-uuid <uuid>        Bank-account UUID to attach to (repeatable; pair
                               with --amount in the same order). Distinct from
                               the auth `--account <email>` selector. (default:
                               [])
  --amount <n>                 Amount on the matching --account-uuid
                               (repeatable; same length as --account-uuid)
                               (default: [])
  --note <s>                   Optional note on the matching --account-uuid
                               (repeatable; same length as --account-uuid; pass
                               empty string to skip a slot) (default: [])
  --process <uuid>             Process UUID
  --entity <name>              Entity name (with --date) — alternative to
                               --process
  --date <YYYY-MM-DD|YYYY-MM>  Reporting date (with --entity) — alternative to
                               --process
  --json                       Output the created EvidenceResponseV2 as raw
                               JSON (default: false)
  -s, --server <key>           Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                               DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                               TEST-5, TEST-6, TEST-7, DEMO) or a full
                               https://<host>.datarails.com URL. Required.
  --account <email>            Datarails account email (required when multiple
                               identities are stored for the server)
  -h, --help                   display help for command

dr reconciliation evidences file

Usage: dr reconciliation evidences file [options] <evidence_id>

Download an evidence file to --output. Pass --process <uuid> OR (--entity +
--date). Do NOT pass --account-uuid (the v2 path); --account-uuid is deprecated
and prints a stderr warning when used.

Arguments:
  evidence_id                  Evidence UUID

Options:
  --process <uuid>             Process UUID
  --entity <name>              Entity name (with --date) — alternative to
                               --process
  --date <YYYY-MM-DD|YYYY-MM>  Reporting date (with --entity) — alternative to
                               --process
  --account-uuid <uuid>        [DEPRECATED — v1 path] Bank-account UUID.
                               Presence selects the v1 endpoint; absence
                               selects v2 (recommended). The v1 path will be
                               removed in a future release. Distinct from the
                               auth `--account <email>` selector.
  --output <path>              Filesystem path to write the binary body
                               (required)
  -s, --server <key>           Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                               DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                               TEST-5, TEST-6, TEST-7, DEMO) or a full
                               https://<host>.datarails.com URL. Required.
  --account <email>            Datarails account email (required when multiple
                               identities are stored for the server)
  -h, --help                   display help for command

dr reconciliation evidences get

Usage: dr reconciliation evidences get [options] <evidence_id>

Fetch a single evidence by id

Arguments:
  evidence_id            Evidence UUID

Options:
  --process <uuid>       Process UUID (required)
  --account-uuid <uuid>  Bank-account UUID (required). Distinct from the auth
                         `--account <email>` selector.
  --json                 Output raw JSON instead of a table (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr reconciliation evidences list

Usage: dr reconciliation evidences list [options]

[DEPRECATED — v1 surface] Evidences attached to one account on a process. The
v1 per-account lookup is being phased out in favour of `evidences supporting`
(v2, scoped by process). Will print a stderr deprecation warning on invocation;
still functional for backward compat.

Options:
  --process <uuid>       Process UUID (required)
  --account-uuid <uuid>  Bank-account UUID (required). Distinct from the auth
                         `--account <email>` selector.
  --json                 Output raw JSON instead of a table (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr reconciliation evidences process

Usage: dr reconciliation evidences process [options]

All evidences across a process (optionally filtered by type). Pass --process
<uuid> OR (--entity + --date) — the CLI resolves the UUID from the natural keys
when --process is omitted.

Options:
  --process <uuid>             Process UUID
  --entity <name>              Entity name (with --date) — alternative to
                               --process
  --date <YYYY-MM-DD|YYYY-MM>  Reporting date (with --entity) — alternative to
                               --process
  --type <kind>                Filter by evidence type (ADJUSTMENTS or
                               SUPPORTING_ITEMS) (default: "")
  --json                       Output raw JSON instead of a table (default:
                               false)
  -s, --server <key>           Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                               DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                               TEST-5, TEST-6, TEST-7, DEMO) or a full
                               https://<host>.datarails.com URL. Required.
  --account <email>            Datarails account email (required when multiple
                               identities are stored for the server)
  -h, --help                   display help for command

dr reconciliation evidences supporting

Usage: dr reconciliation evidences supporting [options]

Supporting items (v2) on a process. Pass --process <uuid> OR (--entity +
--date) — the natural-key form resolves the process UUID and ALSO filters the
response to that same entity in one step.

Options:
  --process <uuid>             Process UUID
  --entity <name>              Entity name. With --date: resolves the process
                               AND filters the response. With --process:
                               filters the response only. Without either:
                               error.
  --date <YYYY-MM-DD|YYYY-MM>  Reporting date (with --entity) — alternative to
                               --process
  --json                       Output raw JSON instead of a table (default:
                               false)
  -s, --server <key>           Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                               DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                               TEST-5, TEST-6, TEST-7, DEMO) or a full
                               https://<host>.datarails.com URL. Required.
  --account <email>            Datarails account email (required when multiple
                               identities are stored for the server)
  -h, --help                   display help for command

dr reconciliation filebox

Usage: dr reconciliation filebox [options] [command]

Reconciliation filebox connections + sync state

Options:
  -h, --help                          display help for command

Commands:
  list [options]                      Filebox connections (optional --entity /
                                      --filebox-id filters)
  get [options] <connection_id>       Fetch a single filebox connection by id
  progress [options] <connection_id>  Sync-progress status (handles both 200
                                      and 409 responses)
  create [options]                    Create a filebox connection for
                                      supporting-document automation
  delete [options] <connection_id>    Delete (deactivate) a filebox connection
                                      (two-step confirm)
  unlinked [options]                  Count of filebox-sourced evidences not
                                      yet linked to any account
  help [command]                      display help for command

dr reconciliation filebox create

Usage: dr reconciliation filebox create [options]

Create a filebox connection for supporting-document automation

Options:
  --entity <name>                         Entity to connect the filebox to (1-255 chars)
  --filebox-id <int>                      External filebox ID (positive integer)
  --frequency <kind>                      Sync cadence the MEC layer ingests tagged versions at: Monthly | Quarterly | Yearly | Exclude. Must match or be coarser than the filebox's date-tag granularity (a Quarterly filebox can be Quarterly or Yearly here, not Monthly). `Exclude` wires the connection but skips sync — use it to register a filebox without ingesting yet.
  --effective-since <YYYY-MM-DD|YYYY-MM>  Start sync from this month onward (day component truncated to 01 — `2026-04` and `2026-04-15` both produce the same epoch). MEC operators typically pass YYYY-MM.
  --json                                  Output the raw FileboxConnectionResponse as JSON (default: false)
  -s, --server <key>                      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6, TEST-7, DEMO) or a full https://<host>.datarails.com URL. Required.
  --account <email>                       Datarails account email (required when multiple identities are stored for the server)
  -h, --help                              display help for command

dr reconciliation filebox delete

Usage: dr reconciliation filebox delete [options] <connection_id>

Delete (deactivate) a filebox connection (two-step confirm)

Options:
  --confirm-token <token>  Confirmation token from step 1 (re-run without to
                           get one)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr reconciliation filebox get

Usage: dr reconciliation filebox get [options] <connection_id>

Fetch a single filebox connection by id

Arguments:
  connection_id       Filebox connection id (any non-empty string)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reconciliation filebox list

Usage: dr reconciliation filebox list [options]

Filebox connections (optional --entity / --filebox-id filters)

Options:
  --entity <e>        Filter by entity (single value, optional) (default: "")
  --filebox-id <id>   Filter by filebox id (integer, optional) (default: "")
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reconciliation filebox progress

Usage: dr reconciliation filebox progress [options] <connection_id>

Sync-progress status (handles both 200 and 409 responses)

Arguments:
  connection_id       Filebox connection id (any non-empty string)

Options:
  --json              Output raw JSON instead of a key:value block (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reconciliation filebox unlinked

Usage: dr reconciliation filebox unlinked [options]

Count of filebox-sourced evidences not yet linked to any account

Options:
  --process <uuid>    Process UUID (required)
  --entity <e>        Filter by entity (single value, optional) (default: "")
  --filebox-id <id>   Filter by filebox id (integer, optional) (default: "")
  --json              Output raw JSON instead of a key:value line (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reconciliation processes

Usage: dr reconciliation processes [options] [command]

Reconciliation processes

Options:
  -h, --help          display help for command

Commands:
  dates [options]     List reporting months (Unix-epoch-seconds integers
                      rendered as YYYY-MM-DD)
  accounts [options]  Per-month active/archived account names (admin-only on
                      the server)
  help [command]      display help for command

dr reconciliation processes accounts

Usage: dr reconciliation processes accounts [options]

Per-month active/archived account names (admin-only on the server)

Options:
  --json              Output raw JSON instead of grouped sections (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reconciliation processes dates

Usage: dr reconciliation processes dates [options]

List reporting months (Unix-epoch-seconds integers rendered as YYYY-MM-DD)

Options:
  --json              Output raw JSON instead of a list (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reports

Usage: dr reports [options] [command]

Operations on Datarails Financials reports (P&L, Balance Sheet, etc.)

Options:
  -h, --help             display help for command

Commands:
  list [options]         List Financials reports on the tenant
  get [options] <id>     Fetch a single report with full config
  clone [options] <id>   Clone an existing report under a new name
  update [options] <id>  Update a Financials (Report Builder) report: the given
                         payload keys replace the stored ones (dry-run unless
                         --confirm). Budget reports are not supported.
  delete [options] <id>  Delete a report (two-step confirm)
  help [command]         display help for command

dr reports clone

Usage: dr reports clone [options] <id>

Clone an existing report under a new name

Arguments:
  id                  report id to clone (positive integer)

Options:
  --name <name>       Name for the cloned report
  --json              Output raw JSON server response instead of a summary
                      (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reports delete

Usage: dr reports delete [options] <id>

Delete a report (two-step confirm)

Arguments:
  id                       report id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr reports get

Usage: dr reports get [options] <id>

Fetch a single report with full config

Arguments:
  id                  report id (positive integer)

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reports list

Usage: dr reports list [options]

List Financials reports on the tenant

Options:
  --table <id>        Filter to reports powered by this template ID
                      (client-side filter)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr reports update

Usage: dr reports update [options] <id>

Update a Financials (Report Builder) report: the given payload keys replace the
stored ones (dry-run unless --confirm). Budget reports are not supported.

Arguments:
  id                             report id (positive integer)

Options:
  --payload-file <path>          JSON object of payload keys to set (name,
                                 rows, cols, functions, global_filters,
                                 calculatedRows, options, …) — or the full
                                 report from `dr reports get <id> --json`,
                                 whose `payload` is used. Only keys that differ
                                 from the stored report are sent.
  --name <name>                  New report name
  --option <key=value>           Set an options.* key, merged into the stored
                                 options (repeatable), e.g. --option
                                 rowsTotal=true (default: [])
  --date-picker-preset <preset>  Date picker preset: today | yesterday |
                                 this_month | prev_month
  --confirm                      Actually apply the change (default is dry-run)
                                 (default: false)
  --timeout <ms>                 Polling budget in milliseconds while the
                                 server answers "still running" (orgs with
                                 large-reports support process the write on a
                                 worker) (default: "60000")
  --json                         Output JSON: the dry-run plan, or the raw
                                 server response (default: false)
  -s, --server <key>             Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                                 DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                                 TEST-5, TEST-6, TEST-7, DEMO) or a full
                                 https://<host>.datarails.com URL. Required.
  --account <email>              Datarails account email (required when
                                 multiple identities are stored for the server)
  -h, --help                     display help for command

dr rescan

Usage: dr rescan [options] [command]

Trigger a full rescan of a Datarails table

Options:
  -h, --help                     display help for command

Commands:
  table [options] <template_id>  Trigger a FULL historical rescan of the given
                                 table — re-executes every calculated field
                                 against every document version ever uploaded,
                                 not just the latest. Expensive and high-blast:
                                 a pre-existing calc field that errors on old
                                 rows (e.g. divide-by-null) fails the whole
                                 rescan even when day-to-day processing never
                                 hits it. Two-step confirm: run once to see the
                                 blast radius (document + version counts) and
                                 get a token, then re-run with --confirm-token
                                 to trigger it. To pick up a datamapper change
                                 on the live template WITHOUT touching history,
                                 use `dr datamappers update <id> --rescan
                                 latest` instead (mirrors the UI "Publish and
                                 scan").
  help [command]                 display help for command

dr rescan table

Usage: dr rescan table [options] <template_id>

Trigger a FULL historical rescan of the given table — re-executes every
calculated field against every document version ever uploaded, not just the
latest. Expensive and high-blast: a pre-existing calc field that errors on old
rows (e.g. divide-by-null) fails the whole rescan even when day-to-day
processing never hits it. Two-step confirm: run once to see the blast radius
(document + version counts) and get a token, then re-run with --confirm-token
to trigger it. To pick up a datamapper change on the live template WITHOUT
touching history, use `dr datamappers update <id> --rescan latest` instead
(mirrors the UI "Publish and scan").

Arguments:
  template_id              template id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           trigger the rescan (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr rh_config

Usage: dr rh_config [options] [command]

Read-only inspection of the legacy RH_CONFIG plumbing (config workbooks +
templates flagged is_rh_config). RH_CONFIG is legacy — see
HippiWeb/Documents/utils_cython.py:72.

Options:
  -h, --help                                display help for command

Commands:
  config [options] <bucket-id>              Show the config DocumentVersion attached to a bucket (the workbook containing the RH_Config sheet).
  tables [options] <bucket-id>              Show the config file URL plus the table names defined by the config workbook.
  download [options] <bucket-id>            Download the bucket's config workbook (.xlsx). Default destination: ./bucket_<id>_config.xlsx. Use --output - to stream to stdout.
  doc-templates [options] <document-id>     List templates associated with a document; each row's is_rh_config marks legacy-config-derived templates.
  version-templates [options] <version-id>  List templates referenced by a document version (functions + extables); each row's is_rh_config marks legacy-config-derived templates.
  help [command]                            display help for command

dr rh_config config

Usage: dr rh_config config [options] <bucket-id>

Show the config DocumentVersion attached to a bucket (the workbook containing
the RH_Config sheet).

Arguments:
  bucket-id           bucket id (positive integer)

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr rh_config doc-templates

Usage: dr rh_config doc-templates [options] <document-id>

List templates associated with a document; each row's is_rh_config marks
legacy-config-derived templates.

Arguments:
  document-id         document id (positive integer)

Options:
  --legacy-only       Show only templates with is_rh_config=true (default:
                      false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr rh_config download

Usage: dr rh_config download [options] <bucket-id>

Download the bucket's config workbook (.xlsx). Default destination:
./bucket_<id>_config.xlsx. Use --output - to stream to stdout.

Arguments:
  bucket-id           bucket id (positive integer)

Options:
  --output <path>     destination path; "-" streams to stdout (default: "")
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr rh_config tables

Usage: dr rh_config tables [options] <bucket-id>

Show the config file URL plus the table names defined by the config workbook.

Arguments:
  bucket-id           bucket id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr rh_config version-templates

Usage: dr rh_config version-templates [options] <version-id>

List templates referenced by a document version (functions + extables); each
row's is_rh_config marks legacy-config-derived templates.

Arguments:
  version-id          document version id (positive integer)

Options:
  --v2                Use the /v2/ path which also reports split_obj_exists
                      (default: false)
  --legacy-only       Show only templates with is_rh_config=true (default:
                      false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr scans

Usage: dr scans [options] [command]

Read scan status for a Datarails table

Options:
  -h, --help                   display help for command

Commands:
  status [options] <table_id>  Show aggregated scan status for a table
  help [command]               display help for command

dr scans status

Usage: dr scans status [options] <table_id>

Show aggregated scan status for a table

Arguments:
  table_id            table id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr semantictables

Usage: dr semantictables|semtables [options] [command]

Business-alias view of tables (finance-os semantic layer)

Options:
  -h, --help                  display help for command

Commands:
  list [options]              List semantic tables (id, name, alias)
  get [options] <alias>       Get metadata for one semantic table (by alias)
  data [options] <alias>      Sample rows from a semantic table by alias
  distinct [options] <alias>  List distinct values of a semantic column (by
                              alias)
  help [command]              display help for command

dr semantictables data

Usage: dr semantictables data [options] <alias>

Sample rows from a semantic table by alias

Arguments:
  alias               semantic table alias

Options:
  --rows <n>          Rows to return (server cap: 1000) (default: "10")
  --offset <n>        Pagination offset (default: "0")
  --fields <list>     Comma-separated aliases to project (default: all)
                      (default: "")
  --all-versions      Include historical versions (default: latest only)
                      (default: false)
  --filter <spec>     Include-filter "alias=V1,V2" (repeatable) (default: [])
  --exclude <spec>    Exclude-filter "alias=V1,V2" (repeatable) (default: [])
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr semantictables distinct

Usage: dr semantictables distinct [options] <alias>

List distinct values of a semantic column (by alias)

Arguments:
  alias               semantic table alias

Options:
  --field <name>      Field alias (required)
  --json              Output raw JSON instead of one value per line (default:
                      false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr semantictables get

Usage: dr semantictables get [options] <alias>

Get metadata for one semantic table (by alias)

Arguments:
  alias               semantic table alias

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr semantictables list

Usage: dr semantictables list [options]

List semantic tables (id, name, alias)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr skill

Usage: dr skill [options] [command]

Print or install the AI-assistant skills bundled with this binary (Claude Code
always; Gemini CLI when ~/.gemini exists; per-project Gemini+Codex via
`init-project`)

Options:
  -h, --help                      display help for command

Commands:
  list                            List embedded skills with file count + total
                                  byte size
  print [options] [name]          Print one file of an embedded skill to stdout
                                  (defaults to the router SKILL.md)
  install [options] <target_dir>  Copy every embedded skill's full tree (router
                                  SKILL.md + reference files) to
                                  <target_dir>/.claude/skills/<name>/. If
                                  <target_dir>/.gemini/ also exists (i.e.
                                  Gemini CLI is set up), additionally mirrors
                                  each skill's tree to .gemini/skills/<name>/
                                  and registers @import lines (router only) in
                                  .gemini/GEMINI.md between idempotent <!--
                                  dr-cli:begin --> / <!-- dr-cli:end -->
                                  markers. The Gemini side is a no-op when
                                  .gemini/ is absent — re-run after installing
                                  Gemini CLI to wire it up. Always overwrites;
                                  bytes-equal writes short-circuit silently. On
                                  a machine where Claude Code has the dr-cli
                                  plugin installed (or
                                  DR_CLI_USERSPACE_SKILLS=0), the Claude side
                                  is skipped with a notice, and the copies an
                                  earlier install wrote for skills an installed
                                  dr-cli plugin serves are removed (only the
                                  files their manifest lists) — pass --force to
                                  write it anyway; the Gemini side is
                                  unaffected.
  init-project [options] [dir]    Set up dr-cli skills for Gemini CLI and Codex
                                  CLI in a project folder. For each embedded
                                  skill, writes its full tree under
                                  <dir>/.dr-cli/skills/<name>/, registers
                                  @import lines (router only) in
                                  <dir>/GEMINI.md, and inlines each skill's
                                  router text in <dir>/AGENTS.md (Codex doesn't
                                  support @import; reference files stay on disk
                                  and are pointed at, not inlined). Claude Code
                                  is NOT touched — it stays globally wired via
                                  `dr skill install` / npm postinstall.
                                  Defaults to the current working directory.
  help [command]                  display help for command

dr skill init-project

Usage: dr skill init-project [options] [dir]

Set up dr-cli skills for Gemini CLI and Codex CLI in a project folder. For each
embedded skill, writes its full tree under <dir>/.dr-cli/skills/<name>/,
registers @import lines (router only) in <dir>/GEMINI.md, and inlines each
skill's router text in <dir>/AGENTS.md (Codex doesn't support @import;
reference files stay on disk and are pointed at, not inlined). Claude Code is
NOT touched — it stays globally wired via `dr skill install` / npm postinstall.
Defaults to the current working directory.

Arguments:
  dir         project directory to set up (defaults to cwd)

Options:
  --verbose   list every file written instead of one summary line per skill
              (default: false)
  -h, --help  display help for command

dr skill install

Usage: dr skill install [options] <target_dir>

Copy every embedded skill's full tree (router SKILL.md + reference files) to
<target_dir>/.claude/skills/<name>/. If <target_dir>/.gemini/ also exists (i.e.
Gemini CLI is set up), additionally mirrors each skill's tree to
.gemini/skills/<name>/ and registers @import lines (router only) in
.gemini/GEMINI.md between idempotent <!-- dr-cli:begin --> / <!-- dr-cli:end
--> markers. The Gemini side is a no-op when .gemini/ is absent — re-run after
installing Gemini CLI to wire it up. Always overwrites; bytes-equal writes
short-circuit silently. On a machine where Claude Code has the dr-cli plugin
installed (or DR_CLI_USERSPACE_SKILLS=0), the Claude side is skipped with a
notice, and the copies an earlier install wrote for skills an installed dr-cli
plugin serves are removed (only the files their manifest lists) — pass --force
to write it anyway; the Gemini side is unaffected.

Arguments:
  target_dir  directory under which to install the skills

Options:
  --verbose   list every file written instead of one summary line per skill
              (default: false)
  --force     write the Claude Code skills even on a machine that gets them
              from the dr-cli plugin (default: false)
  -h, --help  display help for command

dr skill list

Usage: dr skill list [options]

List embedded skills with file count + total byte size

Options:
  -h, --help  display help for command

dr skill print

Usage: dr skill print [options] [name]

Print one file of an embedded skill to stdout (defaults to the router SKILL.md)

Arguments:
  name              skill name (defaults to "dr-cli"); use `dr skill list` to
                    discover others

Options:
  --file <relPath>  relative path of the file to print within the skill
                    (defaults to SKILL.md; e.g. reference/metrics.md)
  --hash            Print just the SHA-256 of the printed file (for checking
                    parity with a file on disk) (default: false)
  -h, --help        display help for command

dr spend-control

Usage: dr spend-control [options] [command]

Operate on a tenant's Spend Control product

Options:
  -h, --help           display help for command

Commands:
  vendors              Spend Control vendors — the App Store catalog,
                       visibility, and owners
  alerts               Spend Control alerts and the org-wide renewal-alert
                       settings
  billing-frequencies  Spend Control billing-frequency catalog
  contracts            Spend Control contracts
  files                Spend Control contract files (upload without AI
                       extraction)
  help [command]       display help for command

dr spend-control alerts

Usage: dr spend-control alerts [options] [command]

Spend Control alerts and the org-wide renewal-alert settings

Options:
  -h, --help                        display help for command

Commands:
  list [options]                    List alerts (GET /alerts)
  dismiss [options] [alert_ids...]  Dismiss alerts (POST /alerts/{id}/dismiss).
                                    One-way: no un-dismiss route exists
  settings [options]                Show the organization's renewal alert
                                    settings (GET /alerts/settings)
  set-settings [options]            Update renewal alert settings (PUT
                                    /alerts/settings/{id}). Unpassed fields
                                    keep their current values
  help [command]                    display help for command

dr spend-control alerts dismiss

Usage: dr spend-control alerts dismiss [options] [alert_ids...]

Dismiss alerts (POST /alerts/{id}/dismiss). One-way: no un-dismiss route exists

Arguments:
  alert_ids                Alert UUIDs, space- or comma-separated

Options:
  --from <path>            Read ids from a file, one per line
  --confirm-token <token>  Token from a prior plan run (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr spend-control alerts list

Usage: dr spend-control alerts list [options]

List alerts (GET /alerts)

Options:
  --status <status>   Filter by status (active|dismissed). Server defaults to
                      active
  --page <n>          Page number (1-based)
  --size <n>          Page size (max 100)
  --all               Walk every page (default: false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control alerts set-settings

Usage: dr spend-control alerts set-settings [options]

Update renewal alert settings (PUT /alerts/settings/{id}). Unpassed fields keep
their current values

Options:
  --days-before-end-date <n>           Days of notice before a contract ends
  --send-to-contract-owner <bool>      Notify the contract owner (true|false)
  --ignore-cancellation-policy <bool>  Ignore the cancellation-notice window
                                       when timing alerts (true|false)
  --email-notifications <bool>         Send alert emails (true|false)
  --user-ids <ids>                     Comma-separated extra recipient user
                                       ids. Pass an empty string to clear
  --confirm-token <token>              Token from a prior plan run (default:
                                       "")
  --json                               Output raw JSON of the updated settings
                                       (default: false)
  -s, --server <key>                   Server key (US, US2, UK, CA, EU, STUDIO,
                                       DEV, DEV-1, TEST, TEST-1, TEST-2,
                                       TEST-3, TEST-4, TEST-5, TEST-6, TEST-7,
                                       DEMO) or a full
                                       https://<host>.datarails.com URL.
                                       Required.
  --account <email>                    Datarails account email (required when
                                       multiple identities are stored for the
                                       server)
  -h, --help                           display help for command

dr spend-control alerts settings

Usage: dr spend-control alerts settings [options]

Show the organization's renewal alert settings (GET /alerts/settings)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control billing-frequencies

Usage: dr spend-control billing-frequencies [options] [command]

Spend Control billing-frequency catalog

Options:
  -h, --help      display help for command

Commands:
  list [options]  List billing frequencies
  help [command]  display help for command

dr spend-control billing-frequencies list

Usage: dr spend-control billing-frequencies list [options]

List billing frequencies

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control contracts

Usage: dr spend-control contracts [options] [command]

Spend Control contracts

Options:
  -h, --help                               display help for command

Commands:
  categories [options]                     List contract categories (GET /contracts/categories)
  change-history [options] <contract_id>   A contract's recorded value changes (GET /contracts/{id}/change-history)
  list [options]                           List contracts (GET /contracts/)
  get [options] <contract_id>              Get a single contract by id (GET /contracts/{id})
  extract-from-files [options] <files...>  Extract contract fields from PDF/DOCX/PNG/JPG using AI
  bulk-create [options]                    Persist contracts from a draft JSON file
  update [options] <contract_id>           Partially update a contract by id (PATCH /contracts/{id})
  archive [options] [contract_ids...]      Archive contracts (PATCH is_archived=true; reversible via restore)
  restore [options] [contract_ids...]      Un-archive contracts (PATCH is_archived=false)
  delete [options] [contract_ids...]       PERMANENTLY delete contracts and their files (DELETE /contracts/{id}). Use `archive` for reversible cleanup
  help [command]                           display help for command

dr spend-control contracts archive

Usage: dr spend-control contracts archive [options] [contract_ids...]

Archive contracts (PATCH is_archived=true; reversible via restore)

Arguments:
  contract_ids             Contract UUIDs (space- or comma-separated)

Options:
  --from <path>            Read ids from a file (one per line; # comments ok)
  --confirm-token <token>  Token from the plan-phase output; required to
                           actually apply (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr spend-control contracts bulk-create

Usage: dr spend-control contracts bulk-create [options]

Persist contracts from a draft JSON file

Options:
  --from <path>               Path to draft JSON
  --dry-run                   Validate + resolve, print resolved batches, do
                              not POST (default: false)
  --owner <email>             Override defaults.owner
  --billing-frequency <name>  Override defaults.billing_frequency
  --confirm-token <token>     Token from a prior plan run (default: "")
  --timeout <seconds>         Whole-command timeout. Default scales with batch
                              count: 30s + 20s per 10-contract batch
  --allow-cross-tenant        Submit even when the draft was generated against
                              a different server (default: false)
  -s, --server <key>          Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                              DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                              TEST-5, TEST-6, TEST-7, DEMO) or a full
                              https://<host>.datarails.com URL. Required.
  --account <email>           Datarails account email (required when multiple
                              identities are stored for the server)
  -h, --help                  display help for command

dr spend-control contracts categories

Usage: dr spend-control contracts categories [options]

List contract categories (GET /contracts/categories)

Options:
  --unused            Only categories with no contract using them
                      (contract_is_null=true) (default: false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control contracts change-history

Usage: dr spend-control contracts change-history [options] <contract_id>

A contract's recorded value changes (GET /contracts/{id}/change-history)

Arguments:
  contract_id         Contract UUID

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control contracts delete

Usage: dr spend-control contracts delete [options] [contract_ids...]

PERMANENTLY delete contracts and their files (DELETE /contracts/{id}). Use
`archive` for reversible cleanup

Arguments:
  contract_ids             Contract UUIDs (space- or comma-separated)

Options:
  --from <path>            Read ids from a file (one per line; # comments ok)
  --confirm-token <token>  Token from the plan-phase output; required to
                           actually delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr spend-control contracts extract-from-files

Usage: dr spend-control contracts extract-from-files [options] <files...>

Extract contract fields from PDF/DOCX/PNG/JPG using AI

Arguments:
  files                      Files to extract

Options:
  --is-additional            Mark as additional (non-primary) attachments
                             (default: false)
  -o, --output <path>        Write draft JSON to this path (default: stdout)
  --default <key=value...>   Seed `defaults` block in draft (repeatable). Keys:
                             owner, currency, category, billing_frequency,
                             payment_method, payment_terms, auto_renewal,
                             renewal_notice_period,
                             days_before_contract_end_date,
                             subscription_term_months, is_archived (default:
                             [])
  --json                     Output raw API response instead of a structured
                             draft (default: false)
  --timeout <seconds>        Whole-command timeout. Default on the async path
                             is --poll-timeout plus 15s per file for the
                             uploads; with --no-async it is 300s
  --retry <n>                Extra attempts per chunk on the --no-async path
                             (default 0), with exponential backoff. Only
                             retries 429/500/503/network — not 4xx, and not
                             502/504/524 where the upstream may still be
                             extracting. Each attempt re-uploads and re-runs AI
                             extraction, so it costs extraction spend
  --no-async                 Use the legacy synchronous endpoint (10 files per
                             request, AI runs inside the request). The async
                             default has no such cap and cannot gateway-timeout
  --poll-interval <seconds>  How often to check extraction progress (default 2)
  --poll-timeout <seconds>   Total time to wait for extraction (default 10
                             minutes). On expiry the draft still carries
                             whatever finished
  -s, --server <key>         Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                             DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                             TEST-5, TEST-6, TEST-7, DEMO) or a full
                             https://<host>.datarails.com URL. Required.
  --account <email>          Datarails account email (required when multiple
                             identities are stored for the server)
  -h, --help                 display help for command

dr spend-control contracts get

Usage: dr spend-control contracts get [options] <contract_id>

Get a single contract by id (GET /contracts/{id})

Arguments:
  contract_id          Contract UUID

Options:
  --convert-to <code>  Convert monetary fields to this currency server-side
                       (default USD)
  --json               Output raw JSON instead of a table (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr spend-control contracts list

Usage: dr spend-control contracts list [options]

List contracts (GET /contracts/)

Options:
  --search <vendor>               Case-insensitive vendor-name search
  --status <list>                 Comma-separated statuses. Accepted: active,
                                  pending_renewal, expired, upcoming, cancelled
  --payment-terms <list>          Comma-separated payment terms. Accepted:
                                  due_on_receipt, net_7, net_15, net_30,
                                  net_45, net_60, other
  --payment-method <list>         Comma-separated payment methods. Accepted:
                                  credit_card, bank_transfer, ach, paypal,
                                  check, cash, other
  --vendor-id <list>              Comma-separated vendor UUIDs
  --owner-id <id>                 Filter to contracts owned by this user id
  --start-date-from <YYYY-MM-DD>  Contracts starting on/after this date
  --end-date-to <YYYY-MM-DD>      Contracts ending on/before this date
  --currency <code>               Filter on the contract's own currency (e.g.
                                  USD)
  --external-id <substring>       Substring match on external_id
  --is-archived <true|false>      Filter by archived state. Omit to return both
                                  (archived rows are flagged in the ARCHIVED
                                  column)
  --order-by <list>               Comma-separated sort fields; append ":desc"
                                  to reverse one (e.g. "value:desc"). Accepted:
                                  value, status, start_date, end_date,
                                  auto_renewal, owner_id, vendor__name,
                                  billing_frequency__name
  --convert-to <code>             Convert monetary fields to this currency
                                  server-side (default USD). Does NOT filter —
                                  use --currency for that
  --page <n>                      1-based page number (default 1)
  --size <n>                      Page size (server max 100)
  --all                           Fetch every page, in --size chunks (default
                                  100) (default: false)
  --json                          Output raw JSON instead of a table (default:
                                  false)
  -s, --server <key>              Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                                  DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                                  TEST-5, TEST-6, TEST-7, DEMO) or a full
                                  https://<host>.datarails.com URL. Required.
  --account <email>               Datarails account email (required when
                                  multiple identities are stored for the
                                  server)
  -h, --help                      display help for command

dr spend-control contracts restore

Usage: dr spend-control contracts restore [options] [contract_ids...]

Un-archive contracts (PATCH is_archived=false)

Arguments:
  contract_ids             Contract UUIDs (space- or comma-separated)

Options:
  --from <path>            Read ids from a file (one per line; # comments ok)
  --confirm-token <token>  Token from the plan-phase output; required to
                           actually apply (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr spend-control contracts update

Usage: dr spend-control contracts update [options] <contract_id>

Partially update a contract by id (PATCH /contracts/{id})

Arguments:
  contract_id         Contract UUID

Options:
  --from <path>       Path to JSON body matching ContractPartialUpdateSchema
  --json              Output raw JSON of the updated contract (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control files

Usage: dr spend-control files [options] [command]

Spend Control contract files (upload without AI extraction)

Options:
  -h, --help                      display help for command

Commands:
  upload [options] <files...>     Upload files and return their file_ids, with
                                  NO AI extraction (POST /contracts/file)
  list [options] <contract_id>    List a contract's files (GET
                                  /contracts/{id}/files)
  get [options] <file_id>         Get a file's metadata and presigned download
                                  URL (POST /contracts/files/{id}/download)
  delete [options] [file_ids...]  PERMANENTLY delete contract files (DELETE
                                  /contracts/files/{id}). Does not check for
                                  contracts still referencing them
  help [command]                  display help for command

dr spend-control files delete

Usage: dr spend-control files delete [options] [file_ids...]

PERMANENTLY delete contract files (DELETE /contracts/files/{id}). Does not
check for contracts still referencing them

Arguments:
  file_ids                 Contract file UUIDs (space- or comma-separated)

Options:
  --from <path>            Read ids from a file (one per line; # comments ok)
  --confirm-token <token>  Token from the plan-phase output; required to
                           actually delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr spend-control files get

Usage: dr spend-control files get [options] <file_id>

Get a file's metadata and presigned download URL (POST
/contracts/files/{id}/download)

Arguments:
  file_id             Contract file UUID

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control files list

Usage: dr spend-control files list [options] <contract_id>

List a contract's files (GET /contracts/{id}/files)

Arguments:
  contract_id         Contract UUID

Options:
  --all               Fetch every page (default: false)
  --json              Output raw JSON. NOTE: includes presigned download URLs,
                      which grant access on their own (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control files upload

Usage: dr spend-control files upload [options] <files...>

Upload files and return their file_ids, with NO AI extraction (POST
/contracts/file)

Arguments:
  files               Files to upload

Options:
  --is-additional     Mark as additional (non-primary) attachments (default:
                      false)
  --json              Output { uploaded, failed } instead of a table, so failed
                      paths are machine-readable (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control vendors

Usage: dr spend-control vendors [options] [command]

Spend Control vendors — the App Store catalog, visibility, and owners

Options:
  -h, --help                                display help for command

Commands:
  list [options]                            List vendors (GET /vendors/)
  app-store [options]                       List vendors as the App Store shows them (GET /vendors/app-store)
  with-contracts [options]                  List vendors with their contract spend aggregate (GET /vendors/with-contracts)
  duplicates [options]                      List vendors with more than one non-archived contract (GET /vendors/with-multiple-contracts)
  categories [options]                      List vendor categories (GET /vendors/categories)
  owners [options] <vendor_id>              List a vendor's owner ids (GET /vendors/{id}/owners/)
  create [options] <name>                   Get or create a vendor by name (POST /vendors/). Re-running with an existing name is a no-op
  set-visibility [options] [vendor_ids...]  Show or hide vendors in the App Store (PATCH /vendors/visibility, admin-only)
  help [command]                            display help for command

dr spend-control vendors app-store

Usage: dr spend-control vendors app-store [options]

List vendors as the App Store shows them (GET /vendors/app-store)

Options:
  --name <text>        Case-insensitive partial match on vendor name
  --is-visible <bool>  Filter by visibility (true|false)
  --page <n>           Page number (1-based)
  --size <n>           Page size (max 100)
  --all                Walk every page (default: false)
  --json               Output raw JSON instead of a table (default: false)
  --category <name>    Filter by contract category
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr spend-control vendors categories

Usage: dr spend-control vendors categories [options]

List vendor categories (GET /vendors/categories)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control vendors create

Usage: dr spend-control vendors create [options] <name>

Get or create a vendor by name (POST /vendors/). Re-running with an existing
name is a no-op

Arguments:
  name                     Vendor name (2–255 chars)

Options:
  --confirm-token <token>  Token from a prior plan run (default: "")
  --json                   Output raw JSON of the vendor (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr spend-control vendors duplicates

Usage: dr spend-control vendors duplicates [options]

List vendors with more than one non-archived contract (GET
/vendors/with-multiple-contracts)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control vendors list

Usage: dr spend-control vendors list [options]

List vendors (GET /vendors/)

Options:
  --name <text>        Case-insensitive partial match on vendor name
  --is-visible <bool>  Filter by visibility (true|false)
  --page <n>           Page number (1-based)
  --size <n>           Page size (max 100)
  --all                Walk every page (default: false)
  --json               Output raw JSON instead of a table (default: false)
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr spend-control vendors owners

Usage: dr spend-control vendors owners [options] <vendor_id>

List a vendor's owner ids (GET /vendors/{id}/owners/)

Arguments:
  vendor_id           Vendor UUID

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr spend-control vendors set-visibility

Usage: dr spend-control vendors set-visibility [options] [vendor_ids...]

Show or hide vendors in the App Store (PATCH /vendors/visibility, admin-only)

Arguments:
  vendor_ids               Vendor UUIDs, space- or comma-separated

Options:
  --visible <bool>         Target visibility (true|false)
  --from <path>            Read ids from a file, one per line
  --confirm-token <token>  Token from a prior plan run (default: "")
  --json                   Output raw JSON of the updated vendors (default:
                           false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr spend-control vendors with-contracts

Usage: dr spend-control vendors with-contracts [options]

List vendors with their contract spend aggregate (GET /vendors/with-contracts)

Options:
  --name <text>               Case-insensitive partial match on vendor name
  --is-visible <bool>         Filter by visibility (true|false)
  --page <n>                  Page number (1-based)
  --size <n>                  Page size (max 100)
  --all                       Walk every page (default: false)
  --json                      Output raw JSON instead of a table (default:
                              false)
  --category <name>           Filter by contract category
  --target-date <YYYY-MM-DD>  Month the contract aggregate is computed for
                              (default: today)
  --without-invoices          Only vendors with no invoices (default: false)
  -s, --server <key>          Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                              DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                              TEST-5, TEST-6, TEST-7, DEMO) or a full
                              https://<host>.datarails.com URL. Required.
  --account <email>           Datarails account email (required when multiple
                              identities are stored for the server)
  -h, --help                  display help for command

dr storyboards

Usage: dr storyboards [options] [command]

Operations on Datarails storyboards (story-tell presentations)

Options:
  -h, --help                        display help for command

Commands:
  list [options]                    List storyboards (first page of the
                                    paginated response)
  get [options] <id>                Get a single storyboard's details
  slides [options] <storyboard_id>  List slides inside a storyboard
  prepare [options] <id>            Refresh a storyboard's data (rebuilds
                                    widget caches)
  delete [options] <id>             Delete a storyboard (two-step confirm)
  help [command]                    display help for command

dr storyboards delete

Usage: dr storyboards delete [options] <id>

Delete a storyboard (two-step confirm)

Arguments:
  id                       storyboard id (positive integer)

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr storyboards get

Usage: dr storyboards get [options] <id>

Get a single storyboard's details

Arguments:
  id                  storyboard id (positive integer)

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr storyboards list

Usage: dr storyboards list [options]

List storyboards (first page of the paginated response)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr storyboards prepare

Usage: dr storyboards prepare [options] <id>

Refresh a storyboard's data (rebuilds widget caches)

Arguments:
  id                  storyboard id (positive integer)

Options:
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr storyboards slides

Usage: dr storyboards slides [options] <storyboard_id>

List slides inside a storyboard

Arguments:
  storyboard_id       storyboard id (positive integer)

Options:
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr support-manager

Usage: dr support-manager|sm [options] [command]

Support Manager Control Panel — list orgs the active account supports (via
/api/it/manager_screen/data)

Options:
  -h, --help      display help for command

Commands:
  list [options]  List organizations on the Support Manager Control Panel
                  (paginated; mirrors the FE table)
  help [command]  display help for command

dr support-manager list

Usage: dr support-manager list [options]

List organizations on the Support Manager Control Panel (paginated; mirrors the
FE table)

Options:
  --search <q>          Substring filter on id / name / owner email
  --ordering <field>    Server-side ordering field, e.g. -last_activity, name,
                        -control_panel__data_status_error_amount
  --page <n>            1-based page number (server default: 1)
  --classification <c>  Filter by organization_classification: active |
                        non-active | non-customer
  --json                Output the raw paginated JSON response (default: false)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr templates

Usage: dr templates [options] [command]

Operations on Datarails templates (data sources)

Options:
  -h, --help                            display help for command

Commands:
  list [options]                        List all templates. The text table
                                        shows id, name, and field count; each
                                        table system name (a.k.a. alias)
                                        appears only under `--json`.
  get [options] <id>                    Get a single template with its fields.
                                        The text table shows field id, name,
                                        and type; the table and field system
                                        names (a.k.a. aliases) appear only
                                        under `--json`.
  create [options]                      Create a new table under a data model
  sample [options] <id>                 Sample N rows from a template table
                                        (paginated, includes total row count;
                                        latest document version)
  distinct [options] <id>               List distinct values of a column
                                        (finance-os data_models raw route,
                                        async; polled). A Date field yields
                                        epoch-seconds strings, which the
                                        aggregate/sample filters take back
                                        as-is.
  aggregate [options] <template_id>     Group-by / rollup on a table
                                        (finance-os data_models raw route,
                                        async; polled). Fields may be given by
                                        name or id.
  set-alias [options] <template_id>     Set or clear the system name on a table
                                        (POST /api/templates/tables/aliases).
                                        "System name" is the Datarails UI and
                                        Help Center term for this value; the
                                        CLI flag and the API field are both
                                        spelled `alias`. It is what the
                                        `{braces}` selector in
                                        DR.GET(value,"{system_name}") resolves
                                        against, and what template-library
                                        table mapping matches on. Pass an empty
                                        `--alias ""` to clear.
  set-field-alias [options] <field_id>  Set or clear the system name on a
                                        single field (POST
                                        /api/templates/fields/aliases). "System
                                        name" is the Datarails UI and Help
                                        Center term for this value; the CLI
                                        flag and the API field are both spelled
                                        `alias`. It is what the `{braces}`
                                        selector in
                                        DR.GET(value,"{system_name}") resolves
                                        against, and what template-library
                                        field mapping matches on. Use `dr
                                        templates get <template_id>` to look up
                                        the field id, and `dr templates get
                                        <template_id> --json` to see which
                                        fields already have a system name. Pass
                                        an empty `--alias ""` to clear.
  set-field-type [options] [field_id]   Change the data type of a template
                                        field (PUT /api/templates/fields/<id>).
                                        Single-field: `dr templates
                                        set-field-type <field_id> --type <T>`.
                                        Bulk: `--file <path>` with
                                        `[{"field_id":N,"type":"T"},…]`. Valid
                                        types: Text, Float, Date, Integer.
                                        Preserves `is_hidden` via
                                        read-modify-write off `templates list`.
  help [command]                        display help for command

dr templates aggregate

Usage: dr templates aggregate [options] <template_id>

Group-by / rollup on a table (finance-os data_models raw route, async; polled).
Fields may be given by name or id.

Arguments:
  template_id            template id (positive integer)

Options:
  --group-by <field>     Field to group by (name or id). Repeatable. At least
                         one required. (default: [])
  --metric <FIELD:AGG>   Metric "FIELD:AGG" (e.g. "Amount:SUM" or 47963:SUM).
                         Repeatable. AGG one of
                         SUM|COUNT|COUNT_UNIQUE|UNIQUE_VALUES|AVG|MIN|MAX. A
                         field may be aggregated once per call. (default: [])
  --filter <spec>        Include rows whose FIELD is one of the values:
                         "NAME=V1[,V2…]" (repeatable). NAME is a field name or
                         id. On a Date field values may be calendar dates
                         (2026-01-01, 2026-01) or Unix epoch seconds. (default:
                         [])
  --exclude <spec>       Exclude rows whose FIELD is one of the values:
                         "NAME=V1[,V2…]" (repeatable) (default: [])
  --filter-gte <spec>    Keep rows with FIELD >= VALUE: "NAME=VALUE"
                         (repeatable). Calendar dates are converted to epoch
                         seconds on Date fields. (default: [])
  --filter-lte <spec>    Keep rows with FIELD <= VALUE: "NAME=VALUE"
                         (repeatable) (default: [])
  --filter-range <spec>  Keep rows with FROM <= FIELD <= TO: "NAME=FROM..TO"
                         (repeatable), e.g. "Period=2026-01-01..2026-12-01"
                         (default: [])
  --totals               Also print the engine grand total: a "Totals:" footer,
                         or {rows, totals} under --json. Never an extra row.
                         (default: false)
  --timeout <ms>         Polling budget in milliseconds (default: "60000")
  --json                 Output the group rows as a JSON array (one object per
                         group, no total rows) (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr templates create

Usage: dr templates create [options]

Create a new table under a data model

Options:
  --data-model <id>   Data model ID (required)
  --name <name>       Table name (required)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr templates distinct

Usage: dr templates distinct [options] <id>

List distinct values of a column (finance-os data_models raw route, async;
polled). A Date field yields epoch-seconds strings, which the aggregate/sample
filters take back as-is.

Arguments:
  id                    template id (positive integer)

Options:
  --field <name-or-id>  Field (column) name or id (required)
  --timeout <ms>        Polling budget in milliseconds (default: "60000")
  --json                Output raw JSON instead of one value per line (default:
                        false)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr templates get

Usage: dr templates get [options] <id>

Get a single template with its fields. The text table shows field id, name, and
type; the table and field system names (a.k.a. aliases) appear only under
`--json`.

Arguments:
  id                  template id (positive integer)

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr templates list

Usage: dr templates list [options]

List all templates. The text table shows id, name, and field count; each table
system name (a.k.a. alias) appears only under `--json`.

Options:
  --my-org-only       Filter to templates the operator's org owns directly
                      (hits /api/templates/my_org_only — no cross-org / shared
                      / system entries; same source the FE's target-table
                      pickers use) (default: false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr templates sample

Usage: dr templates sample [options] <id>

Sample N rows from a template table (paginated, includes total row count;
latest document version)

Arguments:
  id                     template id (positive integer)

Options:
  --rows <n>             Number of rows to sample (max 1000) (default: "10")
  --offset <n>           Rows to skip before sampling (for pagination)
                         (default: "0")
  --fields <list>        Comma-separated list of fields (names or ids) to
                         include (default: all) (default: "")
  --filter <spec>        Include rows whose FIELD is one of the values:
                         "NAME=V1[,V2…]" (repeatable). NAME is a field name or
                         id. On a Date field values may be calendar dates
                         (2026-01-01, 2026-01) or Unix epoch seconds. (default:
                         [])
  --exclude <spec>       Exclude rows whose FIELD is one of the values:
                         "NAME=V1[,V2…]" (repeatable) (default: [])
  --filter-gte <spec>    Keep rows with FIELD >= VALUE: "NAME=VALUE"
                         (repeatable). Calendar dates are converted to epoch
                         seconds on Date fields. (default: [])
  --filter-lte <spec>    Keep rows with FIELD <= VALUE: "NAME=VALUE"
                         (repeatable) (default: [])
  --filter-range <spec>  Keep rows with FROM <= FIELD <= TO: "NAME=FROM..TO"
                         (repeatable), e.g. "Period=2026-01-01..2026-12-01"
                         (default: [])
  --json                 Output raw JSON instead of a table (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr templates set-alias

Usage: dr templates set-alias [options] <template_id>

Set or clear the system name on a table (POST /api/templates/tables/aliases).
"System name" is the Datarails UI and Help Center term for this value; the CLI
flag and the API field are both spelled `alias`. It is what the `{braces}`
selector in DR.GET(value,"{system_name}") resolves against, and what
template-library table mapping matches on. Pass an empty `--alias ""` to clear.

Arguments:
  template_id         template id (positive integer)

Options:
  --alias <s>         New system name, a.k.a. alias (empty string clears it)
  --json              Output the raw server response as JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr templates set-field-alias

Usage: dr templates set-field-alias [options] <field_id>

Set or clear the system name on a single field (POST
/api/templates/fields/aliases). "System name" is the Datarails UI and Help
Center term for this value; the CLI flag and the API field are both spelled
`alias`. It is what the `{braces}` selector in DR.GET(value,"{system_name}")
resolves against, and what template-library field mapping matches on. Use `dr
templates get <template_id>` to look up the field id, and `dr templates get
<template_id> --json` to see which fields already have a system name. Pass an
empty `--alias ""` to clear.

Arguments:
  field_id            field id (positive integer)

Options:
  --alias <s>         New system name, a.k.a. alias (empty string clears it)
  --json              Output the raw server response as JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr templates set-field-type

Usage: dr templates set-field-type [options] [field_id]

Change the data type of a template field (PUT /api/templates/fields/<id>).
Single-field: `dr templates set-field-type <field_id> --type <T>`. Bulk:
`--file <path>` with `[{"field_id":N,"type":"T"},…]`. Valid types: Text, Float,
Date, Integer. Preserves `is_hidden` via read-modify-write off `templates
list`.

Arguments:
  field_id                 field id (positive integer); omit when using --file

Options:
  --type <s>               New field type (Text, Float, Date, Integer)
  --file <path>            JSON array of {field_id, type} entries for bulk
                           updates
  --enforce                Bypass the server-side numeric-downgrade guard
                           (Float/Integer → non-numeric when widgets reference
                           the field). Mirrors the FE confirmation-dialog
                           "force" path. (default: false)
  --confirm-token <token>  Token from a prior plan run — required to actually
                           change the type (default: "")
  --json                   Output a structured JSON result instead of a table
                           (default: false)
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr update

Usage: dr update [options]

Update dr-cli in place by re-running the canonical npm install. On a `pnpm link
--global` dev install this will replace the link with the published version.

Options:
  -h, --help  display help for command

dr users

Usage: dr users [options] [command]

Inspect Datarails users (via /api/it/users), set sync-service passwords, and
bulk-create users from a CSV

Options:
  -h, --help                                   display help for command

Commands:
  list [options]                               List users visible to the authenticated account (IT endpoint)
  create [options]                             Create a new user in an organization (POST /api/it/users). Sends an invite email + registers the identity by default; pass --no-invite to skip both.
  get [options] <user_id>                      Get a single user's record by id
  can-login-as [options]                       List users the authenticated account is allowed to impersonate (django-loginas)
  set-password [options] <user_id>             Set a new password for a sync-service user (interactive hidden prompt; refuses non-sync accounts)
  set-email [options] <user_id> <new_email>    Change a user's login email (dry-run unless --confirm; uses the same PUT /api/it/users/<id> the admin UI uses)
  set-email-notifications [options] <user_id>  Turn a user's notification email on or off (the admin form's "Enable notifications" toggle). Dry-run unless --confirm.
  bulk-create [options]                        Create many users from a CSV, each scoped to permission groups (dry-run unless --confirm)
  me [options]                                 Show the authenticated user's profile (server-side identity, not the JWT claims)
  permissions                                  Manage a user's data-table roles and permission groups (requires the use_new_table_perms product flag on the tenant)
  bulk-permissions [options]                   Apply many Permission-Manager grants from a CSV — data-table roles, element roles, org roles, and data-access filters (header: email,resource,type,ids,role,filter_values,filter_excluded). Dry-run unless --confirm; --json on both paths.
  bulk-set-email [options]                     Change many users' login emails from a CSV (header: source,target). All sources must belong to one organization (validated). Dry-run unless --confirm; --json on both paths.
  bulk-set-email-notifications [options]       Turn notification email on or off for every user in one organization. Sync-service and support users are always skipped. Dry-run unless --confirm; --json on both paths.
  register-identity [options]                  Register + invite users that were bulk-created with --no-register-identity. Re-reads the SAME CSV, resolves each email to its user, and calls PUT /api/it/users/<id>/register_identity per row. Dry-run unless --confirm; per-row isolation (non-zero exit only if a row failed).
  help [command]                               display help for command

dr users bulk-create

Usage: dr users bulk-create [options]

Create many users from a CSV, each scoped to permission groups (dry-run unless
--confirm)

Options:
  --file <path>           CSV with header:
                          email,first_name,last_name,role,permission_groups,department,job_role
  --organization <id>     Target organization id (default: inferred from the
                          tenant's permission groups)
  --confirm               Actually create the users. Without this flag the
                          command is a dry-run. (default: false)
  --no-register-identity  Create the users WITHOUT registering them in the
                          identity provider (sends register_identity: false) —
                          no IdP identity is provisioned and no invite emails
                          are sent. Register + invite them later with `dr users
                          register-identity --file <same csv>`.
  --json                  Output structured JSON instead of text (default:
                          false)
  --timeout <seconds>     Minimum whole-command budget in seconds. Default 30s
                          for one item; a batch gets 30s + 5s per call (capped
                          at 1800s). This is a floor, so it only ever widens
                          that budget; max 86400s
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  -h, --help              display help for command

dr users bulk-permissions

Usage: dr users bulk-permissions [options]

Apply many Permission-Manager grants from a CSV — data-table roles, element
roles, org roles, and data-access filters (header:
email,resource,type,ids,role,filter_values,filter_excluded). Dry-run unless
--confirm; --json on both paths.

Options:
  --file <csv>         CSV file to apply
  --confirm            Actually apply (without it, dry-run only) (default:
                       false)
  --json               Output structured JSON instead of text (default: false)
  --timeout <seconds>  Minimum whole-command budget in seconds. Default 30s for
                       one item; a batch gets 30s + 5s per call (capped at
                       1800s). This is a floor, so it only ever widens that
                       budget; max 86400s
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr users bulk-set-email

Usage: dr users bulk-set-email [options]

Change many users' login emails from a CSV (header: source,target). All sources
must belong to one organization (validated). Dry-run unless --confirm; --json
on both paths.

Options:
  --file <csv>         CSV file to apply
  --confirm            Actually apply (without it, dry-run only) (default:
                       false)
  --json               Output structured JSON instead of text (default: false)
  --timeout <seconds>  Minimum whole-command budget in seconds. Default 30s for
                       one item; a batch gets 30s + 5s per call (capped at
                       1800s). This is a floor, so it only ever widens that
                       budget; max 86400s
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr users bulk-set-email-notifications

Usage: dr users bulk-set-email-notifications [options]

Turn notification email on or off for every user in one organization.
Sync-service and support users are always skipped. Dry-run unless --confirm;
--json on both paths.

Options:
  --organization <id>  Organization id whose users are updated
  --enable             Turn email notifications ON for the users (default:
                       false)
  --disable            Turn email notifications OFF for the users (default:
                       false)
  --only-changed       Skip users already in the requested state (safe to
                       re-run) (default: false)
  --confirm            Actually apply (without it, dry-run only) (default:
                       false)
  --json               Output structured JSON instead of text (default: false)
  --timeout <seconds>  Minimum whole-command budget in seconds. Default 30s for
                       one item; a batch gets 30s + 5s per call (capped at
                       1800s). This is a floor, so it only ever widens that
                       budget; max 86400s
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr users can-login-as

Usage: dr users can-login-as [options]

List users the authenticated account is allowed to impersonate (django-loginas)

Options:
  --search <q>        Substring filter on name / email / org (default: "")
  --limit <n>         Maximum rows to render (default 50). Use --all to bypass.
                      (default: "50")
  --all               Fetch every page (overrides --limit) (default: false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users create

Usage: dr users create [options]

Create a new user in an organization (POST /api/it/users). Sends an invite
email + registers the identity by default; pass --no-invite to skip both.

Options:
  --email <e>            User email (required unless --payload-file)
  --organization <id>    Target organization id (required unless
                         --payload-file) (default: "0")
  --role <r>             Role (required unless --payload-file). Common values:
                         SUPER_ADMIN, ADMIN, DR_CONNECT_ADMIN, CONTRIBUTOR,
                         COLLABORATOR, VIEWER, MEMBER
  --first-name <s>       First name (optional)
  --last-name <s>        Last name (optional)
  --department <d>       Department enum, e.g. FINANCE_FPA, SALES, OTHER
                         (optional)
  --job-role <j>         Job role enum, e.g. CONTROLLER, TREASURER, OTHER
                         (optional)
  --is-sync-service      Mark the user as a sync-service account
                         (is_sync_service=true). Default false. (default:
                         false)
  --is-support-user      Mark the user as a support user
                         (is_support_user=true). Default false. (default:
                         false)
  --disable-emails       Do not send transactional emails to this user
                         (disable_emails=true). Default false. (default: false)
  --no-invite            Skip both the invite email and the auth-provider
                         identity registration (register_identity=false).
                         Default: register.
  --payload-file <path>  Path to a full JSON body — overrides every typed flag
                         above (the operator owns the body shape).
  --json                 Emit the structured CreateUserResult ({id, email,
                         alert}) instead of a summary (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr users get

Usage: dr users get [options] <user_id>

Get a single user's record by id

Arguments:
  user_id             user id (positive integer)

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users list

Usage: dr users list [options]

List users visible to the authenticated account (IT endpoint)

Options:
  --organization <id>            Filter to users in this organization id
                                 (client-side filter) (default: "0")
  --email-notifications <state>  Filter to users whose notification email is on
                                 or off (accepted: on, off)
  --json                         Output raw JSON instead of a table (default:
                                 false)
  -s, --server <key>             Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                                 DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                                 TEST-5, TEST-6, TEST-7, DEMO) or a full
                                 https://<host>.datarails.com URL. Required.
  --account <email>              Datarails account email (required when
                                 multiple identities are stored for the server)
  -h, --help                     display help for command

dr users me

Usage: dr users me [options]

Show the authenticated user's profile (server-side identity, not the JWT
claims)

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users permissions

Usage: dr users permissions [options] [command]

Manage a user's data-table roles and permission groups (requires the
use_new_table_perms product flag on the tenant)

Options:
  -h, --help                        display help for command

Commands:
  get [options] <user_id>           Show a user's org role and permission-group
                                    membership (per-table/element roles: see
                                    DR-51917 follow-ups)
  set-role [options] <user_id>      Change a user's organization role (dry-run
                                    unless --confirm)
  set-filters [options] <user_id>   Replace a user's row-level data-access
                                    filters from a JSON file (FULL replace;
                                    dry-run unless --confirm)
  grant-table [options]             Grant a data-table role to a user (dry-run
                                    unless --confirm)
  revoke-table [options]            Revoke a user's data-table access (dry-run
                                    unless --confirm)
  grant-element [options]           Grant an element role to a user —
                                    fileboxes, lookups, reports, dashboards,
                                    storyboards (dry-run unless --confirm)
  revoke-element [options]          Revoke a user's access to an element
                                    (dry-run unless --confirm)
  remove-group [options] <user_id>  Remove a user from a permission group
                                    (dry-run unless --confirm)
  help [command]                    display help for command

dr users permissions get

Usage: dr users permissions get [options] <user_id>

Show a user's org role and permission-group membership (per-table/element
roles: see DR-51917 follow-ups)

Arguments:
  user_id             user id (positive integer)

Options:
  --json              Output raw JSON instead of a summary (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users permissions grant-element

Usage: dr users permissions grant-element [options]

Grant an element role to a user — fileboxes, lookups, reports, dashboards,
storyboards (dry-run unless --confirm)

Options:
  --type <type>       element type:
                      dashboard|storyboard|filebox|lookup|model|report|datasource
  --email <email>     target user email
  --id <id>           element id (repeatable, or comma-separated) (default: [])
  --role <ROLE>       role name (e.g. OWNER, VIEWER)
  --confirm           Actually apply the change (default is dry-run) (default:
                      false)
  --json              Output structured JSON instead of text (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users permissions grant-table

Usage: dr users permissions grant-table [options]

Grant a data-table role to a user (dry-run unless --confirm)

Options:
  --email <email>     target user email
  --table <id>        table template id (repeatable, or comma-separated)
                      (default: [])
  --role <ROLE>       table role name (e.g. OWNER, VIEWER)
  --confirm           Actually apply the change (default is dry-run) (default:
                      false)
  --json              Output structured JSON instead of text (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users permissions remove-group

Usage: dr users permissions remove-group [options] <user_id>

Remove a user from a permission group (dry-run unless --confirm)

Arguments:
  user_id             user id (positive integer)

Options:
  --group <id>        permission group id to remove
  --confirm           Actually apply the change (default is dry-run) (default:
                      false)
  --json              Output structured JSON instead of text (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users permissions revoke-element

Usage: dr users permissions revoke-element [options]

Revoke a user's access to an element (dry-run unless --confirm)

Options:
  --type <type>       element type:
                      dashboard|storyboard|filebox|lookup|model|report|datasource
  --email <email>     target user email
  --id <id>           element id (repeatable, or comma-separated) (default: [])
  --confirm           Actually apply the change (default is dry-run) (default:
                      false)
  --json              Output structured JSON instead of text (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users permissions revoke-table

Usage: dr users permissions revoke-table [options]

Revoke a user's data-table access (dry-run unless --confirm)

Options:
  --email <email>     target user email
  --table <id>        table template id (repeatable, or comma-separated)
                      (default: [])
  --confirm           Actually apply the change (default is dry-run) (default:
                      false)
  --json              Output structured JSON instead of text (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users permissions set-filters

Usage: dr users permissions set-filters [options] <user_id>

Replace a user's row-level data-access filters from a JSON file (FULL replace;
dry-run unless --confirm)

Arguments:
  user_id             user id (positive integer)

Options:
  --file <path>       JSON: an array (or {"new_filters":[...]}) of
                      {field:<FlatTableField id>, values:[...],
                      is_excluded?:bool}. An empty array clears all filters.
  --confirm           Actually apply the change (default is dry-run) (default:
                      false)
  --json              Output structured JSON instead of text (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users permissions set-role

Usage: dr users permissions set-role [options] <user_id>

Change a user's organization role (dry-run unless --confirm)

Arguments:
  user_id             user id (positive integer)

Options:
  --role <ROLE>       org role name: VIEWER, CONTRIBUTOR, COLLABORATOR, ADMIN,
                      SUPER_ADMIN
  --confirm           Actually apply the change (default is dry-run) (default:
                      false)
  --json              Output structured JSON instead of text (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users register-identity

Usage: dr users register-identity [options]

Register + invite users that were bulk-created with --no-register-identity.
Re-reads the SAME CSV, resolves each email to its user, and calls PUT
/api/it/users/<id>/register_identity per row. Dry-run unless --confirm; per-row
isolation (non-zero exit only if a row failed).

Options:
  --file <csv>         the same CSV used with bulk-create
                       --no-register-identity
  --confirm            Actually register (without it, dry-run only) (default:
                       false)
  --json               Output structured JSON instead of text (default: false)
  --timeout <seconds>  Minimum whole-command budget in seconds. Default 30s for
                       one item; a batch gets 30s + 5s per call (capped at
                       1800s). This is a floor, so it only ever widens that
                       budget; max 86400s
  -s, --server <key>   Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                       TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                       TEST-7, DEMO) or a full https://<host>.datarails.com
                       URL. Required.
  --account <email>    Datarails account email (required when multiple
                       identities are stored for the server)
  -h, --help           display help for command

dr users set-email

Usage: dr users set-email [options] <user_id> <new_email>

Change a user's login email (dry-run unless --confirm; uses the same PUT
/api/it/users/<id> the admin UI uses)

Arguments:
  user_id             user id (positive integer)
  new_email           the new login email

Options:
  --confirm           Actually change the email. Without this flag the command
                      is a dry-run. (default: false)
  --json              Emit JSON (indented on the dry-run path) (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users set-email-notifications

Usage: dr users set-email-notifications [options] <user_id>

Turn a user's notification email on or off (the admin form's "Enable
notifications" toggle). Dry-run unless --confirm.

Arguments:
  user_id             user id (positive integer)

Options:
  --enable            Turn email notifications ON for the user (default: false)
  --disable           Turn email notifications OFF for the user (default:
                      false)
  --confirm           Actually apply the change. Without this flag the command
                      is a dry-run. (default: false)
  --json              Emit JSON (indented on the dry-run path) (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr users set-password

Usage: dr users set-password [options] <user_id>

Set a new password for a sync-service user (interactive hidden prompt; refuses
non-sync accounts)

Arguments:
  user_id             user id (positive integer)

Options:
  --json              Emit a single-line JSON success record (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr validate

Usage: dr validate [options] [command]

Validate Datarails-generated artifacts against source files

Options:
  -h, --help      display help for command

Commands:
  onboarding      onboarding mapping validation — reconcile a customer report
                  against the Datarails export mid-onboarding (NOT the MEC `dr
                  reconciliation` close group)
  help [command]  display help for command

dr validate onboarding

Usage: dr validate onboarding [options] [command]

onboarding mapping validation — reconcile a customer report against the
Datarails export mid-onboarding (NOT the MEC `dr reconciliation` close group)

Options:
  -h, --help                        display help for command

Commands:
  session                           Manage validation sessions
  files                             Upload files into a session
  reconcile [options] <session_id>  Kick off reconcile + investigation in the
                                    background (fast-return)
  status [options] <session_id>     Poll reconcile + investigation status
                                    (one-liner; --json adds a summary status)
  result [options] <session_id>     Fetch the final investigation report (or
                                    raw reconcile with --reconcile)
  report [options] <session_id>     Render the investigation result as a
                                    self-contained HTML report (or --emit-data
                                    for the raw data block the agent enriches)
  help [command]                    display help for command

dr validate onboarding files

Usage: dr validate onboarding files [options] [command]

Upload files into a session

Options:
  -h, --help                     display help for command

Commands:
  upload [options] <session_id>  Upload one or more source files in a single
                                 call. Repeat --file for each file. The service
                                 classifies each file's role (client report,
                                 Datarails report, CoA, GL/transactions, trial
                                 balance, ...) automatically — you don't tag
                                 them here.
  help [command]                 display help for command
dr validate onboarding files upload
Usage: dr validate onboarding files upload [options] <session_id>

Upload one or more source files in a single call. Repeat --file for each file.
The service classifies each file's role (client report, Datarails report, CoA,
GL/transactions, trial balance, ...) automatically — you don't tag them here.

Arguments:
  session_id          session id

Options:
  -f, --file <path>   Path to a workbook (.xlsx/.xlsm/.xls/.xlsb/.csv). Repeat
                      for each file. (default: [])
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr validate onboarding reconcile

Usage: dr validate onboarding reconcile [options] <session_id>

Kick off reconcile + investigation in the background (fast-return)

Arguments:
  session_id            session id

Options:
  --report-type <type>  "P&L" or "BS"
  --period <label>      Reporting period label (optional, free-form — e.g.
                        'FY2024') (default: "")
  --csm-notes <notes>   Optional CSM notes (default: "")
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr validate onboarding report

Usage: dr validate onboarding report [options] <session_id>

Render the investigation result as a self-contained HTML report (or --emit-data
for the raw data block the agent enriches)

Arguments:
  session_id                session id

Options:
  --emit-data               Emit the faithful data block as JSON instead of
                            HTML (default: false)
  --prose <path>            Apply an agent prose overlay (JSON) before
                            rendering (default: "")
  --out <path>              Output path (.json for --emit-data, .html for
                            render) (default: "")
  --from-json <path>        Build from a saved `result --json` payload instead
                            of fetching (default: "")
  --org <name>              Customer/org display name for the header (default:
                            "")
  --client-report-name <s>  Client report display name (default: "")
  --client-report-ref <s>   Client report reference (e.g. "Filebox 595419 ·
                            v1") (default: "")
  --dr-report-name <s>      Datarails report display name (default: "")
  --dr-report-ref <s>       Datarails report reference (default: "")
  --report-type <type>      Override "P&L" | "BS" (else inferred from the
                            session) (default: "")
  -s, --server <key>        Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                            DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                            TEST-5, TEST-6, TEST-7, DEMO) or a full
                            https://<host>.datarails.com URL. Required.
  --account <email>         Datarails account email (required when multiple
                            identities are stored for the server)
  -h, --help                display help for command

dr validate onboarding result

Usage: dr validate onboarding result [options] <session_id>

Fetch the final investigation report (or raw reconcile with --reconcile)

Arguments:
  session_id          session id

Options:
  --json              Emit full structured JSON (default: false)
  --reconcile         Fetch the raw reconcile-only report instead of the
                      investigation (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr validate onboarding session

Usage: dr validate onboarding session [options] [command]

Manage validation sessions

Options:
  -h, --help                     display help for command

Commands:
  create [options]               Create a new session and print the session_id
  get [options] <session_id>     Fetch a session's metadata + lifecycle status
  delete [options] <session_id>  Delete a session and its uploaded files
                                 (two-step confirm)
  help [command]                 display help for command
dr validate onboarding session create
Usage: dr validate onboarding session create [options]

Create a new session and print the session_id

Options:
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command
dr validate onboarding session delete
Usage: dr validate onboarding session delete [options] <session_id>

Delete a session and its uploaded files (two-step confirm)

Arguments:
  session_id               session id

Options:
  --confirm-token <token>  Token from a prior plan run — required to actually
                           delete (default: "")
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command
dr validate onboarding session get
Usage: dr validate onboarding session get [options] <session_id>

Fetch a session's metadata + lifecycle status

Arguments:
  session_id          session id

Options:
  --json              Emit the full payload as JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr validate onboarding status

Usage: dr validate onboarding status [options] <session_id>

Poll reconcile + investigation status (one-liner; --json adds a summary status)

Arguments:
  session_id          session id

Options:
  --json              Emit the polling subset (incl. synthesized status) as
                      JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr whoami

Usage: dr whoami [options]

whoami decodes the locally-stored JWT for a server and prints the identity
claims (user_id, username, email, expiration). Offline, except that an api-key
identity holding no token its current key minted is exchanged once to obtain
one.

Options:
  --json              Output the full claims map as JSON (default: false)
  --verbose           Print every claim in a table, sorted alphabetically
                      (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr widgets

Usage: dr widgets|widget [options] [command]

Operations on Datarails dashboard widgets

Options:
  -h, --help                          display help for command

Commands:
  list [options]                      List widgets on a dashboard
  get [options] <id>                  Get a single widget from a dashboard
  data [options] <id>                 Fetch data for a widget (PUT-and-poll).
                                      Applies the dashboard's saved filter bar
                                      and date picker by default, matching what
                                      the product displays.
  create [options]                    Create a widget from a JSON file (power
                                      mode). For flag-driven creators, see
                                      widgets chart/kpi/pie/table/text.
  update [options] <id>               Update a widget from a JSON file (full
                                      body)
  set-currency-symbol [options] <id>  Set a widget's currency symbol the way
                                      the widget editor's symbol dropdown does.
                                      --auto follows the dashboard FX selector
                                      (options.autoCurrencySymbol=true; offered
                                      on currency-aware widgets only — see fx
                                      convert-widgets); --none shows no sign
                                      (clears Auto and strips the fixed $ € £ ₪
                                      from the number format); --sign <S> pins
                                      one fixed sign as the format's leading
                                      literal (clears Auto). Read-modify-write
                                      of the widget body (PUT
                                      /api/dashboards/<d>/widgets/<w>); the
                                      echo is verified.
  delete [options] <id>               Delete a widget (two-step confirm)
  chart [options]                     Create a chart widget
                                      (column|bar|line|area + modifiers)
  kpi [options]                       Create a single-tile KPI widget (headline
                                      number)
  pie [options]                       Create a pie-chart widget
  table [options]                     Create a pivot-table widget
                                      (chart_type=table_only)
  gauge [options]                     Create a gauge widget (--type enhanced |
                                      dynamic-goal)
  waterfall [options]                 Create a waterfall widget (--type
                                      breakdown | walkthrough)
  published-item [options]            Create a widget referencing an existing
                                      published item — NOT IMPLEMENTED YET;
                                      throws and points at `widgets create
                                      --file`
  text [options]                      Add a rich-text widget (section header)
                                      to a dashboard
  help [command]                      display help for command

dr widgets chart

Usage: dr widgets chart [options]

Create a chart widget (column|bar|line|area + modifiers)

Options:
  -d, --dashboard <id>   dashboard id
  --template <id>        template id
  --name <s>             widget display name
  --title <s>            chart title (defaults to --name) (default: "")
  --type <t>             chart family or composite preset (default: "column")
  --stacked              stacked variant (column/bar/area) (default: false)
  --percent              percent stacked (requires --stacked) (default: false)
  --smooth               smooth line variant (line only) (default: false)
  --group-by <field...>  row dimension(s), repeatable (default: [])
  --time-by <field...>   column dimension(s), repeatable (default: [])
  --value-field <name>   field name to aggregate
  --agg <agg>            SUM|COUNT|COUNT_UNIQUE|AVG|MIN|MAX (default: "SUM")
  --format <preset>      value format (money|integer|percent|...) (default:
                         "money")
  --filter <kv...>       include filter "Field=V1,V2", repeatable (default: [])
  --exclude <kv...>      exclude filter "Field=V1,V2", repeatable (default: [])
  --contains <kv...>     substring filter "Field=needle", repeatable (default:
                         [])
  --date-filter <kv...>  date frame "Field=last-N-quarter", repeatable
                         (default: [])
  -x, --x <n>            grid column (default: "0")
  -y, --y <n>            grid row (default: "0")
  --width <n>            grid width (1..12) (default: "6")
  --height <n>           grid height (default: "4")
  --json                 Output raw JSON (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr widgets create

Usage: dr widgets create [options]

Create a widget from a JSON file (power mode). For flag-driven creators, see
widgets chart/kpi/pie/table/text.

Options:
  -d, --dashboard <id>  dashboard id (positive integer)
  --file <path>         Path to widget JSON file
  --json                Output raw JSON instead of a summary (default: false)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr widgets data

Usage: dr widgets data [options] <id>

Fetch data for a widget (PUT-and-poll). Applies the dashboard's saved filter
bar and date picker by default, matching what the product displays.

Arguments:
  id                      widget id (positive integer)

Options:
  -d, --dashboard <id>    dashboard id (positive integer)
  --cols <list>           Comma-separated column names (default: "")
  --no-dashboard-context  Ignore the dashboard's filter bar and date picker;
                          compute from the widget's own saved settings only
  --json                  Output raw JSON instead of a summary (default: false)
  -s, --server <key>      Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                          TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                          TEST-7, DEMO) or a full https://<host>.datarails.com
                          URL. Required.
  --account <email>       Datarails account email (required when multiple
                          identities are stored for the server)
  -h, --help              display help for command

dr widgets delete

Usage: dr widgets delete [options] <id>

Delete a widget (two-step confirm)

Arguments:
  id                     widget id (positive integer)

Options:
  -d, --dashboard <id>   dashboard id (positive integer)
  --confirm-token <tok>  Token from a prior plan run — required to actually
                         delete
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr widgets gauge

Usage: dr widgets gauge [options]

Create a gauge widget (--type enhanced | dynamic-goal)

Options:
  -d, --dashboard <id>   dashboard id
  --template <id>        template id
  --name <s>             widget display name
  --title <s>            chart title (defaults to --name) (default: "")
  --type <t>             gauge variant: enhanced (single value vs target) |
                         dynamic-goal (split goal by --time-by) (default:
                         "enhanced")
  --time-by <field...>   column dimension (required for --type dynamic-goal,
                         exactly one) (default: [])
  --value-field <name>   field name to aggregate
  --agg <agg>            SUM|COUNT|COUNT_UNIQUE|AVG|MIN|MAX (default: "SUM")
  --format <preset>      value format (money|integer|percent|...) (default:
                         "money")
  --filter <kv...>       include filter "Field=V1,V2", repeatable (default: [])
  --exclude <kv...>      exclude filter "Field=V1,V2", repeatable (default: [])
  --contains <kv...>     substring filter "Field=needle", repeatable (default:
                         [])
  --date-filter <kv...>  date frame "Field=last-N-quarter", repeatable
                         (default: [])
  -x, --x <n>            grid column (default: "0")
  -y, --y <n>            grid row (default: "0")
  --width <n>            grid width (1..12) (default: "6")
  --height <n>           grid height (default: "4")
  --json                 Output raw JSON (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr widgets get

Usage: dr widgets get [options] <id>

Get a single widget from a dashboard

Arguments:
  id                    widget id (positive integer)

Options:
  -d, --dashboard <id>  dashboard id (positive integer)
  --json                Output raw JSON instead of a summary (default: false)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr widgets kpi

Usage: dr widgets kpi [options]

Create a single-tile KPI widget (headline number)

Options:
  -d, --dashboard <id>   dashboard id
  --template <id>        template id
  --name <s>             widget display name
  --title <s>            chart title (defaults to --name) (default: "")
  --value-field <name>   field name to aggregate
  --agg <agg>            SUM|COUNT|COUNT_UNIQUE|UNIQUE_VALUES|AVG|MIN|MAX
                         (default: "SUM")
  --format <preset>      value format (money|integer|percent|...) (default:
                         "money")
  --filter <kv...>       include filter "Field=V1,V2", repeatable (default: [])
  --exclude <kv...>      exclude filter "Field=V1,V2", repeatable (default: [])
  --contains <kv...>     substring filter, repeatable (default: [])
  --date-filter <kv...>  date frame, repeatable (default: [])
  -x, --x <n>            grid column (default: "0")
  -y, --y <n>            grid row (default: "0")
  --width <n>            grid width (default 2 — KPI tile) (default: "2")
  --height <n>           grid height (default 3 — KPI tile) (default: "3")
  --json                 Output raw JSON (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr widgets list

Usage: dr widgets list [options]

List widgets on a dashboard

Options:
  -d, --dashboard <id>  dashboard id (positive integer)
  --json                Output raw JSON instead of a table (default: false)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr widgets pie

Usage: dr widgets pie [options]

Create a pie-chart widget

Options:
  -d, --dashboard <id>   dashboard id
  --template <id>        template id
  --name <s>             widget display name
  --title <s>            chart title (defaults to --name) (default: "")
  --group-by <field>     dimension field name
  --value-field <name>   value field name to aggregate
  --agg <agg>            SUM|COUNT|COUNT_UNIQUE|AVG|MIN|MAX (default: "SUM")
  --format <preset>      value format (default: "money")
  --drilldown            use pie-chart-drilldown variant (default: false)
  --filter <kv...>       include filter, repeatable (default: [])
  --exclude <kv...>      exclude filter, repeatable (default: [])
  --contains <kv...>     substring filter, repeatable (default: [])
  --date-filter <kv...>  date frame, repeatable (default: [])
  -x, --x <n>            grid column (default: "0")
  -y, --y <n>            grid row (default: "0")
  --width <n>            grid width (default: "6")
  --height <n>           grid height (default: "4")
  --json                 Output raw JSON (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr widgets published-item

Usage: dr widgets published-item [options]

Create a widget referencing an existing published item — NOT IMPLEMENTED YET;
throws and points at `widgets create --file`

Options:
  -d, --dashboard <id>  dashboard id
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr widgets set-currency-symbol

Usage: dr widgets set-currency-symbol [options] <id>

Set a widget's currency symbol the way the widget editor's symbol dropdown
does. --auto follows the dashboard FX selector
(options.autoCurrencySymbol=true; offered on currency-aware widgets only — see
fx convert-widgets); --none shows no sign (clears Auto and strips the fixed $ €
£ ₪ from the number format); --sign <S> pins one fixed sign as the format's
leading literal (clears Auto). Read-modify-write of the widget body (PUT
/api/dashboards/<d>/widgets/<w>); the echo is verified.

Arguments:
  id                    widget id (positive integer)

Options:
  -d, --dashboard <id>  dashboard id (positive integer)
  --auto                Follow the dashboard FX selector (currency-aware
                        widgets only) (default: false)
  --none                No currency sign (default: false)
  --sign <S>            One fixed sign: $ € £ ₪, or a code such as CHF
  --json                Output a structured JSON result instead of a summary
                        (default: false)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr widgets table

Usage: dr widgets table [options]

Create a pivot-table widget (chart_type=table_only)

Options:
  -d, --dashboard <id>   dashboard id
  --template <id>        template id
  --name <s>             widget display name
  --title <s>            chart title (defaults to --name) (default: "")
  --group-by <field...>  row dimension(s), repeatable (default: [])
  --time-by <field...>   column dimension(s), repeatable (default: [])
  --value-field <name>   value field name to aggregate
  --agg <agg>            SUM|COUNT|COUNT_UNIQUE|AVG|MIN|MAX (default: "SUM")
  --format <preset>      value format (default: "money")
  --filter <kv...>       include filter, repeatable (default: [])
  --exclude <kv...>      exclude filter, repeatable (default: [])
  --contains <kv...>     substring filter, repeatable (default: [])
  --date-filter <kv...>  date frame, repeatable (default: [])
  -x, --x <n>            grid column (default: "0")
  -y, --y <n>            grid row (default: "0")
  --width <n>            grid width (default: "6")
  --height <n>           grid height (default: "4")
  --json                 Output raw JSON (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr widgets text

Usage: dr widgets text [options]

Add a rich-text widget (section header) to a dashboard

Options:
  -d, --dashboard <id>  dashboard id
  --name <s>            display name (internal; the header text itself is
                        --text) (default: "")
  --text <s>            header text (plain text or HTML)
  -x, --x <n>           grid column (default: "0")
  -y, --y <n>           grid row (default: "0")
  --width <n>           grid width (1..12, default 12) (default: "12")
  --height <n>          grid height (default 3) (default: "3")
  --json                Output raw JSON (default: false)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr widgets update

Usage: dr widgets update [options] <id>

Update a widget from a JSON file (full body)

Arguments:
  id                    widget id (positive integer)

Options:
  -d, --dashboard <id>  dashboard id (positive integer)
  --file <path>         Path to widget JSON file
  --json                Output raw JSON instead of a summary (default: false)
  -s, --server <key>    Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                        TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                        TEST-7, DEMO) or a full https://<host>.datarails.com
                        URL. Required.
  --account <email>     Datarails account email (required when multiple
                        identities are stored for the server)
  -h, --help            display help for command

dr widgets waterfall

Usage: dr widgets waterfall [options]

Create a waterfall widget (--type breakdown | walkthrough)

Options:
  -d, --dashboard <id>   dashboard id
  --template <id>        template id
  --name <s>             widget display name
  --title <s>            chart title (defaults to --name) (default: "")
  --type <t>             waterfall variant: breakdown (rows×cols) | walkthrough
                         (cols only) (default: "breakdown")
  --group-by <field...>  row dimension (required for --type breakdown, exactly
                         one) (default: [])
  --time-by <field...>   column dimension (the axis the waterfall walks across,
                         exactly one)
  --value-field <name>   field name to aggregate
  --agg <agg>            SUM|COUNT|COUNT_UNIQUE|AVG|MIN|MAX (default: "SUM")
  --format <preset>      value format (money|integer|percent|...) (default:
                         "money")
  --filter <kv...>       include filter "Field=V1,V2", repeatable (default: [])
  --exclude <kv...>      exclude filter "Field=V1,V2", repeatable (default: [])
  --contains <kv...>     substring filter "Field=needle", repeatable (default:
                         [])
  --date-filter <kv...>  date frame "Field=last-N-quarter", repeatable
                         (default: [])
  -x, --x <n>            grid column (default: "0")
  -y, --y <n>            grid row (default: "0")
  --width <n>            grid width (1..12) (default: "6")
  --height <n>           grid height (default: "4")
  --json                 Output raw JSON (default: false)
  -s, --server <key>     Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                         TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                         TEST-7, DEMO) or a full https://<host>.datarails.com
                         URL. Required.
  --account <email>      Datarails account email (required when multiple
                         identities are stored for the server)
  -h, --help             display help for command

dr workflow

Usage: dr workflow [options] [command]

Datarails workflows v2 (non-MEC) — templates, processes, steps, tasks, members

Options:
  -h, --help                 display help for command

Commands:
  list [options]             List workflow templates the caller can see
  get [options] <id>         Show a workflow template by id (`GET
                             /process_templates/<id>`)
  process                    Workflow process instances (running periods)
  step                       Workflow steps
  task                       Workflow tasks (file + checklist)
  member                     Workflow members and per-member doc-permission
                             checks
  group                      Workflow groups
  create [options]           Create a new workflow template (always starts
                             INACTIVE)
  update [options] <id>      Edit a workflow template (PUT
                             /process_templates/<id>)
  activate [options] <id>    Activate a workflow template
  deactivate [options] <id>  Deactivate a workflow template
  archive [options] <id>     Archive a workflow template (soft-delete;
                             restorable).
  restore [options] <id>     Restore an archived workflow template.
  delete [options] <id>      Alias for `archive` — soft-deletes (no v2
                             hard-delete endpoint exists).
  clone [options] <id>       Clone a workflow template into a new process
                             instance
  help [command]             display help for command

dr workflow activate

Usage: dr workflow activate [options] <id>

Set is_active=true. WILL fire async email notifications to assignees on every
step whose notify_automatically=true. Requires --yes-share-data when any such
step has tasks.

Arguments:
  id                       numeric workflow template id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command

dr workflow archive

Usage: dr workflow archive [options] <id>

Archive a workflow template (soft-delete; restorable).

Arguments:
  id                       numeric workflow template id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow clone

Usage: dr workflow clone [options] <id>

Create a new instance of an existing template (e.g. April → May).

Existing members carry over to the new instance — requires
--yes-share-data in addition to the confirm token.

--copy-from defaults to the template’s newest instance by date_tag.
Without --name the server derives the period label for the new
instance (e.g. "September 2026").

Arguments:
  id                        numeric workflow template id

Options:
  --date-tag <unix>         Unix-seconds date_tag for the new instance
  --copy-from <process-id>  Existing instance to copy from (default: newest)
  --name <text>             Name for the new instance (default: server-derived
                            period label)
  --start-time <unix>       Unix-seconds start time for the new instance
  --tag <id=value>          Additional non-date dimension tag, e.g. --tag
                            12=Q3-Plan. Repeatable.
  --json                    Output the new instance as JSON (default: false)
  --confirm-token <token>   Token from a prior plan step
  -s, --server <key>        Server key (US, US2, UK, CA, EU, STUDIO, DEV,
                            DEV-1, TEST, TEST-1, TEST-2, TEST-3, TEST-4,
                            TEST-5, TEST-6, TEST-7, DEMO) or a full
                            https://<host>.datarails.com URL. Required.
  --account <email>         Datarails account email (required when multiple
                            identities are stored for the server)
  --yes-share-data          Acknowledge that this operation grants data access
                            to a new audience (separate from --confirm-token;
                            required for member/group writes, bulk grants, and
                            activating a workflow whose steps cascade
                            notifications).
  -h, --help                display help for command

dr workflow create

Usage: dr workflow create [options]

Create a workflow template (`POST /api/processes/v2/process_templates`).

The new template is always created with is_active=false; no
notifications fire until `dr workflow activate` is run separately.
Two-step confirm: token-bound, scoped to the SHA-12 of the payload.

Options:
  --file <path>            Path to a JSON file matching the template-create
                           shape
  --json                   Output the created template as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow deactivate

Usage: dr workflow deactivate [options] <id>

Set is_active=false. No notifications fire.

Arguments:
  id                       numeric workflow template id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow delete

Usage: dr workflow delete [options] <id>

Alias for `archive` — soft-deletes (no v2 hard-delete endpoint exists).

Arguments:
  id                       numeric workflow template id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow get

Usage: dr workflow get [options] <id>

Show a workflow template by id (`GET /process_templates/<id>`)

Arguments:
  id                  numeric workflow template id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr workflow group

Usage: dr workflow group [options] [command]

Workflow groups

Options:
  -h, --help                                 display help for command

Commands:
  list [options] <template-id>               List groups with access to a workflow template
  add [options] <template-id>                Add group(s) to a workflow template
  update [options] <template-id> <group-id>  Change a group's role on a workflow template
  remove [options] <template-id> <group-id>  Remove a group from a workflow template
  grant-bulk [options]                       Bulk-grant a role to many groups across many workflows
  help [command]                             display help for command

dr workflow group add

Usage: dr workflow group add [options] <template-id>

Add group(s) to a workflow template

Arguments:
  template-id              numeric workflow template id

Options:
  --file <path>            JSON array of {permission_group, role}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command

dr workflow group grant-bulk

Usage: dr workflow group grant-bulk [options]

POST /api/processes/groups/grant_permissions_bulk.

WARNING: server cascades table permissions for linked LUT
templates. Requires --yes-share-data.

Options:
  --file <path>            JSON file with {permission_groups, entities_ids,
                           role}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command

dr workflow group list

Usage: dr workflow group list [options] <template-id>

List groups with access to a workflow template

Arguments:
  template-id         numeric workflow template id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr workflow group remove

Usage: dr workflow group remove [options] <template-id> <group-id>

Remove a group from a workflow template

Arguments:
  template-id              numeric workflow template id
  group-id                 numeric permission-group id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow group update

Usage: dr workflow group update [options] <template-id> <group-id>

Change a group's role on a workflow template

Arguments:
  template-id              numeric workflow template id
  group-id                 numeric permission-group id

Options:
  --role <role>            WORKFLOW_V2_OWNER_ROLE or WORKFLOW_V2_EDITOR_ROLE
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command

dr workflow list

Usage: dr workflow list [options]

List workflow templates (`GET /api/processes/v2/process_templates`).

Defaults to non-archived, non-MEC workflows. Use --archived to view
archived templates and --planning to view planning-module templates.

Options:
  --archived          Show archived templates instead of active ones (default:
                      false)
  --planning          Include only planning-module templates (default: false)
  --json              Output raw JSON instead of a table (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr workflow member

Usage: dr workflow member [options] [command]

Workflow members and per-member doc-permission checks

Options:
  -h, --help                                display help for command

Commands:
  list [options] <template-id>              List members of a workflow template
  check [options] <template-id>             Pre-check missing doc permissions for emails (read-only)
  add [options] <template-id>               Add member(s) to a workflow template (sharing op)
  update [options] <template-id> <user-id>  Change a member's role on a workflow template
  remove [options] <template-id> <user-id>  Remove a member from a workflow template
  grant-bulk [options]                      Bulk-grant a role to many emails across many workflows
  help [command]                            display help for command

dr workflow member add

Usage: dr workflow member add [options] <template-id>

Add members to a workflow template (`POST /process_templates/<tid>/users`).

Runs the documented pre-share permission audit first (PUT
/users/check) so the plan-step shows which documents each
email is missing access to. Requires --yes-share-data.

Arguments:
  template-id              numeric workflow template id

Options:
  --file <path>            JSON file with {emails, role}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command

dr workflow member check

Usage: dr workflow member check [options] <template-id>

Run the workflow-add pre-share audit without granting anything.

Calls `PUT /process_templates/<tid>/users/check` — server is idempotent
and returns per-email diagnostics of which documents the address
cannot yet access. Useful as a dry-run before `workflow member add`
(which lands in a later phase).

Arguments:
  template-id         numeric workflow template id

Options:
  --emails <list>     Comma-separated email addresses
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr workflow member grant-bulk

Usage: dr workflow member grant-bulk [options]

POST /api/processes/users/grant_permissions_bulk.

WARNING: server cascades table permissions for linked LUT
templates. Requires --yes-share-data.

Options:
  --file <path>            JSON file with {emails, entities_ids, role}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command

dr workflow member list

Usage: dr workflow member list [options] <template-id>

List members of a workflow template

Arguments:
  template-id         numeric workflow template id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr workflow member remove

Usage: dr workflow member remove [options] <template-id> <user-id>

Remove a member from a workflow template

Arguments:
  template-id              numeric workflow template id
  user-id                  numeric user id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow member update

Usage: dr workflow member update [options] <template-id> <user-id>

Change a member's role on a workflow template

Arguments:
  template-id              numeric workflow template id
  user-id                  numeric user id

Options:
  --role <role>            WORKFLOW_V2_OWNER_ROLE, WORKFLOW_V2_EDITOR_ROLE, or
                           a numeric role id (see ROLE_ID in `workflow member
                           list`)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  --yes-share-data         Acknowledge that this operation grants data access
                           to a new audience (separate from --confirm-token;
                           required for member/group writes, bulk grants, and
                           activating a workflow whose steps cascade
                           notifications).
  -h, --help               display help for command

dr workflow process

Usage: dr workflow process [options] [command]

Workflow process instances (running periods)

Options:
  -h, --help             display help for command

Commands:
  list [options]         List process instances (`GET /api/processes/v2`)
  get [options] <id>     Show a process instance with embedded steps
  delete [options] <id>  Delete a process instance (cascades to all its tasks)
  help [command]         display help for command

dr workflow process delete

Usage: dr workflow process delete [options] <id>

Delete a process instance (cascades to all its tasks)

Arguments:
  id                       numeric process instance id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow process get

Usage: dr workflow process get [options] <id>

Show a process instance with embedded steps

Arguments:
  id                  numeric process instance id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr workflow process list

Usage: dr workflow process list [options]

List process instances (`GET /api/processes/v2`)

Options:
  --template <id>     Filter to a single template id
  --active            Filter to active instances only
  --inactive          Filter to inactive instances only
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr workflow restore

Usage: dr workflow restore [options] <id>

Restore an archived workflow template.

Arguments:
  id                       numeric workflow template id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow step

Usage: dr workflow step [options] [command]

Workflow steps

Options:
  -h, --help                               display help for command

Commands:
  get [options] <process-id> <step-id>     Show a step with embedded tasks (`GET /processes/v2/<pid>/step/<sid>`)
  create [options] <process-id>            Create a new step on a process instance
  update [options] <process-id> <step-id>  Edit a step
  delete [options] <process-id> <step-id>  Delete a step (cascades to all its tasks)
  reorder [options] <template-id>          Reorder steps on a template
  help [command]                           display help for command

dr workflow step create

Usage: dr workflow step create [options] <process-id>

Create a new step on a process instance

Arguments:
  process-id               numeric process instance id

Options:
  --file <path>            JSON file matching the step-create shape
  --json                   Output the created step as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow step delete

Usage: dr workflow step delete [options] <process-id> <step-id>

Delete a step (cascades to all its tasks)

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow step get

Usage: dr workflow step get [options] <process-id> <step-id>

Show a step with embedded tasks (`GET /processes/v2/<pid>/step/<sid>`)

Arguments:
  process-id          numeric process instance id
  step-id             numeric step id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr workflow step reorder

Usage: dr workflow step reorder [options] <template-id>

Reorder steps on a template

Arguments:
  template-id              numeric template id

Options:
  --file <path>            JSON array of {id, index, y_index}
  --order <pairs>          Shorthand: "id:n,id2:n2,..." (mutually exclusive
                           with --file)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow step update

Usage: dr workflow step update [options] <process-id> <step-id>

Edit a step

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --file <path>            JSON file with partial step shape
  --json                   Output the updated step as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow task

Usage: dr workflow task [options] [command]

Workflow tasks (file + checklist)

Options:
  -h, --help                                             display help for command

Commands:
  list [options] <process-id> <step-id>                  List tasks on a step (derived client-side from `step get`)
  get [options] <process-id> <step-id> <task-id>         Show one task by id (derived client-side from `step get`)
  add-file [options] <process-id> <step-id>              Bulk-add filebox tasks to a step
  add-checklist [options] <process-id> <step-id>         Bulk-add checklist tasks to a step
  update [options] <process-id> <step-id>                Bulk-update tasks (file or non-file)
  update-one [options] <process-id> <step-id> <task-id>  Update a single checklist task by id
  delete [options] <process-id> <step-id>                Bulk-delete tasks (file or non-file) by id
  notify [options] <process-id> <step-id>                Send tasks to their assignees (fires async email)
  approve [options] <process-id> <step-id>               Approve a batch of tasks
  reject [options] <process-id> <step-id>                Reject a batch of tasks
  sign-off [options] <process-id> <step-id>              Mark tasks complete (or re-open with --is-sign-off false)
  help [command]                                         display help for command

dr workflow task add-checklist

Usage: dr workflow task add-checklist [options] <process-id> <step-id>

Bulk-add checklist tasks to a step

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --file <path>            JSON file (array) — see design doc for shape
  --json                   Output the created tasks as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow task add-file

Usage: dr workflow task add-file [options] <process-id> <step-id>

Bulk-add filebox tasks to a step

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --file <path>            JSON file (array) — see design doc for shape
  --json                   Output the created tasks as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow task approve

Usage: dr workflow task approve [options] <process-id> <step-id>

Approve a batch of tasks

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --file <path>            JSON file with {tasks, email?, resend?}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow task delete

Usage: dr workflow task delete [options] <process-id> <step-id>

Bulk-delete tasks (file or non-file) by id

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --ids <list>             Comma-separated task ids
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow task get

Usage: dr workflow task get [options] <process-id> <step-id> <task-id>

Show one task by id (derived client-side from `step get`)

Arguments:
  process-id          numeric process instance id
  step-id             numeric step id
  task-id             numeric task id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr workflow task list

Usage: dr workflow task list [options] <process-id> <step-id>

List tasks on a step (derived client-side from `step get`)

Arguments:
  process-id          numeric process instance id
  step-id             numeric step id

Options:
  --json              Output raw JSON (default: false)
  -s, --server <key>  Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                      TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5, TEST-6,
                      TEST-7, DEMO) or a full https://<host>.datarails.com URL.
                      Required.
  --account <email>   Datarails account email (required when multiple
                      identities are stored for the server)
  -h, --help          display help for command

dr workflow task notify

Usage: dr workflow task notify [options] <process-id> <step-id>

Send tasks to their assignees (fires async email)

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --type <type>            "file" or "non-file"
  --file <path>            JSON file with assignees + email blob
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow task reject

Usage: dr workflow task reject [options] <process-id> <step-id>

Reject a batch of tasks

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --file <path>            JSON file with {tasks, email?, resend?}
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow task sign-off

Usage: dr workflow task sign-off [options] <process-id> <step-id>

Mark tasks complete (or re-open with --is-sign-off false)

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --type <type>            "file" or "non-file"
  --ids <list>             Comma-separated task ids
  --is-sign-off <bool>     true (default) to complete, false to re-open
                           (default: "true")
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow task update

Usage: dr workflow task update [options] <process-id> <step-id>

Bulk-update tasks (file or non-file)

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id

Options:
  --type <type>            "file" or "non-file"
  --file <path>            JSON file (array)
  --json                   Output as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow task update-one

Usage: dr workflow task update-one [options] <process-id> <step-id> <task-id>

Update a single checklist task by id

Arguments:
  process-id               numeric process instance id
  step-id                  numeric step id
  task-id                  numeric checklist task id

Options:
  --file <path>            JSON file (single checklist row)
  --json                   Output the updated task as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command

dr workflow update

Usage: dr workflow update [options] <id>

Edit a workflow template (PUT /process_templates/<id>)

Arguments:
  id                       numeric workflow template id

Options:
  --file <path>            JSON file with the partial template shape
  --json                   Output the updated template as JSON (default: false)
  --confirm-token <token>  Token from a prior plan step
  -s, --server <key>       Server key (US, US2, UK, CA, EU, STUDIO, DEV, DEV-1,
                           TEST, TEST-1, TEST-2, TEST-3, TEST-4, TEST-5,
                           TEST-6, TEST-7, DEMO) or a full
                           https://<host>.datarails.com URL. Required.
  --account <email>        Datarails account email (required when multiple
                           identities are stored for the server)
  -h, --help               display help for command