UCD.js Docs
CLI

store

Manage local UCD stores

ucd store

Manage local UCD stores — initialize, mirror, sync, verify, analyze, and check status.

ucd store <subcommand> [...flags]

init

Initialize a new UCD store. Creates a lockfile and downloads the specified Unicode versions.

ucd store init [...versions] [...flags]

If no versions are provided, the command prompts you to select from available versions interactively.

Flags

FlagDescription
--store-dir (required)Directory where UCD files will be stored
--includeGlob patterns to include specific files
--excludeGlob patterns to exclude specific files
--base-urlBase URL for the UCD API (default: api.ucdjs.dev)
--forceOverwrite existing store
--jsonOutput results as JSON

Examples

# Initialize a store with Unicode 16.0.0
ucd store init 16.0.0 --store-dir ./ucd-data

# Initialize with multiple versions
ucd store init 15.0.0 16.0.0 --store-dir ./ucd-data

# Include only specific files
ucd store init 16.0.0 --store-dir ./ucd-data --include "ucd/UnicodeData.txt"

mirror

Download Unicode data files into a local store. Unlike sync, mirror does not use an existing lockfile — it downloads all matched files for the specified versions.

ucd store mirror [...versions] [...flags]

Flags

FlagDescription
--store-dir (required)Directory where UCD files will be stored
--includeGlob patterns to include specific files
--excludeGlob patterns to exclude specific files
--base-urlBase URL for the UCD API (default: api.ucdjs.dev)
--concurrencyMaximum concurrent downloads (default: 5)
--forceRe-download existing files
--jsonOutput results as JSON

Examples

ucd store mirror 16.0.0 --store-dir ./ucd-data
ucd store mirror 16.0.0 --store-dir ./ucd-data --concurrency 10

sync

Sync a store to match its lockfile state. Downloads missing files and optionally removes orphaned ones.

ucd store sync [...versions] [...flags]

Flags

FlagDescription
--store-dir (required)Directory where UCD files are stored
--includeGlob patterns to include specific files
--excludeGlob patterns to exclude specific files
--base-urlBase URL for the UCD API (default: api.ucdjs.dev)
--concurrencyMaximum concurrent downloads (default: 5)
--cleanRemove files present on disk but not in the lockfile
--remove-unavailableRemove versions from the lockfile that are no longer available in the API
--forceForce re-download of all files
--jsonOutput results as JSON

Examples

# Sync the store to match the lockfile
ucd store sync --store-dir ./ucd-data

# Sync and remove orphaned files
ucd store sync --store-dir ./ucd-data --clean

verify

Verify store integrity by comparing local files against the API.

ucd store verify [...versions] [...flags]

Supports both a local store (--store-dir) and a remote read-only store (--remote).

Flags

FlagDescription
--store-dirDirectory where UCD files are stored
--remoteUse a remote UCD store (read-only)
--includeGlob patterns to include specific files
--excludeGlob patterns to exclude specific files
--base-urlBase URL for the UCD API (default: api.ucdjs.dev)
--jsonOutput results as JSON

Examples

ucd store verify --store-dir ./ucd-data
ucd store verify 16.0.0 --store-dir ./ucd-data --json

analyze

Analyze the contents and file status of a store.

ucd store analyze [...versions] [...flags]

Flags

FlagDescription
--store-dirDirectory where UCD files are stored
--remoteUse a remote UCD store (read-only)
--includeGlob patterns to include specific files
--excludeGlob patterns to exclude specific files
--base-urlBase URL for the UCD API (default: api.ucdjs.dev)
--check-orphanedInclude orphaned files in the analysis
--jsonOutput results as JSON

Examples

ucd store analyze --store-dir ./ucd-data
ucd store analyze --store-dir ./ucd-data --check-orphaned

status

Show version and file status for a store.

ucd store status [...flags]

Flags

FlagDescription
--store-dirDirectory where UCD files are stored
--remoteUse a remote UCD store (read-only)
--includeGlob patterns to include specific files
--excludeGlob patterns to exclude specific files
--base-urlBase URL for the UCD API (default: api.ucdjs.dev)
--jsonOutput results as JSON

Examples

ucd store status --store-dir ./ucd-data
ucd store status --remote --json

On this page