This project is a custom Command Line Interface (CLI) tool** for managing code snippets efficiently. It allows users to add, view, search, and copy snippets categorized by language, tags, or keywords. The tool supports fuzzy search and integrates with **Prisma + PostgreSQL for persistent storage. Designed for developers, it streamlines snippet reuse and organization directly from the terminal.
- Add & Store Snippets – Save code snippets with metadata like name, language, tags, and file path.
- Search & Fuzzy Matching – Find snippets using exact or partial keyword, language, or tag matches.
- Clipboard Integration – View snippets and instantly copy them to your clipboard for quick reuse.
- Persistent Storage with Prisma + PostgreSQL – Store and retrieve snippets from a reliable database backend.
commander– for creating CLI commandsclipboardy– to copy snippets to the clipboardfuse.js– enables fuzzy search functionalityinquirer– for interactive promptschalk– for colorful terminal outputdotenv– to manage environment variables@prisma/client– Prisma’s runtime client for database accessprisma– Prisma CLI for DB setup and migrations (devDependency)pg– PostgreSQL client for Node.js
npm install
npm install -D prisma
npm install pgnpx prisma initEdit the .env file to point to your PostgreSQL database:
DATABASE_URL="postgresql://username:password@localhost:5432/your-db-name"
mycli add-snippet
mycli search-snippet -l python| Samridh Suresh |
Made with ❤ by GDSC-VIT