Skip to main content

Usage

npx @linktr.ee/linkapp add <component> [options]
Adds a single UI component from the LinkApp registry into your project (powered by npx shadcn@latest).

Options

FlagDescriptionDefault
--registry <url>Use a custom registry URL (defaults to LINKAPP_REGISTRY_URL or official registry)default registry
--yes, -ySkip confirmation promptsfalse
--overwriteOverwrite existing componentsfalse
-h, --helpShow help-

Available components

The default registry ships:
  • button
  • container
  • embed
  • skeleton
  • switch

Prerequisites

  • Run from your LinkApp project root.
  • components.json must exist (created by create-linkapp).

Examples

Install the button component:
npx @linktr.ee/linkapp add button
Install from a custom registry with no prompts:
npx @linktr.ee/linkapp add container --registry https://example.com/r --yes

Overwriting components

If a component already exists:
Component "button" already exists. Overwrite? (y/N)
Use --overwrite to skip the prompt:
npx @linktr.ee/linkapp add button --overwrite

Custom registries

The CLI resolves the component URL from:
  1. --registry <url> flag (if provided)
  2. LINKAPP_REGISTRY_URL environment variable
  3. Default registry: https://create-linkapp-registry.vercel.app/r
You can also pass a full URL as the component argument:
npx @linktr.ee/linkapp add https://example.com/r/card.json

What happens

  1. Validates you provided a component name and that components.json exists.
  2. Resolves the component JSON from the registry.
  3. Runs npx shadcn@latest add <component-url> with your flags.
  4. Writes the component into components/ui/ and prints an import hint.
After a successful install you can import:
import { Button } from "@/components/ui/button";
If the install fails, rerun with --overwrite or check the registry URL.