CLI
HeroUI CLI는 프로젝트를 초기화하고 관리·개선할 수 있는 명령어 모음을 제공해요. 개별 컴포넌트를 install, uninstall, upgrade하고, 프로젝트의 상태를 진단하며, AI 코딩 에이전트용 문서를 내려받는 것까지 할 수 있어요.
출처: HeroUI CLI
본문
CLI는 HeroUI 프로젝트를 초기화·관리·개선하는 포괄적인 명령어 모음을 제공해요. 개별 컴포넌트를 install하거나 uninstall, upgrade하고, 프로젝트의 상태를 진단하며, AI 코딩 에이전트용 문서를 내려받는 등의 작업을 할 수 있어요.
설치 (Installation)
요구 사항:
전역 설치 (Global Installation)
heroui-cli를 전역으로 설치하려면 터미널에서 다음 명령어 중 하나를 실행하세요:
npm install heroui-cli@latest -g
설치 없이 사용 (Without Installation)
대신 전역 설치 없이 heroui-cli를 사용하려면 다음 중 하나를 실행하면 돼요:
pnpm dlx heroui-cli@latest
npx heroui-cli@latest
yarn dlx heroui-cli@latest
bunx heroui-cli@latest
빠른 시작 (Quick Start)
heroui-cli가 설치되면 다음 명령어로 사용 가능한 명령어들을 확인할 수 있어요:
heroui
그러면 다음과 같은 도움말 출력이 나와요:
Usage: heroui [command]
Options:
-v, --version Output the current version
--no-cache Disable cache, by default data will be cached for 30m after the first request
-d, --debug Debug mode will not install dependencies
-h --help Display help information for commands
Commands:
init [options] [projectName] Initializes a new project
install [options] Installs @heroui/react and @heroui/styles to your project
upgrade [options] Upgrades @heroui/react and @heroui/styles to the latest versions
uninstall [options] Uninstall @heroui/react and @heroui/styles from the project
list [options] Lists installed HeroUI packages (@heroui/react, @heroui/styles)
env [options] Displays debugging information for the local environment
doctor [options] Checks for issues in the project
agents-md [options] Downloads HeroUI documentation for AI coding agents
help [command] Display help for command
init
init 명령어로 새 HeroUI 프로젝트를 초기화해요. 필요한 구성과 함께 프로젝트를 세팅해줘요.
heroui init [options]
옵션 (Options):
-t --template [string]새 프로젝트에 사용할 템플릿. 예: app, pages, vite, react-router-p --package [string]새 프로젝트에 사용할 패키지 매니저
출력:
HeroUI CLI <version>
┌ Create a new project
│
◇ Select a template (Enter to select)
│ ● App (A Next.js 16 with app directory template pre-configured with HeroUI (v3) and Tailwind CSS.)
│ ○ Pages (A Next.js 16 with pages directory template pre-configured with HeroUI (v3) and Tailwind CSS.)
│ ○ Vite (A Vite template pre-configured with HeroUI (v3) and Tailwind CSS.)
│ ○ React Router (A React Router template pre-configured with HeroUI (v3) and Tailwind CSS.)
│
◇ New project name (Enter to skip with default name)
│ my-heroui-app
│
◇ Select a package manager (Enter to select)
│ ● npm
│ ○ yarn
│ ○ pnpm
│ ○ bun
│
◇ Template created successfully!
│
◇ Next steps ───────╮
│ │
│ cd my-heroui-app │
│ npm install │
│ │
├────────────────────╯
│
└ 🚀 Get started with npm run dev
로컬 서버를 시작하려면 의존성을 설치하세요:
cd my-heroui-app && npm install
cd my-heroui-app && pnpm install
cd my-heroui-app && yarn install
cd my-heroui-app && bun install
로컬 서버를 시작하세요:
npm run dev
Install
@heroui/react와 @heroui/styles를 피어 의존성과 함께 프로젝트에 설치해요. 이미 설치되어 있다면 아무것도 하지 않아요.
heroui install [options]
옵션 (Options):
-p --packagePath[string] package.json 파일 경로
출력 (Output):
HeroUI CLI <version>
📦 Packages to be installed:
╭─────────────────────────────────────────────────────────────────────────────╮
│ Package │ Version │ Status │ Docs │
│─────────────────────────────────────────────────────────────────────────────│
│ @heroui/react │ 3.0.0 │ stable │ https://heroui.com │
│ @heroui/styles │ 3.0.0 │ stable │ https://heroui.com │
╰─────────────────────────────────────────────────────────────────────────────╯
╭─────────────── PeerDependencies ────────────────╮
│ react@18.3.1 latest │
│ react-dom@18.3.1 latest │
│ tailwindcss@4.2.2 latest │
╰─────────────────────────────────────────────────╯
? Proceed with installation? › - Use arrow-keys. Return to submit.
❯ Yes
No
✅ @heroui/react and @heroui/styles installed successfully
upgrade
@heroui/react와 @heroui/styles를 피어 의존성과 함께 최신 버전으로 업그레이드해요.
heroui upgrade [options]
옵션 (Options):
-p --packagePath[string] package.json 파일 경로
출력 (Output):
HeroUI CLI <version>
╭──────────────────────────── Upgrade ────────────────────────────╮
│ @heroui/react ^3.0.0 -> ^3.1.0 │
│ @heroui/styles ^3.0.0 -> ^3.1.0 │
╰─────────────────────────────────────────────────────────────────╯
? Would you like to proceed with the upgrade? › - Use arrow-keys. Return to submit.
❯ Yes
No
✅ Upgrade complete. All packages are up to date.
uninstall
프로젝트에서 @heroui/react와 @heroui/styles를 제거해요. 피어 의존성은 제거되지 않아요.
heroui uninstall [options]
옵션 (Options):
-p --packagePath[string] package.json 파일 경로
출력 (Output):
HeroUI CLI <version>
❗️ Packages slated for uninstallation:
╭──────────────────────────────────────────────────────────────────────────────────────╮
│ Package │ Version │ Status │ Docs │
│──────────────────────────────────────────────────────────────────────────────────────│
│ @heroui/react │ 3.0.0 │ stable │ https://heroui.com │
│ @heroui/styles │ 3.0.0 │ stable │ https://heroui.com │
╰──────────────────────────────────────────────────────────────────────────────────────╯
? Confirm uninstallation of these packages: › - Use arrow-keys. Return to submit.
❯ Yes
No
✅ Successfully uninstalled: @heroui/react, @heroui/styles
list
설치된 HeroUI 패키지(@heroui/react, @heroui/styles)를 나열해요.
heroui list [options]
옵션 (Options):
-p --packagePath[string] package.json 파일 경로
출력 (Output):
HeroUI CLI <version>
Current installed packages:
╭──────────────────────────────────────────────────────────────────────────────────────╮
│ Package │ Version │ Status │ Docs │
│──────────────────────────────────────────────────────────────────────────────────────│
│ @heroui/react │ 3.0.0 🚀latest │ stable │ https://heroui.com │
│ @heroui/styles │ 3.0.0 🚀latest │ stable │ https://heroui.com │
╰──────────────────────────────────────────────────────────────────────────────────────╯
doctor
프로젝트의 문제를 검사해요.
@heroui/react와@heroui/styles가 설치되어 있는지 확인- 필수 피어 의존성이 설치되어 있고 프로젝트의 최소 요구 사항을 충족하는지 확인
heroui doctor [options]
옵션 (Options):
-p --packagePath[string] package.json 파일 경로
출력 (Output):
프로젝트에 문제가 있다면 doctor 명령어가 문제 정보를 표시해요.
HeroUI CLI <version>
HeroUI CLI: ❌ Your project has 1 issue that require attention
❗️Issue 1: missingHeroUIPackages
The following HeroUI packages are not installed:
- @heroui/styles
Run `heroui install` to install them.
그렇지 않으면 doctor 명령어는 다음 메시지를 표시해요.
HeroUI CLI <version>
✅ Your project has no detected issues.
env
로컬 환경에 대한 디버그 정보를 표시해요.
heroui env [options]
옵션 (Options):
-p --packagePath[string] package.json 파일 경로
출력 (Output):
HeroUI CLI <version>
Current installed packages:
╭──────────────────────────────────────────────────────────────────────────────────────╮
│ Package │ Version │ Status │ Docs │
│──────────────────────────────────────────────────────────────────────────────────────│
│ @heroui/react │ 3.0.0 🚀latest │ stable │ https://heroui.com │
│ @heroui/styles │ 3.0.0 🚀latest │ stable │ https://heroui.com │
╰──────────────────────────────────────────────────────────────────────────────────────╯
Environment Info:
System:
OS: darwin
CPU: arm64
Binaries:
Node: v25.8.1
agents-md
AI 코딩 에이전트(Claude, Cursor 등)용 HeroUI 문서를 내려받아요. 이 명령어는 HeroUI 저장소에서 최신 문서를 클론하고, AGENTS.md 또는 CLAUDE.md에 간결한 인덱스를 주입해서 어시스턴트가 프로젝트의 HeroUI 구성을 참조할 수 있게 해줘요.
heroui agents-md [options]
옵션 (Options):
--react[boolean] React 문서만 포함 (한 번에 하나의 라이브러리)--native[boolean] Native 문서만 포함--migration[boolean] HeroUI v2에서 v3로의 마이그레이션 문서만 포함--output <file>[string] 대상 파일 경로 (예:AGENTS.md,CLAUDE.md)--ssh[boolean] git clone에 SSH 대신 HTTPS 사용
예시 (Examples):
플래그 없이 실행하면 인터랙티브 모드로 진입해요:
heroui agents-md
특정 파일로 React 문서를 내려받기:
heroui agents-md --react --output AGENTS.md
Native 또는 마이그레이션 문서 내려받기:
heroui agents-md --native --output CLAUDE.md
heroui agents-md --migration --output AGENTS.md
동작 방식 (How it works):
- git sparse-checkout을 사용해
v3브랜치에서 문서를 클론해요 - 문서와 데모 파일의 간결한 인덱스를 생성해요
- 마커(
<!-- HEROUI-REACT-AGENTS-MD-START -->/<!-- HEROUI-REACT-AGENTS-MD-END -->, 그리고 Native·Migration도 비슷한 마커) 사이에 인덱스를 markdown 파일에 주입해요 .gitignore에.heroui-docs/를 추가해요
--react, --native, --migration 중 한 번에 하나만 선택할 수 있어요.
자세한 내용은 AGENTS.md를 참고하세요.
agents-md명령어는 익명 사용 데이터(선택 항목, 출력 파일 이름, 소요 시간, 성공 또는 오류)를 수집해요. 이를 거부하려면HEROUI_ANALYTICS_DISABLED=1로 설정하세요.
문제 보고 (Reporting issues)
버그를 발견했다면 heroui-cli Issues에 보고해주세요.