Skip to content

Comments

docs: sync api from heroui-cli v1.1.0#5077

Closed
winchesHe wants to merge 1 commit intocanaryfrom
sync-docs-1.1.0-13932364901
Closed

docs: sync api from heroui-cli v1.1.0#5077
winchesHe wants to merge 1 commit intocanaryfrom
sync-docs-1.1.0-13932364901

Conversation

@winchesHe
Copy link
Contributor

@winchesHe winchesHe commented Mar 18, 2025

Sync api from heroui-cli.

Summary by CodeRabbit

  • Documentation
    • Updated documentation routes to reflect recent changes in the CLI API and guide sections.
    • Enhanced CLI documentation for the "add" command: the usage now refers to targets rather than components, clarifying its dual functionality, and a new option is provided for specifying the installation directory.

@winchesHe winchesHe requested a review from jrgarciadev as a code owner March 18, 2025 20:00
@vercel
Copy link

vercel bot commented Mar 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
heroui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 8:04pm
heroui-sb ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 8:04pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 18, 2025

Walkthrough

The pull request updates two documentation files. In the configuration file, the "cli-api" route now includes an "updated": true flag, and the "figma" route has been reformatted without functional changes. In the CLI documentation file, the add command has been revised by renaming its parameter from [components...] to [targets...], expanding its description, and adding a --directory option. These changes serve to update the documentation and configuration details with revised terminology and additional information.

Changes

File Change Summary
apps/docs/config/routes.json Added "updated": true to the "cli-api" route; reformatted the "figma" route.
apps/docs/content/docs/api-references/cli-api.mdx Updated command signature from heroui add [components...] to heroui add [targets...]; expanded command description; added --directory option; modified --all option text.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant CLI as HeroUI CLI
    participant P as Project System

    U->>CLI: Execute command: heroui add [targets] [options]
    CLI->>CLI: Parse [targets] and options
    alt Target includes Hero Chat
        CLI->>P: Add Hero Chat codebase (use --directory if provided)
    else
        CLI->>P: Add HeroUI components
    end
    CLI-->>U: Return confirmation message
Loading

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (5)
apps/docs/config/routes.json (1)

52-57: Refined Figma Route Formatting

The "figma" route block has been reformatted for consistency. Although no functional changes were made here, please ensure that the formatting is in line with the project's style guidelines.

apps/docs/content/docs/api-references/cli-api.mdx (4)

37-38: Update Add Command Signature and Description

The add command now uses [targets...] instead of [components...] and clearly describes the two main actions:

  1. Adding HeroUI components
  2. Adding the Hero Chat codebase

This update improves clarity. As a minor nitpick, both bullet items begin with "Add" – consider varying the verb in one of the items for improved readability.


104-105: Refine Add Command Step Descriptions

The steps for the add command are now:

  1. Add HeroUI components to your project.
  2. Add Hero Chat codebase to your project.

To improve stylistic clarity, consider varying the initial verbs (for example: "Include HeroUI components" and "Integrate Hero Chat codebase").

🧰 Tools
🪛 LanguageTool

[style] ~105-~105: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...d HeroUI components to your project. 2. Add Hero Chat codebase to your project. ##...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


112-112: Feature List Consistency Check

The "Features" section now includes an additional step (number 4) explicitly stating "Add Hero Chat codebase to your project." Ensure that this additional information is consistent with the command description and does not lead to redundancy.


120-127: Refine Option Descriptions in Add Options

In the Add Options section, please address the following:

  • Duplicate Word: The description for -tw --tailwindPath reads "the path to the tailwind.config file file". Please remove the duplicated "file".
  • Prettier Option Wording: The description for --prettier currently reads "Add prettier format in the add content which required installed prettier". Consider rewording it to: "Add prettier formatting to the added content (requires prettier to be installed, default: false)."

These refinements will improve clarity and professionalism.

🧰 Tools
🪛 LanguageTool

[duplication] ~122-~122: Possible typo: you repeated a word.
Context: ...string] The path to the tailwind.config file file - -app --appPath [string] The path to...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~124-~124: The double modal “required installed” is nonstandard (only accepted in certain dialects). Consider “to be installed”.
Context: ...ormat in the add content which required installed prettier - (default: false) - `--addA...

(NEEDS_FIXED)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 654518e and 650bfe2.

📒 Files selected for processing (2)
  • apps/docs/config/routes.json (2 hunks)
  • apps/docs/content/docs/api-references/cli-api.mdx (2 hunks)
🧰 Additional context used
🪛 LanguageTool
apps/docs/content/docs/api-references/cli-api.mdx

[style] ~105-~105: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...d HeroUI components to your project. 2. Add Hero Chat codebase to your project. ##...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~109-~109: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’).
Context: ...e to your project. #### Features > 1. Auto add the missing required dependencies to ...

(AUTO_HYPHEN)


[duplication] ~122-~122: Possible typo: you repeated a word.
Context: ...string] The path to the tailwind.config file file - -app --appPath [string] The path to...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~124-~124: The double modal “required installed” is nonstandard (only accepted in certain dialects). Consider “to be installed”.
Context: ...ormat in the add content which required installed prettier - (default: false) - `--addA...

