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

slicejs-cli

v4.1.0

Published

Command client for developing web applications with Slice.js framework

Readme

About this repository

This repository contains the Slice.js CLI (slicejs-cli), the command-line tool for developing applications with the Slice.js framework. It includes a development server, build system, component management, and more.

Prerequisites

  • Node.js >= 20
  • npm or pnpm

Local development

  1. Clone the repository

    git clone https://github.com/VKneider/slicejs-cli.git
    cd slicejs-cli
  2. Install dependencies (the repo pins pnpm via the packageManager field)

    pnpm install --frozen-lockfile
  3. Test changes locally

    node client.js --help

    To bypass delegation to a global installation:

    SLICE_NO_LOCAL_DELEGATION=1 node client.js --help
  4. Run tests

    npm test

Installation (for users)

For a new project you don't install anything manually — slice init (see Quick start below) installs the CLI locally in the project it creates.

Local in an existing project (Recommended)

npm install slicejs-cli --save-dev    # or: pnpm add -D slicejs-cli

Global launcher (optional)

npm install -g slicejs-cli            # or: pnpm add -g slicejs-cli

The launcher delegates to the nearest project-local node_modules/slicejs-cli, so each project keeps its pinned CLI version.

Main commands

Inside initialized projects, prefer package scripts (pnpm run ..., npm run ...) over direct binary calls.

Common script workflow:

pnpm run dev
pnpm run build
pnpm run start
pnpm run browse
pnpm run get -- Button
pnpm run sync

Alternative with local devDependency resolution:

pnpm exec slice dev

If slicejs-cli is installed globally, slice can be executed directly from PATH.

For pnpm v10+, if build scripts are restricted, configure allowBuilds in pnpm-workspace.yaml:

allowBuilds:
  slicejs-cli: true

slice init --pm pnpm now writes this automatically.

| Command | Description | |---------|-------------| | slice init | Initialize a Slice.js project | | slice dev | Development server with hot reload | | slice build | Build for production | | slice start | Serve production build | | slice get <component> | Install components from the official registry | | slice browse | Browse available components | | slice component create | Create a local component | | slice skill add | Install the Slice.js Claude Code skill into .claude/skills/ | | slice doctor | Run project diagnostics | | slice postinstall | Configure npm scripts (alternative to postinstall) |

Claude Code skill (slice skill)

Installs the slice-js-developer skill — the guide Claude Code uses to build Slice.js apps correctly — into your project by fetching it from the official docs repo (VKneider/slicejs_docs), which is the single source of truth. A manifest.json there pins the skill version, its framework-compatibility range, and the exact file list, so the install never drifts.

| Command | Description | |---------|-------------| | slice skill add | Install the skill (prompts before overwriting an existing copy; --force skips the prompt) | | slice skill update | Update the installed skill to the latest compatible version | | slice skill status | Show the installed version vs. the latest available |

The skill is written to .claude/skills/slice-js-developer/ at the project root — inside Claude Code's standard skills path, not a loose folder next to src/:

my-app/
├── .claude/skills/slice-js-developer/   ← installed here
├── api/
├── src/                                  ← untouched
└── package.json

Run slice skill commands from the project root. All three subcommands (add, update, status) resolve the target from INIT_CWD / the current working directory, so running from a subfolder can place .claude/ somewhere unexpected. The install path itself is configurable via the installPath field in the docs repo's manifest.json. After installing, reload Claude Code to pick up the skill.

Postinstall Scripts

When you install slicejs-cli, the postinstall script automatically configures slice:* npm scripts in your package.json:

{
  "scripts": {
    "slice:init": "node ./node_modules/slicejs-cli/client.js init",
    "slice:dev": "node ./node_modules/slicejs-cli/client.js dev",
    "slice:build": "node ./node_modules/slicejs-cli/client.js build",
    "slice:start": "node ./node_modules/slicejs-cli/client.js start",
    "slice:create": "node ./node_modules/slicejs-cli/client.js component create",
    "slice:list": "node ./node_modules/slicejs-cli/client.js component list",
    "slice:delete": "node ./node_modules/slicejs-cli/client.js component delete",
    "slice:get": "node ./node_modules/slicejs-cli/client.js get",
    "slice:browse": "node ./node_modules/slicejs-cli/client.js browse",
    "slice:sync": "node ./node_modules/slicejs-cli/client.js sync",
    "slice:doctor": "node ./node_modules/slicejs-cli/client.js doctor",
    "slice:version": "node ./node_modules/slicejs-cli/client.js version",
    "slice:help": "node ./node_modules/slicejs-cli/client.js --help",
    "slice:types": "node ./node_modules/slicejs-cli/client.js types generate"
  }
}

If you installed with --ignore-scripts, run manually:

npx slicejs-cli postinstall

Quick start

slice init creates the project folder itself — no mkdir or npm init needed. Everything (package.json, node_modules, lockfile, src/, api/) lives inside the new folder.

# With npm
npx slicejs-cli init
cd my-app
npm run dev
# With pnpm
pnpm dlx slicejs-cli init
cd my-app
pnpm run dev

Non-interactive (for scripts/CI):

npx slicejs-cli init -y my-app --pm pnpm

init pins the chosen package manager in the packageManager field, installs slicejs-web-framework as a dependency and slicejs-cli as a devDependency of the new project. Versions are never hard-pinned at install time, so hardened pnpm setups (minimumReleaseAge quarantine, ignore-scripts) work out of the box.

Tests

The CLI uses Node.js native test runner:

# All tests
node --test

# Specific tests
node --test tests/postinstall-command.test.js

Project structure

slicejs-cli/
├── client.js              # CLI entry point
├── commands/              # Command implementations
│   ├── init/              # slice init
│   ├── build/             # slice build
│   ├── startServer/       # slice dev / slice start
│   ├── createComponent/   # slice component create
│   └── utils/             # PathHelper, VersionChecker, etc.
├── tests/                 # Tests
└── post.js                # Postinstall hook

Local delegation

When the slice command is globally available, it automatically delegates to the project-local CLI (node_modules/slicejs-cli). To disable:

SLICE_NO_LOCAL_DELEGATION=1 slice version

Contributing

We welcome contributions. Please review the guidelines in CODE_OF_CONDUCT.md before submitting changes.

License

Distributed under the ISC License. See LICENSE for more information.

Links

  • 📘 Documentation: https://slice-js-docs.vercel.app/Documentation/CLI
  • 🐙 GitHub: https://github.com/VKneider/slicejs-cli
  • 📦 npm: https://www.npmjs.com/package/slicejs-cli