open-assets list
Print every collection in assets.json with its tags, templates, export sizes and outputs, filter the tree by tag, or dump the raw config as JSON for scripts.
open-assets list [options] [dir]| Argument | Default | Description |
|---|---|---|
dir | . | Project directory containing assets.json |
list reads the config and prints a tree of collections. It does not check that files exist; use /reference/cli/validate for that.
Examples
open-assets list
open-assets list --tag ios
open-assets list --json | jq '.collections[].id'Options
| Flag | Env var | Default | Description |
|---|---|---|---|
--config <path> | OPEN_ASSETS_CONFIG | assets.json | Path to config file |
--tag <tag> | - | - | List only collections with this tag |
--json | - | - | Output as JSON |
Pretty output
Tags: screenshots, ios, icon, logo, branding
Demo Assets
Screenshots (screenshots) [screenshots, ios] ... 1 template(s), 4 size(s)
• Hero → src/screenshots/01-hero.html
↳ iPhone 6.9" (1320×2868)
↳ iPad 13" (2064×2752)
App Icon (icon) [icon, ios] ... 1 template(s), 7 size(s)
• App Icon → src/icon.html
↳ 1024px (1024×1024)
↳ Xcode: ios/AppIcon.appiconsetThe real output separates the collection header from its counts with a long dash; it is shown as ... here. Line by line:
Tags:lists roottagsids. Printed only when the roottagsarray is non-empty.- The root
name. - One header per collection:
label (id), itstagsin brackets if any, the template count and the size count (export entries withouttype). •one line per template:label(orname) →src.↳one line per size:label (width×height).↳ Xcode: <path>perxcodeoutput and↳ Copy source: <format>percopy-sourceoutput.
--json
Prints the whole config file, parsed and re-serialized with two-space indentation. --tag is ignored with --json.
Exit codes
| Code | When |
|---|---|
| 0 | Printed |
| 1 | Config missing or invalid JSON (Error: ...), or --tag matched no collection (No collections found with tag "<tag>") |
Gotchas
- A collection without a
templatesarray crashes the pretty printer. Runvalidatefirst.
Last updated on
open-assets render
Render every template at every export size, with filters, locale folders, outFile targets, Xcode output, JSON results, concurrency and the incremental cache.
open-assets validate
Check assets.json for missing fields, duplicate ids, missing template files and broken localizations, fix them interactively, and fail CI with exit code 1.