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

csnp

v1.5.2

Published

A cli-tool for generating VSCode code snippets.

Readme

Introduction

csnp (Connect Snippets) helps you manage VSCode snippets using simple .csnp files. It bridges the gap between your snippet definitions and VSCode's configuration, allowing you to edit snippets in a clean, file-based format and sync them automatically.

Installation

# via pnpm (recommended)
pnpm add -g csnp

# via npm
npm install -g csnp

# via yarn
yarn global add csnp

# via bun
bun add -g csnp

Quick Start

  1. Create a snippet: Simply run csnp to start the interactive guide.

    csnp
  2. Edit your snippet: The command above will generate a .csnp file (e.g., .csnp/js/log.csnp). Open it and edit the content:

    ---
    name: Log
    prefix: '-log'
    description: log something
    ---
    
    console.log($1)
  3. Push to VSCode: Apply your changes to VSCode.

    csnp push
  4. Use it: Open a JavaScript file in VSCode, type -log, and press Enter!

Commands

push

Commit your code snippets into VSCode.

# Push to Local scope (.vscode/ folder in current project)
csnp push

# Push to Global scope (VSCode User Snippets)
csnp push -G

pull

Sync snippets from VSCode configuration back to your .csnp files. Useful for editing existing snippets.

# Pull from Local scope
csnp pull

# Pull from Global scope
csnp pull -G

list / ls

List all stored code snippets files.

csnp ls

preview / pv

Preview the parsed content of your snippets in the terminal.

csnp pv

Help & Version

# Display help message
csnp -H

# Display version number
csnp -V

File Structure

The standard path for a snippet file is: .csnp/{SnippetType}/{SnippetName}.csnp

.vscode/                   # VSCode configuration directory
└── .csnp/                 # CSNP storage directory
    ├── js/                # [SnippetType] Language ID (e.g. javascript)
    │   ├── log.csnp       # [SnippetName] Snippet definition file
    │   └── util.csnp
    ├── ts/
    │   └── interface.csnp
    └── vue/
        └── component.csnp
  • SnippetType: The language ID (e.g., js, ts, vue, react, python).
  • SnippetName: The filename for your snippet.

Example: .csnp/js/log.csnp

Inside the file, use YAML frontmatter for metadata and the body for the code:

---
name: Log
prefix: '-log'
description: A console log snippet
scope: javascript,typescript
---

console.log('Hello CSNP!')

Scope

CSNP supports two scopes for storing snippets:

  • Local (Default): Stored in .vscode/ of your current project. Best for project-specific snippets.
  • Global (-G): Stored in VSCode's user data directory. Best for general-purpose snippets available in all projects.

Links

License

MIT © Junxio