npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@spartan-ng/cli

v1.1.0

Published

[![npm version](https://img.shields.io/npm/v/@spartan-ng/cli.svg?style=flat-square)](https://www.npmjs.com/package/@spartan-ng/cli) [![npm downloads](https://img.shields.io/npm/dm/@spartan-ng/cli.svg?style=flat-square)](https://www.npmjs.com/package/@spar

Readme

@spartan-ng/cli

npm version npm downloads License: MIT Discord

WebsiteDocumentationComponentsGitHub

The official CLI for spartan/ui. Add accessible, beautifully styled Angular components to any project with one command.

@spartan-ng/cli is an Nx plugin and Angular schematic that wires up the spartan/ui two-layer architecture for you: the brain primitives are installed from npm and the helm styles are copied into your codebase where you own them. Works with both Angular CLI projects and Nx workspaces - no extra configuration required.

Installation

npm install -D @spartan-ng/cli
# or
pnpm add -D @spartan-ng/cli
# or
yarn add -D @spartan-ng/cli

Prerequisite: spartan/ui requires Tailwind CSS. If you haven't set it up yet, follow the official Angular installation guide first.

Quick Start

# 1. Initialize spartan in your project (theme, dependencies, Tailwind preset)
ng g @spartan-ng/cli:init
# Nx: npx nx g @spartan-ng/cli:init

# 2. Add the components you need (interactive picker)
ng g @spartan-ng/cli:ui
# Nx: npx nx g @spartan-ng/cli:ui

# 3. Add a single component by name
ng g @spartan-ng/cli:ui button

The CLI installs the relevant @spartan-ng/brain entry points as npm dependencies and copies the helm component code straight into your project so you can edit every style.

Generators

Setup

| Generator | Description | | ------------- | ------------------------------------------------------------------------------------------ | | init | Initialize a spartan/ui project - adds dependencies, the Tailwind preset, and the theme. | | ui | Add one, many, or all spartan/ui primitives to your project. | | ui-theme | Generate the theme CSS variables and Tailwind setup interactively. | | healthcheck | Scan your workspace for outdated patterns and (optionally) auto-fix them with --autoFix. |

Migrations

The CLI ships with a suite of generators that automate breaking changes between spartan releases. They keep upgrades to a single command.

| Generator | Description | | ------------------------------------ | -------------------------------------------------------------------------------------------- | | migrate-brain-accordion-trigger | Wrap brain accordion triggers in a heading element. | | migrate-brain-imports | Move brain imports to their secondary entry points. | | migrate-brn-checkbox-changed-event | Rename changed to checkedChange on brn-checkbox. | | migrate-brn-switch-changed-event | Rename changed to checkedChange on brn-switch. | | migrate-core | Migrate the legacy core library to the @spartan-ng/brain/core entry point. | | migrate-date-picker | Rename changed to dateChange on hlm-date-picker. | | migrate-helm-imports | Move helm imports to the new entry-point structure. | | migrate-helm-libraries | Update helm libraries to their latest versions. | | migrate-hlm | Move hlm from @spartan-ng/brain to @spartan-ng/helm/utils. | | migrate-input-id | Rename the id input on helm inputs to inputId. | | migrate-icon | Migrate hlm-icon to ng-icon. | | migrate-module-imports | Replace NgModule-style imports with const array imports. | | migrate-naming-conventions | Update legacy naming conventions to the latest standards. | | migrate-progress | Migrate brn-progress to hlm-progress. | | migrate-radio | Migrate brn-radio to hlm-radio. | | migrate-scroll-area | Migrate hlm-scroll-area to ngx-scrollbar. | | migrate-select | Migrate brn-select / hlm-select to openChange and active descendants. | | migrate-separator | Migrate brn-separator to hlm-separator. | | migrate-toggle-group | Move brn-toggle-group from @spartan-ng/brain/toggle to @spartan-ng/brain/toggle-group. |

Run any migration with:

ng g @spartan-ng/cli:<migration-name>
# Nx: npx nx g @spartan-ng/cli:<migration-name>

What the CLI does

When you add a component, the CLI:

  • Installs the brain primitive - adds the right @spartan-ng/brain secondary entry point to your package.json.
  • Copies the helm styles - drops the styled component into your project so you can edit it freely.
  • Wires up imports - updates your workspace configuration so the new components resolve out of the box.
  • Creates libraries (Nx) - optionally generates buildable Nx libraries for clean code organization.

Supported Components

The ui generator can scaffold any of the spartan/ui primitives, including accordion, alert, alert-dialog, aspect-ratio, autocomplete, avatar, badge, breadcrumb, button, button-group, calendar, card, carousel, checkbox, collapsible, combobox, command, context-menu, date-picker, dialog, dropdown-menu, empty, field, hover-card, icon, input, input-group, input-otp, item, kbd, label, menubar, native-select, navigation-menu, pagination, popover, progress, radio-group, resizable, scroll-area, select, separator, sheet, sidebar, skeleton, slider, sonner, spinner, switch, table, tabs, textarea, toggle, toggle-group, tooltip, typography, and utils.

See the components gallery for live examples.

Documentation

Community

License

MIT © goetzrobin and the spartan contributors