Skip to content
ChartslibraryUI Get Pro

CLI

chartslibraryui is a single-file Node CLI with no dependencies. It reads registry JSON from the website, from a URL, or from a local folder (the Pro download), resolves dependencies and writes source files into your project.

Requires Node 18 or later.

Commands

add

npx chartslibraryui add <chart...> [options]

Installs one or more charts, the charts they depend on, and the shared core/.

Option Default Meaning
--dir <path> components/charts Where files are written. Use src/components/charts in src/ projects.
--from <path or url> the public registry A registry folder or base URL. Point it at your Pro download to install Pro charts.
--overwrite off Replace files that already exist. Without it, existing files are kept (your edits are safe).
--dry-run off List what would be written without writing.
# free charts from the public registry
npx chartslibraryui add line-chart donut-chart

# Pro charts from your download folder
npx chartslibraryui add waterfall-chart cohort-heatmap --from ./chartslibraryui-pro

# a custom folder
npx chartslibraryui add bar-chart --dir src/ui/charts

list

npx chartslibraryui list [--from <path or url>]

Lists the available charts with tier and description. Use --from to list your Pro download.

info

npx chartslibraryui info waterfall-chart [--from <path or url>]

Shows the description, the files a chart installs and its dependencies.

How it decides what to write

Each chart's registry entry lists its files and its dependencies (registryDependencies). The CLI resolves them recursively, writes each file once, and skips files that already exist unless you pass --overwrite. So if you've customised core/format.ts, adding another chart won't undo your change.

Updating a chart

Charts are your code, so updates are deliberate. To take a newer version of a chart, run add with --overwrite on a clean git working tree and review the diff.

Without Node

Every chart page has a Source section with the full file, and /r/<chart>.json holds the same files as JSON. You can always copy by hand.