native-mate add

Fetch one or more components from the registry and write them into your project.

Usage

bash
1
npx native-mate add <component> [components...] [options]

Examples

bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Add a single component
npx native-mate add button

# Add multiple at once
npx native-mate add button card input badge avatar

# Use a custom registry
npx native-mate add button --registry https://my-registry.dev

# Overwrite existing files
npx native-mate add button --overwrite

# Add all available components
npx native-mate add --all

# Interactive mode — no arguments opens a multi-select picker
npx native-mate add

Options

FlagDescription
-a, --allAdd all available components at once
-r, --registry <url>Use a custom registry URL instead of the default
--overwriteOverwrite existing component files if they differ

What it does

  1. Reads native-mate.json to find your components directory
  2. Fetches the component JSON from the registry
  3. Resolves and installs component dependencies recursively
  4. Writes component source files to your project
  5. Installs any required npm packages via your package manager