snipkit
v0.3.6
Published
A starter CLI built with TypeScript and Node.js
Maintainers
Readme
🚀 snipkit
The modern CLI for sharing and fetching code snippets instantly
A powerful command-line tool that lets you share your code templates with the world and instantly fetch code snippets from other developers. Perfect for teams, open-source contributors, and anyone who wants to streamline their development workflow.
✨ What is snipkit?
snipkit transforms how you share and discover code snippets. Instead of copying and pasting code from GitHub gists or documentation, you can:
- 📤 Share your code: Upload files and folders as organized snippets
- 📥 Fetch instantly: Download code templates with a single command
- 🔗 Social coding: Discover snippets from other developers via
@username/snippet-name - 🛡️ Access control: Choose between public and private snippets
- 📁 Smart structure: Maintains file/folder structure automatically
🚀 Quick Start
Install & Use Instantly
# Fetch a snippet (no installation required)
snipkit create @username/awesome-component
# Or install globally for faster access
npm install -g snipkit
snipkit create @username/react-hooks📖 Commands
🔽 Fetch Code Snippets
Download code templates and snippets from other users:
# Fetch an entire project/folder
snipkit create @bharatpanigrahi/react-starter
# Fetch a specific file from a snippet
snipkit create @bharatpanigrahi/utils/helpers.ts
# Interactive destination selection
snipkit create @username/component
# ↳ Choose where to save in your project structure📤 Share Your Code
Upload your files and folders to share with the community:
# Upload a single file
snipkit upload "My Utility Functions" ./src/utils.ts
# Upload an entire folder
snipkit upload "React Component Library" ./components
# Interactive options for description and privacy settings📋 Manage Your Snippets
# List all your uploaded snippets
snipkit list
# Logout and clear authentication
snipkit logout
# Refresh configuration from server
snipkit refresh🛠️ Key Features
| Feature | Description |
| ----------------------------- | ---------------------------------------------------------- |
| 🔐 Secure Authentication | Browser-based OAuth login with automatic token management |
| 📁 Smart File Handling | Preserves folder structure and file relationships |
| ⚡ Progress Tracking | Real-time upload/download progress with beautiful spinners |
| 🔍 Interactive Selection | Choose exactly where to save files in your project |
| 🎯 Content-Type Detection | Automatic MIME type detection for all file types |
| 🔒 Privacy Controls | Share publicly or keep snippets private |
| 🚀 Zero Config | Works immediately with npx - no setup required |
| 📱 Cross-Platform | Works on Windows, macOS, and Linux |
📋 Usage Examples
Real-World Scenarios
Frontend Developer
# Grab a React component template
snipkit create @frontend-masters/modal-component
# Share your custom hooks
snipkit upload "Custom React Hooks" ./src/hooksBackend Developer
# Get Express.js middleware templates
snipkit create @nodejs-guru/auth-middleware
# Share API route templates
snipkit upload "REST API Routes" ./routesFull-Stack Team
# Fetch the team's project scaffold
snipkit create @myteam/project-template
# Upload shared utilities
snipkit upload "Team Utils" ./shared/utils🏗️ How It Works
- 🔐 Authentication: Sign in via browser (OAuth) - stored securely
- 📤 Upload: Your code is uploaded with metadata (title, description, access level)
- 🔗 Share: Others access your code via
@yourusername/snippet-name - 📥 Fetch: Anyone can download public snippets instantly
- 📁 Smart Placement: Interactive prompts help choose the right destination
🤝 Perfect For
- 🏢 Development Teams: Share internal templates and boilerplates
- 👨🎓 Educators: Distribute coding examples and assignments
- 🚀 Open Source: Quick snippet sharing without full repositories
- 💡 Personal Use: Your own cloud-based code snippet library
- 🎯 Rapid Prototyping: Instant access to common code patterns
🔧 Advanced Usage
Slug Format
# User's snippet collection
@username/snippet-name
# Specific file in a snippet
@username/snippet-name/path/to/file.js
# Examples
snipkit create @bharatpanigrahi/react-components
snipkit create @bharatpanigrahi/utils/database.tsUpload Options
- Title: Human-readable name for your snippet
- Description: Detailed explanation of what the code does
- Access Level: Public (everyone) or Private (just you)
- File Detection: Automatically scans and includes all files
🛡️ Privacy & Security
- 🔐 Secure Authentication: OAuth-based login with encrypted token storage
- 🛡️ Private Snippets: Keep sensitive code private to your account
- 🌐 Public Sharing: Share useful code with the global developer community
- 🔄 Token Refresh: Automatic token renewal and configuration management
📄 License
MIT License - feel free to use in your projects!
Built with ❤️ by Bharat Panigrahi
Transform your development workflow with instant code sharing ✨
