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

@styleui/cli

v1.0.38

Published

The local AST mutation daemon for StyleUI

Readme

@styleui/cli

The local AST mutation daemon and automated configuration setup utility for StyleUI.

This package provides the styleui command-line tool, which manages project initialization and controls the local WebSocket development daemon. The daemon synchronizes visual mutations from the StyleUI chrome extension back into your React/Next.js/Vite codebase in real-time.


Installation

You can install @styleui/cli globally to have the styleui command always available:

npm install -g @styleui/cli

Alternatively, you can run the CLI on-demand without prior installation using npx:

npx styleui <command> [options]

Commands & Usage

1. styleui init

Sets up the integration of StyleUI within your frontend project.

styleui init

What it does:

  1. Detects Your Environment: Checks package.json and config files to determine if your project is running Next.js or Vite.
  2. Installs Integration Plugins:
    • Installs @styleui/next-plugin as a devDependency in Next.js projects.
    • Installs @styleui/vite-plugin as a devDependency in Vite projects.
  3. AST Config Wrapping: Uses AST parsing (recast) to non-destructively wrap your existing next.config.js/mjs/ts or vite.config.ts/js/mjs/cjs to enable StyleUI source-tracing compiling:
    • For Next.js: Wraps the config object using withStyleUI.
    • For Vite: Adds withStyleUI() to the plugins array.

2. styleui dev

Launches the StyleUI development synchronization engine.

styleui dev [options]

What it does:

  1. License Gatekeeping: Prompts for a valid StyleUI License Key if not already authenticated. Saves the authenticated key locally at ~/.styleuikey.
  2. Spawns WebSocket Server: Starts the mutation daemon locally (by default on port 8899).
  3. Auto-Spawns Dev Server: Detects the package manager (npm, yarn, pnpm, or bun) and spawns the framework dev server (e.g. running npm run dev) in a concurrent child process, sharing standard I/O.
  4. Launches Browser: Automatically launches your browser pointing to http://localhost:3000 (or your local address) to kickstart visual editing.

Options:

  • -p, --port <number>: Port to run the WebSocket daemon server on. (Default: 8899)
  • -b, --browser <type>: Target browser to spawn. Options: "chrome", "edge", "auto". (Default: "auto")
  • -h, --help: Display command usage details.

Shell Help Output

To see all commands and globally available flags, run:

styleui --help

Output:

Usage: styleui [options] [command]

StyleUI Daemon - Local AST and WebSocket Engine

Options:
  -V, --version                output the version number
  -h, --help                   display help for command

Commands:
  init                         Automatically inject @styleui/next-plugin and wrap the Next.js config
  dev [options]                Start both the WebSocket daemon and the Next.js dev server concurrently
  help [command]               display help for command

To see detailed options for the dev command, run:

styleui dev --help

Output:

Usage: styleui dev [options]

Start both the WebSocket daemon and the Next.js dev server concurrently

Options:
  -p, --port <number>     port to run the WebSocket server on (default: "8899")
  -b, --browser <type>    Browser to launch ("chrome", "edge", "auto") (default: "auto")
  -h, --help              display help for command

Troubleshooting

Port Conflicts

If you see the error: ❌ Port 8899 is already in use. You can run the daemon on a custom port:

styleui dev -p 9000

Make sure to specify this same port in the StyleUI browser extension settings.

Dev Server Exited

If your React/Next.js dev server exits immediately upon run:

  1. Ensure you have run dependency installation (npm install, pnpm install, etc.).
  2. Verify that the port utilized by your Next.js/Vite application (typically 3000 or 5173) is not already bound by another process.