CLI Usage

How to use the shadcn CLI to install Saastro blocks.

CLI Usage

Saastro blocks are installed using the shadcn CLI (v4+). No custom CLI needed.

Adding blocks

Once your registry is configured, install blocks with:

npx shadcn@latest add @saastro/hero-01

Install multiple blocks at once:

npx shadcn@latest add @saastro/hero-01 @saastro/features-01 @saastro/pricing-01

The CLI automatically resolves dependencies. For example, hero-01 depends on button and badge — if you don’t already have them, the CLI will install them from the default shadcn registry.

Available blocks

BlockCategoryDependencies
hero-01Herobutton, badge
hero-02Herobutton, badge
hero-03Herobutton, badge
features-01Featurescard
features-02Featuresbadge
pricing-01Pricingbutton, card, badge, separator
cta-01CTAbutton
faq-01FAQaccordion
testimonials-01Testimonialscard, avatar
footer-01Navigationseparator
navbar-01Navigationbutton, sheet
blog-grid-01Contentcard, badge
newsletter-01CTAbutton, input
stats-01Social Proof
logos-01Social Proof

How it works

When you run npx shadcn@latest add @saastro/hero-01, the CLI:

  1. Fetches https://ui.saastro.io/r/hero-01.json
  2. Reads the component source code and dependency list
  3. Installs any missing shadcn primitives (button, badge, etc.)
  4. Copies the block source into your project

Overwriting existing blocks

If you’ve modified a block and want to reset it:

npx shadcn@latest add @saastro/hero-01 --overwrite