{"id":30349698,"url":"https://github.com/peeyush-04/snipper","last_synced_at":"2025-08-18T20:08:37.681Z","repository":{"id":306619784,"uuid":"1026548146","full_name":"Peeyush-04/snipper","owner":"Peeyush-04","description":"A cargo-style developer tool to save, import, export, edit, and add any type of snippets.","archived":false,"fork":false,"pushed_at":"2025-07-26T19:56:18.000Z","size":183,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-26T20:52:36.193Z","etag":null,"topics":["automation","cmake","cpp17","developer-tool","shell-scripting","test-automation"],"latest_commit_sha":null,"homepage":"","language":"C++","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/Peeyush-04.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-26T05:33:08.000Z","updated_at":"2025-07-26T20:30:06.000Z","dependencies_parsed_at":"2025-07-26T21:03:14.554Z","dependency_job_id":null,"html_url":"https://github.com/Peeyush-04/snipper","commit_stats":null,"previous_names":["peeyush-04/snipper"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Peeyush-04/snipper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peeyush-04%2Fsnipper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peeyush-04%2Fsnipper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peeyush-04%2Fsnipper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peeyush-04%2Fsnipper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Peeyush-04","download_url":"https://codeload.github.com/Peeyush-04/snipper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peeyush-04%2Fsnipper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271053844,"owners_count":24691198,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["automation","cmake","cpp17","developer-tool","shell-scripting","test-automation"],"created_at":"2025-08-18T20:08:36.873Z","updated_at":"2025-08-18T20:08:37.672Z","avatar_url":"https://github.com/Peeyush-04.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snipper\n\n**Snipper** is a powerful, cross-platform, command-line snippet manager built in C++.\nIt helps developers save, search, tag, edit, and manage reusable code snippets (currently using a cargo-style CLI).\n\n## Features\n\n- Add, remove, rename, and edit snippets\n- Tag support and tag-based listing\n- Full-text search\n- Export and import to/from JSON\n- Snippet ID normalization\n- Clean CLI experience\n- Cross-platform support (Windows, Linux, macOS)\n- Built-in test suite using GoogleTest\n\n### Adding Snippets (with multiline paste support)\n\nUse the interactive `snipper add` command to add a new snippet.\n\n```bash\nsnipper add\n```\n\n- You'll be prompted to enter ID, Title, Content, and Tags.\n- For content, you can paste multiline code (like from VS Code, Sublime, etc.).\n- After pasting, press:\n- Ctrl+D on Linux/macOS\n- Ctrl+Z then Enter on Windows\nto finish content input.\n\nExample:\n\n```\nEnter Content (paste multiple lines and press Ctrl+D (Linux/macOS) or Ctrl+Z then Enter (Windows) to finish):\nfor (int i = 0; i \u003c 10; ++i) {\n    std::cout \u003c\u003c i \u003c\u003c std::endl;\n}\n[Ctrl+D]-\u003e[press Enter afterwords]\n```\n\n## Getting Started\n\n### Prerequisites\n\n- CMake \u003e= 3.14\n- C++17 compatible compiler (MSVC, g++, clang++)\n- Git\n- Make or Ninja (Linux/macOS)\n- PowerShell or CMD (Windows)\n\n### Clone the repository\n\n```bash\ngit clone https://github.com/Peeyush-04/snipper.git\ncd snipper\n```\n\n### Build Instructions\n\n#### Windows (PowerShell)\n\n```powershell\nmkdir -p build\ncd build\ncmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..\nninja\n```\n\n#### Linux / macOS\n\n```bash\nmkdir build\ncd build\ncmake ..\nmake -j$(nproc)\n```\n\n### Auto Path Setup\n\nAfter successful build, the CLI binary (`snipper-cli` or `snipper-cli.exe`) is moved to the `scripts/` directory, which is automatically added to your system `PATH`.\n\nYou can now use `snipper` globally from any terminal session.\n\nIf it does not work immediately, restart your terminal or VS Code.\n\n## Usage\n\n```bash\nsnipper init                 # Initialize the database/config (optional) - creates backup-db if [name] is promted\n# (do not use [name] currently - only for backup purposes, use init only)\nsnipper add                  # Add a new snippet\nsnipper list                 # List all snippets\nsnipper show \u003cid\u003e            # Show a snippet by ID\nsnipper remove \u003cid\u003e          # Remove snippet by ID\nsnipper rename \u003cid\u003e \u003ctitle\u003e  # Rename snippet title\nsnipper edit \u003cid\u003e            # Edit a snippet in-place\nsnipper search \u003cquery\u003e       # Search snippets (by content/tags)\nsnipper list-by-tags \u003ctag\u003e   # List snippets by tag\nsnipper export \u003cfile\u003e        # Export to JSON file\nsnipper import \u003cfile\u003e        # Import from JSON file\nsnipper stats                # Show usage statistics\nsnipper clear                # Clear all snippets (use with caution)\n```\n\n## Testing\n\nSnipper uses [GoogleTest](https://github.com/google/googletest) for unit testing.\n\nTo build and run tests:\n\n```bash\n[start from project root]\nmkdir -p data\ncd build\nctest --verbose\n[OR]\nninja test (To do complete testing)\n```\n\nOr run specific test executables inside `build/bin` directory:\n\n```bash\n./build/bin/test_snipper_app\n```\n\n## Directory Structure\n\n```\nsnipper/\n├── include/                # Public headers\n│   ├── app/\n│   ├── core/\n│   ├── models/\n│   ├── platform/\n│   ├── search/\n│   └── external/json.hpp\n├── src/                    # Implementation files\n│   ├── app/\n│   ├── core/\n│   ├── cli/\n│   ├── models/\n│   ├── platform/\n│   └── search/\n├── config/                 # Default config JSON\n├── data/                   # Snippets database\n├── tests/                  # GoogleTest-based unit tests\n├── scripts/                # CLI binary is output here\n├── CMakeLists.txt          # CMake build file\n└── README.md               # You're here!\n```\n\n## Compatibility\n\nSnipper is tested and works on:\n\n- Windows 10/11 (PowerShell, CMD)\n- Ubuntu Linux (bash, zsh)\n- macOS (zsh)\n\nThe CLI binary works globally once built, and the scripts directory is included in PATH automatically during build.\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n\n---\n\n**Happy Snipping!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeeyush-04%2Fsnipper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeeyush-04%2Fsnipper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeeyush-04%2Fsnipper/lists"}