Skip to content

Configuration Reference

This document provides a complete overview of the options available in regpick.config.json (or regpick.json) and the CLI flags you can use to modify regpick’s behavior on the fly.

The configuration file is generated by running regpick init. You can also manually create one in the root of your project.

(Record<string, string>)

A key-value map defining aliases for your registries. Keys are simple names you can type in the CLI, and values can be remote URLs or local paths.

"registries": {
"ui": "https://ui.shadcn.com/r",
"local": "./my-components/registry"
}

(Record<string, string>)

Tells regpick where to install files based on their type field in the registry definition.

"targetsByType": {
"registry:component": "src/components/ui",
"registry:icon": "src/components/icons",
"registry:hook": "src/hooks"
}

(string)

Defines which package manager to use for installing missing dependencies. Options: "auto", "npm", "yarn", "pnpm", "bun". If set to "auto", regpick will try to detect the package manager by looking for lockfiles (e.g., package-lock.json, pnpm-lock.yaml).

(string)

Determines what regpick should do when a downloaded file already exists locally.

  • "prompt" (default): Asks you interactively whether to overwrite, skip, or abort.
  • "overwrite": Always overwrites existing files silently.
  • "skip": Always leaves existing files untouched.

(Record<string, string>)

An extremely powerful feature that allows you to rewrite import statements on the fly. When regpick downloads a component file, it scans for imports matching the keys in this object and replaces them with the values.

"aliases": {
"@/lib/utils": "~/src/utils/cn"
}

Effect: import { cn } from "@/lib/utils" becomes import { cn } from "~/src/utils/cn".

(boolean)

If set to true, regpick will respect the target path specified inside the registry’s registry.json file for each file, ignoring your global targetsByType. If false (or missing), your local targetsByType always wins.

(boolean)

By default (false), regpick will block attempts to write files outside of the current working directory as a security measure against malicious registries. Set to true to allow saving files to parent directories.


You can pass these flags to regpick commands to override behavior for a single run.

  • --cwd=<path>: Changes the current working directory. Useful when running regpick from the root of a monorepo, targeting a specific workspace package. Example: npx regpick add ui --cwd=./packages/frontend

  • --yes: Bypasses all interactive confirmation prompts (like asking to install dependencies or overwrite files). It will assume “yes” or default to safe configuration values. Ideal for CI environments.

  • --help: Shows the help menu with available commands and flags.

  • --all: Selects and installs all items present in the registry, completely bypassing the interactive multi-select menu.
  • --select=<items>: A comma-separated list of component names to install without showing the selection prompt. Example: npx regpick add ui --select=button,card,dialog