MCPcopy Index your code
hub / github.com/djyde/snp

github.com/djyde/snp @v0.2.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.2 ↗ · + Follow
6 symbols 16 edges 3 files 2 documented · 33% updated 4y agov0.2.2 · 2022-05-09★ 713 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

snp

VS Code code snippets generator.

Install

curl -sf https://gobinaries.com/djyde/snp | sh

For Windows users, please download it in release page.

Usage

See my snippets as example.

$ mkdir my-snippets
$ cd my-snippets

$ touch csl.snp
// csl.snp

---
scope: javascript
description: console log
---

console.log($1)
$ snp -u

snp -u would write a code snippet file to your VS Code snippets folder. Then when you type csl in VS Code, the code snippet appear in IntelliSense.

The program only find the files with .snp extension in current working directory.

The .snp file

.snp is just a file with front matter and the snippet code. You should pass at least these attributes:

  • scope
  • description The description of this snippet

The file name would become the snippet prefix (the trigger text).

For the snippet syntax, you should see the VS Code Docs

CLI Options

$ snp --help

Usage of snp:
  -p    Should print out the json text
  -u    Should automatically update snippet file in VS Code
  -v    Print version

-p

Instead of updating the file on VS Code snippets folder, you could use -p to just print out the JSON and then use this output to do what you want, like output to a file:

snp -p > my-snippet.code-snippets

Build

go install

go build

Core symbols most depended-on inside this repo

Unmarshal
called by 1
front.go
jsonMarshal
called by 1
process.go
ParseSnpFiles
called by 1
process.go
main
called by 0
snp.go

Shape

Function 4
Struct 2

Languages

Go100%

Modules by API surface

process.go4 symbols
snp.go1 symbols
front.go1 symbols

For agents

$ claude mcp add snp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact