npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

key-to-drive

v1.2.0

Published

Upload clipboard content to Google Drive with hotkey shortcuts

Readme

Key-to-Drive

A CLI tool that uploads clipboard content to Google Drive using keyboard shortcuts. Perfect for quickly sharing clipboard content via Google Drive links.

⚡ Quick Start

Install and Run

# Run directly with bunx (recommended)
bunx kdr

# Or with npx
npx key-to-drive

# Or install globally
npm install -g key-to-drive
kdr

First Time Setup

  1. Get Google Drive API Credentials:

    • Go to Google Cloud Console
    • Create a project and enable Google Drive API
    • Create OAuth 2.0 credentials (Desktop application)
    • Download the credentials JSON file
  2. Setup Credentials:

    # Copy your downloaded credentials to the working directory
    cp ~/Downloads/credentials_xxx.json ./credentials.json
       
    # Or use the template
    cp credentials.template.json credentials.json
    # Then edit credentials.json with your actual values
  3. Run and Authenticate:

    kdr
    • First run will open your browser for Google authentication
    • Grant permissions to access Google Drive
    • Authentication token is saved to ~/.keytodrive/token.json

🎯 Usage

Commands

kdr                    # Start the key listener
kdr --help             # Show help
kdr --version          # Show version

Keyboard Shortcuts

  • Ctrl+Shift+U - Upload clipboard content to Google Drive
  • Ctrl+Shift+A - Retry authentication
  • Ctrl+C - Exit application

Workflow

  1. Copy content to clipboard:
    • 📝 Text content
    • 📁 File paths (drag files to Explorer/Finder, copy path)
    • 🔗 URLs and web content
  2. Press Ctrl+Shift+U
  3. 🎉 Content uploads to Google Drive
  4. 📋 Google Drive share URL is copied to clipboard
  5. 🔔 Success notification with sound
  6. Paste the URL anywhere to share!

✨ Features

  • ⌨️ Global Hotkeys - Works from any application
  • 🔄 Smart Authentication - Remembers login, retries on failure
  • 📋 Multi-Format Clipboard - Text, URLs, and file paths
  • 📁 File Upload - Supports all file types via path detection
  • 🔔 Cross-Platform Notifications - Visual + sound feedback
  • 📊 File Info - Shows size, type, and upload progress
  • 🛡️ Secure - Credentials stored safely in ~/.keytodrive/
  • 🚀 Fast - Direct upload, instant sharing
  • 🌍 Stable - Pure Node.js, no shell command dependencies

📂 File Organization

Local Files

  • ~/.keytodrive/token.json - Authentication token (auto-created)
  • ./credentials.json - Google API credentials (you provide)

Google Drive

  • Creates "KeyToDrive Uploads" folder automatically
  • Files named with timestamp: clipboard_2024-01-15T10-30-00-000Z.txt

🔧 Advanced Usage

Running from Source

git clone https://github.com/aronbraun/key-to-drive.git
cd key-to-drive
npm install
npm start

Development

npm run dev  # Watch mode

🔒 Security & Privacy

  • Credentials: Never committed to git (.gitignore)
  • Tokens: Stored locally in ~/.keytodrive/
  • Permissions: Only requests Google Drive file creation access
  • Data: Your clipboard content goes directly to your Google Drive

🐛 Troubleshooting

Authentication Issues

# Force re-authentication
kdr
# Then press Ctrl+Shift+A

Permission Errors

  • Run as administrator on Windows (for global hotkeys)
  • Ensure Google Drive API is enabled in Cloud Console

Credentials Problems

  1. Check credentials.json exists and has valid JSON
  2. Verify client_id and client_secret are correct
  3. Ensure redirect URI is set to http://localhost

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch: git checkout -b my-feature
  3. Commit changes: git commit -am 'Add feature'
  4. Push to branch: git push origin my-feature
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.

🔗 Links

  • GitHub: https://github.com/aronbraun/key-to-drive
  • npm: https://www.npmjs.com/package/key-to-drive
  • Issues: https://github.com/aronbraun/key-to-drive/issues

Made with ❤️ by Aron Braun