--- title: CLI description: "Learn how to generate themes using CLI commands." --- # CLI Learn how to generate themes using CLI commands. ## Usage :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ### Generate a Theme When you run the `theme` command, the theme will be generated at the specified path. ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` :::note If you don't specify a path, the theme will be generated in `./theme`. ::: ```bash Usage: pnpm yamada-cli theme [options] [path] generate theme to your project. Arguments: path path to the theme directory. Options: --cwd current working directory. -c, --config path to the config file. (default: "ui.json") -o, --overwrite overwrite existing directory. (default: false) -j, --js use js instead of ts. -y, --yes skip all confirmation prompts. (default: false) -p, --package-name package name (for monorepo). -s, --src use src/ directory. --no-src do not use src/ directory. -i, --install install dependencies when choice is monorepo. --no-install do not install dependencies when choice is monorepo. -f, --format format the output files. --no-format do not format the output files. -l, --lint lint the output files. --no-lint do not lint the output files. -t, --tag tag for the registries (e.g. dev, next). -h, --help display help for command ``` ### Check the Differences When you run the `diff` command, you can check the difference between the local and remote themes. ```bash pnpm yamada-cli diff theme ``` ```bash npm yamada-cli diff theme ``` ```bash yarn yamada-cli diff theme ``` ```bash bun yamada-cli diff theme ``` ```bash Usage: pnpm yamada-cli diff [options] [component] check for updates against the registry. Arguments: component component to check. Options: --cwd current working directory. -c, --config path to the config file. (default: "ui.json") -s, --sequential run tasks sequentially. (default: false) -d, --detail show detailed changes. (default: false) -y, --yes skip all confirmation prompts. (default: false) -u, --update update files when there are file diff. --no-update do not update files when there are file diff. -i, --install install dependencies when updating files. --no-install do not install dependencies when updating files. -t, --tag tag for the registries (e.g. dev, next). -h, --help display help for command ``` ### Update the theme When you run the `update` command, the theme will be updated. ```bash pnpm yamada-cli update theme ``` ```bash npm yamada-cli update theme ``` ```bash yarn yamada-cli update theme ``` ```bash bun yamada-cli update theme ``` ```bash Usage: pnpm yamada-cli update [options] [components...] update components in your project. Arguments: components components to update. Options: --cwd current working directory. -c, --config path to the config file. (default: "ui.json") -s, --sequential run tasks sequentially. (default: false) -F, --force force update, overwriting local changes. (default: false) -y, --yes skip all confirmation prompts. (default: false) -i, --install install dependencies. --no-install do not install dependencies. -f, --format format the output files. --no-format do not format the output files. -l, --lint lint the output files. --no-lint do not lint the output files. -t, --tag tag for the registries (e.g. dev, next). -h, --help display help for command ``` ### Update typings When you run the `tokens` command, you can update the customized theme typings. This typings are used for [Style Props](https://yamada-ui.com/docs/styling/style-props.md). ```bash pnpm yamada-cli tokens ``` ```bash npm yamada-cli tokens ``` ```bash yarn yamada-cli tokens ``` ```bash bun yamada-cli tokens ``` :::note If you don't specify a path, the `theme.path` will be used. ::: ```bash Usage: pnpm yamada-cli tokens [options] [path] generate theme typings. Arguments: path path to the theme file. Options: --cwd current working directory. -c, --config path to the config file. (default: "ui.json") -o, --out output path. -f, --format format the output file. --no-format do not format the output file. -l, --lint lint the output file. --no-lint do not lint the output file. --internal generate internal tokens. (default: false) -h, --help display help for command ```