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

@neutro74/snip-core

v0.1.0

Published

Core snippet storage and search library for snip — local-first snippet manager

Downloads

13

Readme

snip

Terminal-first snippet manager with VS Code + MCP integration. Local-first — all data lives in a single SQLite file under $XDG_DATA_HOME/snip/snip.db.

Three surfaces, one library:

  • CLIsnip add, snip search, interactive TUI
  • MCP server — exposes snippets to Claude Code / any MCP client
  • VS Code extension — sidebar, insert, save-selection-as-snippet

Layout

packages/
  core/     shared DB + search + types
  cli/      terminal interface
  mcp/      MCP server (stdio)
  vscode/   VS Code extension

Install

pnpm install
pnpm build

The CLI binary is linked as snip inside packages/cli/dist/index.js. To use globally:

pnpm --filter @snip/cli link --global

CLI

snip                          # interactive TUI (fuzzy search + preview)
snip add                      # create a snippet in $EDITOR
snip add -t "my thing" -l bash --tag devops --file script.sh
snip search "ssh vps" --tag bash
snip get <id> --raw           # print raw content (pipeable)
snip copy <id>                # copy to clipboard
snip copy <id> --var NAME=bob # fill {{NAME}} before copying
snip edit <id>                # open in $EDITOR
snip list --tag react
snip tags                     # all tags with counts
snip export snippets.json
snip import snippets.json
snip delete <id>

Ids can be passed as a short prefix (first 4+ hex chars) as long as it's unambiguous.

Templating

Any {{VAR_NAME}} placeholder becomes a variable. snip get, snip copy, and the MCP get_snippet tool accept values to fill them.

Database location

Defaults to $XDG_DATA_HOME/snip/snip.db (usually ~/.local/share/snip/snip.db). Override with SNIP_DB=/custom/path/snip.db.

MCP server

node packages/mcp/dist/index.js

Register with Claude Code (~/.claude/mcp.json or similar):

{
  "mcpServers": {
    "snip": {
      "command": "node",
      "args": ["/absolute/path/to/snip/packages/mcp/dist/index.js"]
    }
  }
}

Exposed tools:

| Tool | Purpose | |---|---| | search_snippets | Fuzzy search with optional tag/language filters | | get_snippet | Retrieve full content (supports template variables) | | create_snippet | Save a new snippet | | update_snippet | Modify any field | | delete_snippet | Remove a snippet | | list_tags | Browse tags with counts |

VS Code extension

From packages/vscode/:

pnpm build
code --install-extension .   # or F5 from VS Code for dev

Features:

  • Activity-bar sidebar with tag filter
  • Snip: Insert Snippet — fuzzy picker, replaces selection
  • Snip: Save Selection as Snippet — right-click in editor
  • Snip: Edit Snippet — opens in a temporary buffer; save to persist
  • Variable substitution UI for {{VAR}} placeholders

Data model

interface Snippet {
  id: string;           // uuid
  title: string;
  content: string;
  language: string;     // for syntax highlighting
  tags: string[];       // lowercased
  description: string | null;
  source: string | null;
  variables: string[];  // extracted from content
  created_at: string;   // ISO
  updated_at: string;
}

Sync (manual)

Use snip export + snip import with any transport you like (git repo, Gist, Dropbox, rsync).