🚀 Gistr
Lightning-fast code sharing via GitHub Gists with automatic URL shortening. Share your code in seconds!

✨ Features
- ⚡ Lightning Fast: One-click sharing with
Ctrl+Shift+G
- 🔗 Auto URL Shortening: Automatically shortens Gist URLs for easy sharing
- 📋 Clipboard Ready: Shortened URLs copied to clipboard instantly
- 📊 Visual Progress: Real-time progress notifications and status updates
- 🎯 Multiple Access Points: Command palette, keyboard shortcut, context menu, status bar
- 🛠️ Configurable: Choose your URL shortener, visibility, and more
- 🔍 Detailed Logging: Comprehensive logging for troubleshooting
- ❌ Smart Error Handling: Graceful fallbacks and helpful error messages
🚀 Quick Start
1. Install & Setup
- Install Gistr from the VS Code Marketplace
- Get a GitHub Personal Access Token:
- Configure Gistr:
- Open VS Code Settings (
Ctrl+,
)
- Search for "Gistr"
- Paste your token in "GitHub Token"
2. Share Your Code
- Open any file in VS Code
- Press
Ctrl+Shift+G
(or Cmd+Shift+G
on Mac)
- Watch the magic happen! ✨
Your code will be:
- 📤 Uploaded to GitHub Gist
- 🔗 URL automatically shortened
- 📋 Copied to clipboard
- 🎉 Ready to share!
🎮 How to Use
Multiple Ways to Share:
- Keyboard Shortcut:
Ctrl+Shift+G
(Windows/Linux) or Cmd+Shift+G
(Mac)
- Command Palette:
Gistr: Share as Gist
- Right-click Menu: "Share as Gist" in editor context menu
- Status Bar: Click the cloud upload icon
- Editor Title: Cloud upload button when file is focused
What Happens:
📁 Your File → 🌐 GitHub Gist → 🔗 Short URL → 📋 Clipboard
⚙️ Configuration
Access settings: VS Code Settings → Extensions → Gistr
Setting |
Description |
Default |
gistr.githubToken |
GitHub Personal Access Token |
required |
gistr.urlShortener |
URL shortening service |
tinyurl |
gistr.defaultVisibility |
Gist visibility |
public |
gistr.includeFilename |
Use original filename |
true |
gistr.showProgressNotification |
Show progress popups |
true |
URL Shortener Options:
- TinyURL (
tinyurl
) - Reliable and fast
- is.gd (
is.gd
) - Simple and clean
- v.gd (
v.gd
) - Alternative to is.gd
🔍 Visual Feedback
Gistr provides multiple levels of feedback:
📱 Progress Notifications
Real-time progress with steps:
- 📖 Reading file content...
- 🌐 Creating GitHub Gist...
- 🔗 Shortening URL...
- 📋 Copying to clipboard...
- ✅ Complete!
📊 Status Bar
- Shows Gistr status
- Click to share current file
- Visual feedback during operations
📝 Output Channel
Detailed logging available in "Gistr" output channel:
- Timestamps for all operations
- Success/error details
- Network request information
- Token validation results
🎉 Success Actions
After successful sharing, choose to:
- Copy URL Again - Re-copy to clipboard
- Open Gist - View on GitHub
- View Log - See detailed operation log
🛡️ Error Handling
Gistr handles common issues gracefully:
🔑 Token Issues
- Missing token → Setup guidance
- Invalid token → Clear error message
- Expired token → Renewal instructions
🌐 Network Issues
- Connection problems → Retry option
- API rate limits → Clear wait instructions
- Timeout errors → Automatic fallbacks
🔗 URL Shortening
- Service failures → Falls back to original Gist URL
- Invalid responses → Uses long URL as backup
🔧 Troubleshooting
Common Issues:
"No active file to share"
- Make sure you have a file open and focused
- The file should contain some content
"GitHub token is required"
"Invalid GitHub token"
- Verify token is correct
- Ensure
gist
scope is enabled
- Check token hasn't expired
Nothing happens when I press the shortcut
- Check the "Gistr" output channel for error details
- Verify the extension is activated
- Try using Command Palette: "Gistr: Share as Gist"
📋 Debug Steps:
- Open Command Palette (
Ctrl+Shift+P
)
- Run "Gistr: Share as Gist"
- Check "Gistr" output channel (View → Output → Gistr)
- Look for error messages or network issues
🔒 Privacy & Security
- ✅ GitHub tokens stored locally in VS Code settings
- ✅ Code sent only to GitHub (according to your visibility settings)
- ✅ URLs processed by chosen shortening service
- ✅ No data collected by Gistr extension
- ✅ Open source - inspect the code yourself
🚀 Development
Building from Source:
git clone <repository-url>
cd gistr
npm install
npm run compile
vsce package
Project Structure:
gistr/
├── src/extension.ts # Main extension code
├── package.json # Extension manifest
├── tsconfig.json # TypeScript config
└── README.md # This file
📈 Changelog
1.0.0
- 🎉 Initial release as "Gistr"
- ⚡ Lightning-fast code sharing
- 🔗 Automatic URL shortening
- 📊 Visual progress indicators
- 🎯 Multiple access points
- 📋 Instant clipboard copying
- 🛡️ Comprehensive error handling
- 📝 Detailed logging system
🤝 Contributing
Contributions welcome! Feel free to:
- 🐛 Report bugs
- 💡 Suggest features
- 🔧 Submit pull requests
- ⭐ Star the repository
📄 License
MIT License - feel free to use and modify!
Made with ❤️ for developers who love to share code quickly!
Share your code in seconds, not minutes. That's the Gistr way! 🚀