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

@nectary/cli

v1.0.16

Published

CLI to add Nectary compositions as React components to your project

Readme

Nectary CLI

Add Nectary compositions (higher-order React components built on @nectary/components) directly into your project. This follows the same “copy source into your repo” approach as Shadcn UI, so you own the code and can edit it. It is aimed at React 16–18 apps where using these compositions as web components would require awkward serialization of objects/arrays.

Prerequisites

  • Node ^18.19.0 or >=20.5.0 (see engines in package.json)
  • A project with @nectary/components installed

Usage

List compositions

npx @nectary/cli list

Prints each available composition name and its one-line description.

View a composition

Preview a composition before adding it (description, dependencies, and files that would be written):

npx @nectary/cli view <name>

Example:

npx @nectary/cli view table

Add a composition

From your project root:

npx @nectary/cli add <name>

Examples:

npx @nectary/cli add button
npx @nectary/cli add select
npx @nectary/cli add phone-input
npx @nectary/cli add table

Files are written under src/components/nectary/ by default (see Configuration). The CLI will also install any npm dependencies required by the composition (e.g. countries-phone-masks for phone-input).

Options

  • --path <path> – Override the output directory (default: src/components/nectary).
  • --overwrite – Replace existing files. Without this, existing files are skipped.

Configuration

Optional: create a nectary.json file at your project root to set the default components path:

{
  "componentsPath": "src/components/nectary"
}

If nectary.json is missing, the CLI uses src/components/nectary.

Available compositions

Compositions live in this package under registry/ and can be customized (e.g. add props) without touching the docs.

| Name | Description | Dependencies | |------|-------------|--------------| | button | Simple Button (sinch-button). Props: text, aria-label, type, size, disabled, toggled, formType, onClick. | — | | select | Select with search. Props: options, placeholder, searchPlaceholder, value, onChange, style, ariaLabel. | — | | phone-input | Phone input with country code selector. Props: placeholder, value, onChange, style, ariaLabel. | countries-phone-masks | | table | Table composition. Props: columns, data, getRowKey. | — |

Running locally (development)

From the monorepo root or from packages/nectary-cli:

pnpm --filter nectary build

Then from the project where you want to add a composition:

node /path/to/nectary/packages/nectary-cli/dist/index.js add select

Or from packages/nectary-cli:

node dist/index.js add select

Adding a new composition to the registry

  1. Add the composition source in this package under registry/<name>/ (e.g. registry/select/Search.tsx). You can add whatever props you want; these files are the single source of truth for the CLI and are independent of the docs.
  2. Edit registry.json in this package. Add an item with:
    • name – Kebab-case id used in nectary add <name>.
    • description – Short description.
    • dependencies – Array of npm package names (e.g. "zod", "@hookform/resolvers").
    • files – Array of { "path": "OutputPath/File.tsx", "source": "registry/<name>/File.tsx" }.
      path is where the file will be written in the user's project (relative to their components path). source is relative to this package root (e.g. registry/select/Search.tsx).
  3. Rebuild the registry: from packages/nectary-cli, run pnpm run build (or pnpm run build:registry after tsc). This reads the manifest and writes dist/registry/<name>.json.
  4. Publish the nectary package so users can run npx @nectary/cli add <name>.