Updated Oct 19, 2026

Utilities

Create component files from a local registry item

shadcn-add-local is a local registry-file adapter for the native shadcn CLI.

Agent

overview

What shadcn-add-local does

Supply component source in a registry:file JSON item and receive the generated source files plus a provenance report.

The adapter invokes shadcn universal registry-file add mode in a fresh project. It returns files under files/components/ and report.json. Source is not compiled, rendered or executed; the temporary dependency manifest must remain unchanged.

Accepts 1 to 5 unique relative components/ targets ending .tsx, .ts or .css, 64 KiB per content string, 256 KiB total and a 1 MiB request. Remote registry references, dependency lists, CSS/env configuration and arbitrary CLI flags are refused. Native add has a 45-second limit.

This packaged operation uses 4.21.5. Upstream license: MIT. The linked source identifies the actual program; this page documents the adapter's exposed contract.

source github.com/shadcn-ui/ui

use cases

Where shadcn-add-local fits

Materialize supplied TSX source

Write caller-supplied TSX through native registry-file add mode.

Keep CSS beside components

Return supplied CSS alongside component source.

Verify generated-file hashes

Check returned file hashes and an unchanged dependency manifest.

reference

shadcn-add-local inputs and flags

1 inputs
NameTypeFlagDescription
itemFILE--itemUTF-8 JSON with only name, type=registry:file, files=[{target,content}]. 1-5 unique relative components/ paths ending .tsx/.ts/.css; 64 KiB/content, 256 KiB total, 1 MiB request. No dependencies, registry references, CSS/env configuration or arbitrary options. Native add runs in a fresh project with 45s limit; output source is not compiled or executed. Symlinks refused; Linux amd64.

Showing key inputs. shadcn-add-local exposes 1 inputs in total.

example

Run shadcn-add-local

shadcn-add-local · command
node /app/run.mjs --item ./input.txt ./output
sample output
export function Fixture() { return <p data-total="7">Café 7</p>; }

guidance

Choosing shadcn-add-local

Use this operation to materialize caller-supplied local component source. Fetching a remote registry item, installing dependencies and validating a rendered application are separate jobs.

faq

shadcn-add-local questions

item: UTF-8 JSON with only name, type=registry:file, files=[{target,content}]. 1-5 unique relative components/ paths ending .tsx/.ts/.css; 64 KiB/content, 256 KiB total, 1 MiB request. No dependencies, registry references, CSS/env configuration or arbitrary options. Native add runs in a fresh project with 45s limit; output source is not compiled or executed. Symlinks refused; Linux amd64.

Component files and report. The adapter invokes shadcn universal registry-file add mode in a fresh project. It returns files under files/components/ and report.json. Source is not compiled, rendered or executed; the temporary dependency manifest must remain unchanged.

Accepts 1 to 5 unique relative components/ targets ending .tsx, .ts or .css, 64 KiB per content string, 256 KiB total and a 1 MiB request. Remote registry references, dependency lists, CSS/env configuration and arbitrary CLI flags are refused. Native add has a 45-second limit.

Use this operation to materialize caller-supplied local component source. Fetching a remote registry item, installing dependencies and validating a rendered application are separate jobs.

The public image repository includes download instructions for this version and a separate source/notices bundle. Its overview provides an immutable ORAS command, the expected bundle checksum and pinned upstream source directions. The bundle contains the original build recipe, runtime sources and retained component license notices. Image, source and license notice downloads.

Run shadcn-add-local yourself

The excerpt reconstructs exact TSX source asserted by the saved passing two-file synthetic check. It is generated file content, not a rendered or compiled component. The command shows the container entrypoint with example paths.

Facts on this page come from the live Trickest tool library.