Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 47 additions & 12 deletions assets/docs/getting-started/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,53 @@

# buridan

Use the buridan CLI to add components and themes to your project.
Use the buridan CLI to add components, apply themes, and manage your Buridan UI project.

## Installation

Install the CLI using pip:

```bash
pip install buridan-create
```

## Usage
All commands must be run from your Reflex project root, where `rxconfig.py` is located.

## create

Open the Buridan UI theme builder in your browser. Use it to customize your design system and generate a unique preset ID.

All `buridan` commands must be executed from your Reflex project root, where the `rxconfig.py` file is located.
```bash
buridan create
```

## init

Initialize Buridan UI in your project. This command generates the `assets/globals.css` file and updates your `rxconfig.py` with the required Tailwind configuration and theme tokens.
Initialize Buridan UI in your project. This command sets up CSS utilities (shimmer, scrollbar) in `assets/globals.css` and updates `rxconfig.py` with the required Tailwind configuration.

```bash
buridan init
```

## apply

Apply a theme preset to your project. Generates `:root` and `.dark` CSS variable blocks in `assets/globals.css` based on the preset ID from the theme builder.

```bash
buridan init --preset <ID>
buridan apply --preset <ID>
```

Arguments:
- `--preset`: The theme preset ID from the Buridan UI creator.
- `--include`: Specify `full` to include all available components or `theme-only` for just the CSS and configuration. Defaults to `full`.
- `--preset`: The theme preset ID from the Buridan UI theme builder. Use `b0` for the default theme.

Example:

```bash
buridan apply --preset b0
buridan apply --preset b2D0wqNxT
```

## add

Add specific components and their required dependencies to your project.
Add components and their dependencies to your project.

```bash
buridan add <name>
Expand All @@ -42,12 +60,29 @@ You can add multiple components at once:
buridan add button input select
```

This command automatically resolves and adds any required utilities, icons, or base components while maintaining the correct directory structure.
Blocks (charts, dashboards, etc.) can be added the same way:

```bash
buridan add line_chart_01
```

Components are placed in `components/`, blocks in `blocks/`. Dependencies are resolved and added automatically.

> **Note:** Components require a theme to render correctly. Run `buridan apply` before using components.

## list

Display all available components that can be added to your project.
Display all available components and blocks.

```bash
buridan list
```

## Recommended workflow

```bash
buridan create # build your theme, copy the preset ID
buridan init # set up utilities and Tailwind config
buridan apply --preset <ID> # apply your theme
buridan add button input select # add the components you need
```
Loading
Loading