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

@snipplle/cli

v1.0.0

Published

A CLI to manage Snipplle snippets

Readme

@snipplle/cli

Command-line tool to manage Snipplle snippets: authenticate, initialize projects, pull snippets and collections, and inspect versions — all from your terminal.

oclif Version Downloads/week License Node

Highlights

  • Simple login with an API token and optional custom API URL.
  • Project initialization with interactive prompts and multi-workspace support.
  • Pull single snippets or entire collections to your project source directory.
  • Inspect available versions for a snippet.
  • Works with Node.js >= 18 and uses familiar oclif ergonomics.

Quick Start

  1. Install globally:

    npm install -g @snipplle/cli
    # or: pnpm add -g @snipplle/cli
    # or: yarn global add @snipplle/cli
  2. Login using your Snipplle API token:

    snipplle login <TOKEN>
    # optionally specify API URL (defaults to https://snipplle.com/api/cli)
    snipplle login <TOKEN> -u https://snipplle.com/api/cli
  3. Initialize the current project (creates snipplle.config.json):

    snipplle init
    # You'll be asked for snippet source path (e.g. ./src/utils) and workspace slug.
    # You can also add additional workspace slugs.
  4. Pull content:

    # Pull a collection
    snipplle pull -c <workspace_slug>/<collection_slug>
    
    # Pull a specific snippet by version tag
    snipplle pull -s <workspace_slug>/<snippet_slug>@<version_tag>
  5. View snippet versions:

    snipplle version -s <workspace_slug>/<snippet_slug>

Configuration

There are two configuration files used by the CLI:

  • Global config at ~/.config/snipplle/config.json (created on login):

    • apiUrl: Base API URL, defaults to https://snipplle.com/api/cli.
    • token: Your API token.
    • userId: Your Snipplle user ID.
  • Project config at ./snipplle.config.json (created on init):

    • src: Relative path where pulled files are saved (e.g. ./src/utils).
    • workspace.main: { id, slug } for the main workspace.
    • workspace.additional: Array of { id, slug } for added workspaces.

Notes:

  • If snipplle.config.json already exists, init will ask to overwrite.
  • On pull, the CLI will create your src directory if it doesn’t exist.
  • Filenames are derived from the snippet or collection path; the file extension is taken from the remote artifact URL.

Usage

$ npm install -g @snipplle/cli
$ snipplle COMMAND
running command...
$ snipplle (--version)
@snipplle/cli/1.0.0 darwin-arm64 node-v22.14.0
$ snipplle --help [COMMAND]
USAGE
  $ snipplle COMMAND
...

Commands

snipplle help [COMMAND]

Display help for snipplle.

USAGE
  $ snipplle help [COMMAND...] [-n]

ARGUMENTS
  [COMMAND...]  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for snipplle.

See code: @oclif/plugin-help

snipplle init

Initialize Snipplle in the current project

USAGE
  $ snipplle init

DESCRIPTION
  Initialize Snipplle in the current project

See code: src/commands/init/index.ts

snipplle login TOKEN

Login to Snipplle

USAGE
  $ snipplle login TOKEN [-u <value>]

ARGUMENTS
  TOKEN  API token

FLAGS
  -u, --url=<value>  [default: https://studio.snipplle.com/api/cli] API URL

DESCRIPTION
  Login to Snipplle

See code: src/commands/login/index.ts

snipplle pull

Pull a snippet or a collection from Snipplle

USAGE
  $ snipplle pull [-c <value>] [-s <value>]

FLAGS
  -c, --collection=<value>  The collection to pull
  -s, --snippet=<value>     The snippet to pull

DESCRIPTION
  Pull a snippet or a collection from Snipplle

EXAMPLES
  $ snipplle pull -c workspace_slug/collection_slug

  $ snipplle pull -s workspace_slug/snippet_slug@version_tag

See code: src/commands/pull/index.ts

snipplle version

Get the version of Snipplle

USAGE
  $ snipplle version [-s <value>]

FLAGS
  -s, --snippet=<value>  Get the versions of the snippet

DESCRIPTION
  Get the version of Snipplle

See code: src/commands/version/index.ts

Troubleshooting

  • You must specify a snippet or a collection: Provide -s or -c flag to pull.
  • You don't have a project config: Run snipplle init in your project first.
  • Snippet or collection file not found: Check slugs and version tag correctness.
  • API errors show statusMessage: Ensure your token is valid and you’re logged in.

Contributing

  • Issues: https://github.com/snipplle/snipplle-cli/issues
  • Requirements: Node.js >= 18.
  • Scripts:
    • pnpm run build — build TypeScript to dist.
    • pnpm test — run test suite.
    • pnpm lint — run ESLint.

Workflow:

  • Fork the repo, create a feature branch, add tests if applicable, and open a PR.

License

MIT © Snipplle

Links

  • Homepage: https://github.com/snipplle/snipplle-cli
  • NPM: https://www.npmjs.com/package/@snipplle/cli