SNYTH

CLI

Snyth CLI to manage your UI components.

CLI Reference

The Snyth CLI is the fastest way to add, manage, and remove components in your React and React Native projects.

Installation

You don't need to install the CLI globally. You can run it directly using your preferred package manager:

npm snyth init
npx snyth init
npx snyth init
bunx snyth init

Commands

init

Setup snyth.config.json in your project root. This command will ask for your project type (React or React Native) and preferred directory.

snyth init

list

List all components available in the Snyth registry and check their installation status.

snyth list

add

Download components into your project. You can provide a specific component name.

snyth add button

remove

Delete components from your project. This command supports multiple arguments to clean up several files at once.

snyth remove button card input

Workflow

Follow these steps to integrate Snyth into a new project:

Initialize

Run snyth init to configure your environment and create the snyth.config.json file.

Browse

Use snyth list to see what components are currently available in our cloud registry.

Install

Run snyth add <name> to pull the source code into your local directory.


Configuration

The CLI uses a snyth.config.json file to track your preferences.

{
  "projectType": "react-native",
  "ts": true,
  "dir": "./src/components/snyth",
  "components": ["button"]
}
PropertyDescription
projectTypeEither react or react-native.
tsBoolean indicating if the project uses TypeScript.
dirThe local path where components are saved.
componentsAn array of currently installed component IDs.