Box CLIConfiguration files

Configuration files

The Box CLI reads and writes a small set of files in each box project. This page documents every one of them, plus the environment variables that influence the CLI’s behavior.

FileCommittable?Purpose
box.json✅ yes (no secrets)Box manifest: name, control plane, license metadata.
box.yml✅ yesDeploy manifest: public URLs and domains.
brand.json✅ yesConsole branding/theme declaration.
.box/credentials.json❌ neverSecrets: license key and npm token (mode 0600).
.npmrc❌ neverRegistry auth written by box auth.
dns.txt / nameserver.txtoptionalDNS instructions written by box deploy.

box.json

The box manifest: committable and free of secrets. Written by box create and extended by box auth.

box.json
{
  "name": "acme-bank",
  "org": "acme-bank",
  "controlPlaneUrl": "https://control.example.com",
  "webControlUrl": "https://beta.withpotter.site",
  "storefrontDomain": "shop.acme-bank.example",
  "engineUrl": "https://api.acme-bank.example",
  "consoleUrl": "https://app.acme-bank.example",
  "backOfficeUrl": "https://admin.acme-bank.example",
  "hostUrl": "https://acme-bank.example",
  "deployPipe": ["dockerfile", "compose", "github"],
  "license": {
    "customerId": "cus_xxxxxxxx",
    "tier": "growth",
    "registryUrl": "https://registry.example.com",
    "packages": ["@withpotter/engine-core", "@withpotter/pages-catalog"],
    "activatedAt": "2026-06-22T00:00:00.000Z"
  }
}
FieldTypeDescription
namestringThe box name.
orgstring?Organization name.
controlPlaneUrlstring?Control plane API URL for this box.
webControlUrlstring?Web control URL (drives NEXT_PUBLIC_WEB_URL).
storefrontDomainstring?Per-bank storefront base host.
engineUrlstring?Public engine (backend/API) URL. Set by box config --engine-url; drives BOX_ENGINE_URL and the default backend for box deploy --register-domains.
consoleUrlstring?Public console (merchant dashboard) URL. Drives BOX_CONSOLE_URL.
backOfficeUrlstring?Public back office (/admin platform console) URL. Drives BOX_BACK_OFFICE_URL.
hostUrlstring?Public host URL of the box. Drives BOX_HOST_URL.
deployPipestring[]?Default artifacts box deploy generates (subset of dockerfile, compose, github, terraform, railway).
licenseobject?License metadata written by box auth (no secrets).
license.customerIdstringThe box’s customer ID.
license.tierstringThe entitlement tier.
license.registryUrlstringThe entitled package registry URL.
license.packagesstring[]The entitled package names.
license.activatedAtstringISO timestamp of activation.

The license block is metadata only: it contains no secrets and is safe to commit. Secrets live in .box/credentials.json.

box.yml

The deploy manifest consumed by box deploy. It declares the box’s public URLs and the domains to register with the control plane resolver. It contains no secrets.

box.yml
backendUrl: https://api.acme-bank.example
frontendUrl: https://shop.acme-bank.example
dashboardUrl: https://admin.acme-bank.example
contactEmail: ops@acme-bank.example
payment:
  provider: olivepay
console:
  defaultTheme: light
domains:
  - host: acme-bank.example
    primary: true
  - host: '*.acme-bank.example'
    wildcard: true
FieldTypeDescription
backendUrlstring?Public backend (engine) URL. Used by box deploy --register-domains if not passed as a flag; falls back to box.json’s engineUrl.
frontendUrlstring?Public frontend URL.
dashboardUrlstring?Origin of the box dashboard, registered so the storefront’s Live Preview iframe can embed it (CSP frame-ancestors). Defaults to frontendUrl at deploy time; set explicitly only when the admin console is served from a different origin.
contactEmailstring?Email the control plane sends the DNS setup instructions to on registration (so you get dns.txt by email, not just stdout). Validated as an email address.
payment.providerstring?Pins the box’s payment gateway (e.g. olivepay). Read at build time so box.yml: not a hand-edited ENV PAYMENT_PROVIDER: is the single source that drives the engine composition.
console.defaultThemestring?Default console/storefront theme baked into the console build: light or dark.
domainsDeployDomain[]Required. At least one domain.

box.yml is the single build-time config source for the box: beyond routing, its payment.provider, console.defaultTheme, and the storefront base host derived from a wildcard domains entry all feed the generated deploy artifacts (Dockerfile / compose / Railway): no separate ENV edits or a box.json storefrontDomain are needed.

