{"id":13582159,"url":"https://github.com/djyde/snp","last_synced_at":"2026-03-16T11:04:38.363Z","repository":{"id":55475132,"uuid":"324147281","full_name":"djyde/snp","owner":"djyde","description":"VS Code code snippet generator","archived":false,"fork":false,"pushed_at":"2022-05-09T09:15:57.000Z","size":1707,"stargazers_count":70,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T15:21:30.467Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djyde.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-24T12:05:46.000Z","updated_at":"2024-07-12T08:55:33.000Z","dependencies_parsed_at":"2022-08-15T01:10:42.117Z","dependency_job_id":null,"html_url":"https://github.com/djyde/snp","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djyde%2Fsnp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djyde%2Fsnp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djyde%2Fsnp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djyde%2Fsnp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djyde","download_url":"https://codeload.github.com/djyde/snp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249002581,"owners_count":21196644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:02:27.782Z","updated_at":"2026-03-16T11:04:33.316Z","avatar_url":"https://github.com/djyde.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# snp\n\nVS Code code snippets generator.\n\n## Install\n\n```\ncurl -sf https://gobinaries.com/djyde/snp | sh\n```\n\nFor Windows users, please download it in [release](https://github.com/djyde/snp/releases) page.\n\n## Usage\n\n\u003e See [my snippets](https://github.com/djyde/snippets) as example.\n\n```\n$ mkdir my-snippets\n$ cd my-snippets\n\n$ touch csl.snp\n```\n\n```js\n// csl.snp\n\n---\nscope: javascript\ndescription: console log\n---\n\nconsole.log($1)\n```\n\n```bash\n$ snp -u\n```\n\n`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.\n\n\u003e The program only find the files with `.snp` extension in current working directory.\n\n### The `.snp` file\n\n`.snp` is just a file with [front matter](https://jekyllrb.com/docs/front-matter) and the snippet code. You should pass at least these attributes:\n\n- [scope](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_language-snippet-scope)\n- **description** The description of this snippet\n\nThe file name would become the snippet prefix (the trigger text).\n\nFor the snippet syntax, you should see the [VS Code Docs](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax)\n\n## CLI Options\n\n```\n$ snp --help\n\nUsage of snp:\n  -p\tShould print out the json text\n  -u\tShould automatically update snippet file in VS Code\n  -v\tPrint version\n\n```\n\n### -p\n\nInstead 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:\n\n```\nsnp -p \u003e my-snippet.code-snippets\n```\n\n## Build\n\n```\ngo install\n\ngo build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjyde%2Fsnp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjyde%2Fsnp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjyde%2Fsnp/lists"}