(NEEDS_FIXED)

⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Tests
  • GitHub Check: TypeScript
  • GitHub Check: Prettier
  • GitHub Check: ESLint
  • GitHub Check: Build
  • GitHub Check: Continuous Release
🔇 Additional comments (3)
apps/docs/config/routes.json (1)

471-476: Add "updated": true to HeroUI CLI Route

The "cli-api" route now includes the "updated": true property, which clearly flags that this documentation route has been modified. Verify that any consumers or processes referencing this route are prepared to handle the new property.

apps/docs/content/docs/api-references/cli-api.mdx (2)

115-115: Parameter Name Clarification

The command usage now shows heroui add [targets...] [options], which replaces the previous [components...]. This renaming reflects that the command can handle a broader range of targets—not just components—which is a welcome clarification.


127-128: New Directory Option Implementation

The newly added option --directory is clear and provides a way to specify a custom directory for adding the Hero Chat codebase. Confirm that the underlying implementation correctly handles this new parameter.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 18, 2025

Open in Stackblitz

@heroui/accordion

npm i https://pkg.pr.new/@heroui/accordion@5077

@heroui/alert

npm i https://pkg.pr.new/@heroui/alert@5077

@heroui/autocomplete

npm i https://pkg.pr.new/@heroui/autocomplete@5077

@heroui/avatar

npm i https://pkg.pr.new/@heroui/avatar@5077

@heroui/badge

npm i https://pkg.pr.new/@heroui/badge@5077

@heroui/breadcrumbs

npm i https://pkg.pr.new/@heroui/breadcrumbs@5077

@heroui/button

npm i https://pkg.pr.new/@heroui/button@5077

@heroui/calendar

npm i https://pkg.pr.new/@heroui/calendar@5077

@heroui/card

npm i https://pkg.pr.new/@heroui/card@5077

@heroui/checkbox

npm i https://pkg.pr.new/@heroui/checkbox@5077

@heroui/chip

npm i https://pkg.pr.new/@heroui/chip@5077

@heroui/code

npm i https://pkg.pr.new/@heroui/code@5077

@heroui/date-input

npm i https://pkg.pr.new/@heroui/date-input@5077

@heroui/date-picker

npm i https://pkg.pr.new/@heroui/date-picker@5077

@heroui/divider

npm i https://pkg.pr.new/@heroui/divider@5077

@heroui/drawer

npm i https://pkg.pr.new/@heroui/drawer@5077

@heroui/dropdown

npm i https://pkg.pr.new/@heroui/dropdown@5077

@heroui/form

npm i https://pkg.pr.new/@heroui/form@5077

@heroui/image

npm i https://pkg.pr.new/@heroui/image@5077

@heroui/input

npm i https://pkg.pr.new/@heroui/input@5077

@heroui/input-otp

npm i https://pkg.pr.new/@heroui/input-otp@5077

@heroui/kbd

npm i https://pkg.pr.new/@heroui/kbd@5077

@heroui/link

npm i https://pkg.pr.new/@heroui/link@5077

@heroui/listbox

npm i https://pkg.pr.new/@heroui/listbox@5077

@heroui/menu

npm i https://pkg.pr.new/@heroui/menu@5077

@heroui/modal

npm i https://pkg.pr.new/@heroui/modal@5077

@heroui/navbar

npm i https://pkg.pr.new/@heroui/navbar@5077

@heroui/number-input

npm i https://pkg.pr.new/@heroui/number-input@5077

@heroui/pagination

npm i https://pkg.pr.new/@heroui/pagination@5077

@heroui/popover

npm i https://pkg.pr.new/@heroui/popover@5077

@heroui/progress

npm i https://pkg.pr.new/@heroui/progress@5077

@heroui/radio

npm i https://pkg.pr.new/@heroui/radio@5077

@heroui/ripple

npm i https://pkg.pr.new/@heroui/ripple@5077

@heroui/scroll-shadow

npm i https://pkg.pr.new/@heroui/scroll-shadow@5077

@heroui/select

npm i https://pkg.pr.new/@heroui/select@5077

@heroui/skeleton

npm i https://pkg.pr.new/@heroui/skeleton@5077

@heroui/slider

npm i https://pkg.pr.new/@heroui/slider@5077

@heroui/snippet

npm i https://pkg.pr.new/@heroui/snippet@5077

@heroui/spacer

npm i https://pkg.pr.new/@heroui/spacer@5077

@heroui/spinner

npm i https://pkg.pr.new/@heroui/spinner@5077

@heroui/switch

npm i https://pkg.pr.new/@heroui/switch@5077

@heroui/table

npm i https://pkg.pr.new/@heroui/table@5077

@heroui/tabs

npm i https://pkg.pr.new/@heroui/tabs@5077

@heroui/toast

npm i https://pkg.pr.new/@heroui/toast@5077

@heroui/tooltip

npm i https://pkg.pr.new/@heroui/tooltip@5077

@heroui/user

npm i https://pkg.pr.new/@heroui/user@5077

@heroui/react

npm i https://pkg.pr.new/@heroui/react@5077