After a successful box deploy, any URL you pass explicitly is persisted back here: --backend-urlbackendUrl, and --frontend-urlfrontendUrl plus a matching entry in domains (and storefrontDomain in box.json). Comments and formatting in box.yml are preserved. Subsequent deploys can then omit those flags.

DeployDomain

FieldTypeDescription
hoststringRequired. The domain host. Normalized to lowercase; must be unique within domains.
primaryboolean?Marks the primary domain. At most one domain may be primary.
wildcardboolean?Marks the domain as a wildcard (e.g. *.acme-bank.example).
⚠️

Hosts are normalized to lowercase and must be unique. The manifest may declare at most one primary domain.

brand.json

The committable, secret-free branding declaration for the box’s console. box brand reads it and generates the console theme: a CSS-variable override file, the copied logo, and NEXT_PUBLIC_BOX_* env vars. box create ships a default one.

brand.json
{
  "name": "Box Dashboard",
  "logo": "assets/logo.svg",
  "favicon": "assets/mark.svg",
  "theme": {
    "colors": {
      "brand": "#2563eb",
      "accent": "#111827",
      "background": "#ffffff",
      "surface": "#f5f5f5",
      "text": "#111827",
      "link": "#2563eb",
      "success": "#16a34a"
    },
    "button": { "radius": "0.5rem" },
    "css": {},
    "dark": {
      "colors": { "brand": "#3b82f6", "accent": "#f3f4f6" }
    }
  }
}
FieldTypeDescription
namestring?Console display name → NEXT_PUBLIC_BOX_NAME.
logostring?Logo path relative to the box root → NEXT_PUBLIC_BOX_LOGO.
faviconstring?Square mark for the browser-tab favicon, relative to the box root → regenerates console/public/favicon.svg. Falls back to logo when omitted.
hideNameboolean?Hide the name text next to the logo → NEXT_PUBLIC_BOX_HIDE_NAME. Use when the logo already includes the wordmark.
theme.colorsobject?Friendly color aliases mapped to design-system CSS variables.
theme.button.radiusstring?Button/card corner radius → --radius.
theme.cssobject?Raw --token: value overrides (keys must start with --).
theme.darkobject?Dark-mode overrides (same shape), emitted under .dark.

See the box brand reference for the full color alias table and validation rules.

.box/credentials.json

The box’s secrets: written by box auth with file mode 0600 and git-ignored. Never commit this file.

.box/credentials.json
{
  "licenseKey": "pk_live_xxxxxxxx",
  "npmToken": "npm_xxxxxxxx"
}
FieldTypeDescription
licenseKeystring?The box’s license key.
npmTokenstring?The registry auth token.

.npmrc

Written by box auth to authenticate package installs against the entitled registry. Git-ignored. Never commit it.

dns.txt / nameserver.txt

box deploy writes dns.txt with the DNS records you must create for your registered domains. A legacy nameserver.txt is also written for backward compatibility. Both are git-ignored by the generated .gitignore.

Environment variables

VariableDefaultDescription
BOX_CONTROL_PLANE(none)Control plane API URL. Never baked into the CLI: supply it via this env var, the --control-plane flag, or box.json.
BOX_CONTROL_WEB_URLhttps://beta.withpotter.siteWeb control URL; drives NEXT_PUBLIC_WEB_URL.
BOX_STOREFRONT_DOMAIN(none)Per-bank storefront base host; drives NEXT_PUBLIC_STOREFRONT_DOMAIN.
BOX_ENGINE_URL(none)Public engine URL; overrides box.json’s engineUrl.
BOX_CONSOLE_URL(none)Public console URL; overrides box.json’s consoleUrl.
BOX_BACK_OFFICE_URL(none)Public back office URL; overrides box.json’s backOfficeUrl.
BOX_HOST_URL(none)Public host URL; overrides box.json’s hostUrl.

The four service-URL variables are set with box config and override the corresponding box.json fields at runtime.

Control plane URL resolution

When a command needs the control plane URL, it is resolved in this order:

  1. An explicit --control-plane flag (where the command accepts one).
  2. The BOX_CONTROL_PLANE environment variable.
  3. The controlPlaneUrl field in box.json.

.gitignore generated by box create

box create writes a .gitignore that excludes:

.gitignore
node_modules/
dist/
.box/
.npmrc
.env
.env.local
nameserver.txt
dns.txt

See also