---
title: "Using the Tiptap CLI"
description: "A command-line interface to quickly install and configure Tiptap UI components. Learn how to get started in the docs!"
---

> This page is for Tiptap 2.x. [See the latest version of this page.](https://tiptap.dev/docs/ui-components/getting-started/cli.md)

# Using the Tiptap CLI

A command-line interface to quickly install and configure Tiptap UI components. Learn how to get started in the docs!

> **Upgrade to v3**
>
> To use UI components or templates you need to upgrade to Editor version 3.x. See the [upgrade
> guide](https://tiptap.dev/docs/resources/whats-new) for more details.

The Tiptap CLI helps you scaffold editors, install UI components or primitives, and configure Tiptap
faster. It removes much of the manual work so you can start building editor features faster.

It’s designed for Vite or Next.js projects. If you use another framework, you’ll need to integrate Tiptap manually from the [open-source repository](https://github.com/ueberdosis/tiptap-ui-components).

## Usage

```bash
npx @tiptap/cli [command] [options]
```

## Commands

### `init`

Initialize your project and install dependencies. This command sets up your project configuration and adds any specified components.

```bash
npx @tiptap/cli init
```

#### Arguments

- components: the components to add

#### Options

```bash
Usage: @tiptap/cli init [options] [components...]

Options:
-f, --framework <framework>   The framework to use (e.g., next, vite)
-f, --force                   Force overwrite of existing configuration
-c, --cwd <cwd>               The working directory (defaults to current directory)
-s, --silent                  Mute output
--src-dir                     Default: Use the src directory when creating a new project
--no-src-dir                  Do not use the src directory when creating a new project
```

### `add`

Add one or more components to your project.

```bash
npx @tiptap/cli add [components]
```

#### Example

```bash
npx @tiptap/cli add button
```

#### Options

```bash
Usage: @tiptap/cli add [options] [components...]

Arguments

    components          the components to add

Options

    -c, --cwd <cwd>     the working directory (defaults to current directory)
    -p, --path <path>   the path to add the component to
    -s, --silent        mute output
```
