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

@hyperobjekt/cli

v1.0.1

Published

CLI tools and generators for Hyperobjekt projects

Readme

@hyperobjekt/cli

CLI tools and generators for Hyperobjekt projects, including component swizzling and other development utilities.

Installation

# In a Hyperobjekt project
pnpm add @hyperobjekt/cli

# Or install globally
pnpm add -g @hyperobjekt/cli

Usage

Component Swizzling

Swizzle components from @hyperobjekt/ui to customize them for your project:

Interactive Package and Component Selection

pnpm swizzle
# or
hyperobjekt swizzle

This will prompt you to:

  1. Select which package to swizzle from (currently only @hyperobjekt/ui)
  2. Choose a component from the available list
  3. Specify where to place the swizzled component
  4. Choose whether to copy associated CSS files

Direct Component Selection

pnpm swizzle ui
# or
hyperobjekt swizzle ui

This skips the package selection and goes directly to component selection.

Direct Component Swizzling

pnpm swizzle ui/Hero
pnpm swizzle ui/button
pnpm swizzle ui/CONTAINER
# or
hyperobjekt swizzle ui/Hero

This directly swizzles the specified component. Component names are case-insensitive.

List Available Components

pnpm list-components
# or
hyperobjekt list-components

Shows all available components that can be swizzled from @hyperobjekt/ui.

What is Swizzling?

Swizzling is the process of copying a component from a library into your project so you can modify it without affecting the original library component. This is useful when you need to:

  • Customize the appearance or behavior of a component
  • Add project-specific functionality
  • Override default styles or props
  • Create variations of existing components

Project Setup

To use the CLI in your project, add it as a dependency and create npm scripts:

{
  "dependencies": {
    "@hyperobjekt/cli": "workspace:*"
  },
  "scripts": {
    "swizzle": "hyperobjekt swizzle",
    "list-components": "hyperobjekt list-components"
  }
}

Available Components

The following components are available for swizzling from @hyperobjekt/ui:

  • AnchorLink
  • Breadcrumbs
  • Button
  • ButtonLink
  • Container
  • Footer
  • Header
  • Heading
  • Hero
  • HorizontalRule
  • Paragraph
  • Text
  • Typography

File Structure

Swizzled components are placed in your src/ directory. By default, they go into src/components/ComponentName/, but you can specify a custom path during the swizzling process.

Example structure after swizzling the Hero component:

src/
  components/
    Hero/
      index.jsx
      styles.module.css
      README.md

Using Swizzled Components

After swizzling, update your imports to use the local component instead of the library version:

// Before swizzling
import { Hero } from '@hyperobjekt/ui';

// After swizzling
import { Hero } from './components/Hero';

Development

This package uses plop.js internally to handle code generation and file copying. The CLI automatically detects the location of @hyperobjekt/ui components whether you're in a monorepo or using it as an installed dependency.

Future Enhancements

This CLI package is designed to be extensible. Future versions may include:

  • Component generation templates
  • Project scaffolding tools
  • Code migration utilities
  • Custom generator plugins

Contributing

When adding new generators or features:

  1. Add the generator to src/plopfile.js
  2. Update the CLI documentation
  3. Test with both monorepo and standalone project setups
  4. Ensure proper error handling and user feedback