Environment variables
Every environment variable the open-assets CLI reads, the flag it stands in for, its default and accepted values, plus the exit codes to check in CI scripts.
Flags win over environment variables, which win over defaults. Boolean variables count only when set to exactly true.
| Variable | Flag | Commands | Default | Notes |
|---|---|---|---|---|
OPEN_ASSETS_PORT | -p, --port | dev | 3200 | Next free port is tried up to 10 times |
OPEN_ASSETS_HOST | -H, --host | dev | localhost | 0.0.0.0 for LAN access |
OPEN_ASSETS_NO_OPEN | --no-open | dev | unset | true skips opening the browser |
OPEN_ASSETS_QUIET | -q, --quiet | dev, render | unset | true silences logs |
CI | --ci | dev | unset | true means quiet and no browser. Most CI providers set it |
OPEN_ASSETS_CONFIG | --config | dev, render, list, validate, add | assets.json | Relative to [dir] |
OPEN_ASSETS_RENDER_TIMEOUT | --render-timeout | dev, render | 30000 | Milliseconds for page load |
OPEN_ASSETS_OUTPUT | -o, --output | render | ./exports | Relative to the working directory |
OPEN_ASSETS_CONCURRENCY | none | render | auto | Positive integer; see below |
OPEN_ASSETS_CONCURRENCY
By default render runs min(units, cores - 1, 2) pages at once (at least 1), where a unit is one template in one locale. A positive integer here replaces that, capped at the number of units. Zero, negative or non-numeric values are ignored. See /reference/cli/render.
OPEN_ASSETS_CONCURRENCY=4 npx open-assets render --forceExample: CI
export OPEN_ASSETS_QUIET=true
export OPEN_ASSETS_OUTPUT=./build/assets
npx open-assets validate
npx open-assets render --json > render.jsonSee /ci/github-actions.
Exit codes
| Code | Meaning |
|---|---|
0 | Success. render also exits 0 when --size or --locale skipped every collection |
1 | Config missing or invalid JSON; a --collection or --tag filter matched nothing; validate found errors; add duplicate; init found an existing assets.json; dev found no free port |
| non-zero | Uncaught error during a render (timeout, missing localizations file), with a stack trace |
Last updated on
Export sizes
Common export sizes for the App Store, Mac App Store, Google Play, Product Hunt and the web, with the size name to use in assets.json and notes for each store.
Examples
Six real Open Assets projects from shipped apps, with App Store screenshots, icons, Product Hunt galleries and social headers you can clone, run and copy from.