@heroui/system

npm i https://pkg.pr.new/@heroui/system@5077

@heroui/system-rsc

npm i https://pkg.pr.new/@heroui/system-rsc@5077

@heroui/theme

npm i https://pkg.pr.new/@heroui/theme@5077

@heroui/use-aria-accordion

npm i https://pkg.pr.new/@heroui/use-aria-accordion@5077

@heroui/use-aria-accordion-item

npm i https://pkg.pr.new/@heroui/use-aria-accordion-item@5077

@heroui/use-aria-button

npm i https://pkg.pr.new/@heroui/use-aria-button@5077

@heroui/use-aria-link

npm i https://pkg.pr.new/@heroui/use-aria-link@5077

@heroui/use-aria-modal-overlay

npm i https://pkg.pr.new/@heroui/use-aria-modal-overlay@5077

@heroui/use-aria-multiselect

npm i https://pkg.pr.new/@heroui/use-aria-multiselect@5077

@heroui/use-callback-ref

npm i https://pkg.pr.new/@heroui/use-callback-ref@5077

@heroui/use-clipboard

npm i https://pkg.pr.new/@heroui/use-clipboard@5077

@heroui/use-data-scroll-overflow

npm i https://pkg.pr.new/@heroui/use-data-scroll-overflow@5077

@heroui/use-disclosure

npm i https://pkg.pr.new/@heroui/use-disclosure@5077

@heroui/use-draggable

npm i https://pkg.pr.new/@heroui/use-draggable@5077

@heroui/use-image

npm i https://pkg.pr.new/@heroui/use-image@5077

@heroui/use-infinite-scroll

npm i https://pkg.pr.new/@heroui/use-infinite-scroll@5077

@heroui/use-intersection-observer

npm i https://pkg.pr.new/@heroui/use-intersection-observer@5077

@heroui/use-is-mobile

npm i https://pkg.pr.new/@heroui/use-is-mobile@5077

@heroui/use-is-mounted

npm i https://pkg.pr.new/@heroui/use-is-mounted@5077

@heroui/use-measure

npm i https://pkg.pr.new/@heroui/use-measure@5077

@heroui/use-pagination

npm i https://pkg.pr.new/@heroui/use-pagination@5077

@heroui/use-real-shape

npm i https://pkg.pr.new/@heroui/use-real-shape@5077

@heroui/use-ref-state

npm i https://pkg.pr.new/@heroui/use-ref-state@5077

@heroui/use-resize

npm i https://pkg.pr.new/@heroui/use-resize@5077

@heroui/use-safe-layout-effect

npm i https://pkg.pr.new/@heroui/use-safe-layout-effect@5077

@heroui/use-scroll-position

npm i https://pkg.pr.new/@heroui/use-scroll-position@5077

@heroui/use-ssr

npm i https://pkg.pr.new/@heroui/use-ssr@5077

@heroui/use-theme

npm i https://pkg.pr.new/@heroui/use-theme@5077

@heroui/use-update-effect

npm i https://pkg.pr.new/@heroui/use-update-effect@5077

@heroui/aria-utils

npm i https://pkg.pr.new/@heroui/aria-utils@5077

@heroui/dom-animation

npm i https://pkg.pr.new/@heroui/dom-animation@5077

@heroui/framer-utils

npm i https://pkg.pr.new/@heroui/framer-utils@5077

@heroui/react-rsc-utils

npm i https://pkg.pr.new/@heroui/react-rsc-utils@5077

@heroui/react-utils

npm i https://pkg.pr.new/@heroui/react-utils@5077

@heroui/shared-icons

npm i https://pkg.pr.new/@heroui/shared-icons@5077

@heroui/shared-utils

npm i https://pkg.pr.new/@heroui/shared-utils@5077

@heroui/stories-utils

npm i https://pkg.pr.new/@heroui/stories-utils@5077

@heroui/test-utils

npm i https://pkg.pr.new/@heroui/test-utils@5077

commit: 650bfe2

> 1. Auto add the missing required `dependencies` to your project
> 2. Auto add the required `tailwindcss.config.js` configuration to your project
> 3. Detect whether using pnpm, if so, add the required configuration to your `.npmrc` file
> 4. Add Hero Chat codebase to your project
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hero chat -> HeroUI Chat

init [options] [projectName] Initializes a new project
add [options] [components...] Adds components to your project
add [options] [targets...] 1. Adds components to your project
2. Adds hero chat codebase to your project
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HeroUI Chat

- `--prettier` [boolean] Add prettier format in the add content which required installed prettier - (default: `false`)
- `--addApp` [boolean] Add App.tsx file content which required provider (default: `false`)
- `-b --beta` [boolean] Add beta components (default: `false`)
- `--directory` [string] Add hero chat codebase to a specific directory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. any short flag like -d?
  2. hero chat -> HeroUI Chat


Add HeroUI components to your project.
1. Add HeroUI components to your project.
2. Add Hero Chat codebase to your project.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hero chat -> HeroUI Chat

@wingkwong
Copy link
Member

Closing bc of #5111

@wingkwong wingkwong closed this Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants