Skip to main content

CLI

The Mavka CLI tool helps you quickly scaffold projects and add components to your existing projects. This guide will help you understand how to use the CLI effectively.

Installation

The mavka CLI tool is available directly as a command-line utility and doesn’t require any installation. You can run it using either npx or bunx:

Init command

The init command helps you scaffold a new project with Mavka components and configurations pre-installed.

1. Create a new project

Run this command in your root folder to create a new project:
While running the command, you’ll be asked a few questions to set up your project:
This will create a new project in the mavka-app directory with all the necessary configurations and components pre-installed.

2. Ready to go!

Great! You’re all set to start using Mavka components.

Command options


Add command

The add command allows you to add specific Mavka components to your existing project.

1. Add components

To add a specific component:
You can add multiple components at once:
If you run the command without specifying any components, you’ll first be asked to select a component type:

2. PRO components

For PRO components, you need to be authenticated:

3. Customization options

The add command offers several options:

Command options


Login command

The login command allows you to authenticate with your Mavka account to access PRO components.
Once authenticated, your credentials are saved locally and will persist across CLI sessions.

Example command

The example command allows you to add complete example pages to your project.

1. Interactive example selection

To browse and add an example interactively:

2. PRO examples

Many examples require PRO access. If you try to access a PRO example without authentication, you’ll be prompted to log in.

Command options


FAQs

How do I access PRO components?

You can access PRO components (if you have an active subscription) by authenticating with the npx mavka@latest login command.

Can I use the CLI with an existing project?

Yes, you can use the add command to add Mavka components to any existing React project with Tailwind CSS.

What frameworks are supported?

Currently, the CLI officially supports Next.js and Vite projects.