untitledui
Version:
The Untitled UI CLI tool helps you quickly scaffold projects with Untitled UI React and add components and page examples to your existing projects with an interactive interface in seconds.
160 lines (99 loc) • 3.89 kB
Markdown
# Untitled UI CLI
The Untitled UI CLI tool helps you quickly scaffold projects with Untitled UI React and add components and page examples to your existing projects with an interactive interface in seconds.
## Usage
To always use the latest version of the CLI, we recommend using `npx`:
```bash
npx untitledui@latest <command>
```
The Untitled UI CLI provides the following commands:
If you run a command without providing further arguments, you'll be presented with an interactive interface to continue.
- `init`: Initialize a new project or adjust an existing one.
- `add`: Add a component to your project.
- `example`: Add an example page to the project.
- `login`: Authenticate with Untitled UI to access PRO components.
## Commands
### `init`
The `init` command is used to initialize a new project or adjust an existing one.
If you run the command without any arguments, you will be guided through an interactive setup process.
**Usage:**
```bash
npx untitledui@latest init [directory] [options]
```
**Arguments:**
- `[directory]`: The directory to initialize the project in.
**Options:**
- `--vite`: Initialize a Vite project.
- `--nextjs`: Initialize a Next.js project.
- `-o, --overwrite`: Overwrite existing files.
- `--colors-list`: Show the colors list.
- `-c, --color <color-name>`: Specify a color for the project.
- `-h, --help`: Display the help message.
**Examples:**
- Initialize a new Next.js project in a directory named `my-app`:
```bash
npx untitledui@latest init my-app --nextjs
```
- Initialize a new Vite project with a specific color:
```bash
npx untitledui@latest init my-vite-app --vite --color blue
```
### `add`
The `add` command is used to add a component to your project.
If you run the command without any arguments, you will be guided through an interactive process to select components.
**Usage:**
```bash
npx untitledui@latest add [components...] [options]
```
**Arguments:**
- `[components...]`: The components to add.
**Options:**
- `-a, --all`: Add all available components.
- `-o, --overwrite`: Overwrite existing files.
- `-p, --path <path>`: The path to add the component to.
- `-d, --dir <directory>`: The directory where the project is located.
- `-t, --type <base|marketing|shared-assets|application|foundations>`: The type of the component to add.
**Examples:**
- Add a single component:
```bash
npx untitledui@latest add button
```
- Add multiple components:
```bash
npx untitledui@latest add button toggle avatar
```
- Add all marketing components:
```bash
npx untitledui@latest add --all --type marketing
```
### `example`
The `example` command is used to add an example page to the project.
**Usage:**
```bash
npx untitledui@latest example [example] [options]
```
**Arguments:**
- `[example]`: The example to add. This can be a specific example path copied from the [Untitled UI React website](https://www.untitledui.com/react/components) (e.g., `dashboards-01/05`).
**Options:**
- `-o, --overwrite`: Overwrite existing files.
- `-p, --path <path>`: The path to add the component to.
- `-e, --example-path <example-path>`: The path to add the example file to.
**Examples:**
- Add application UI examples:
```bash
npx untitledui@latest example application
```
- Add a specific example by its path:
```bash
npx untitledui@latest example dashboards-01/05
```
### `login`
The `login` command is used to authenticate with Untitled UI to access PRO components.
**Usage:**
```bash
npx untitledui@latest login
```
This command will open a browser window for you to authenticate with your Untitled UI account.
## License
The Untitled UI CLI is licensed under the [MIT License](LICENSE).
## Bug Reports
If you find a bug, please report it on our [issue tracker](https://github.com/untitleduico/react/issues).