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

drplr

v1.1.1

Published

A command-line interface for uploading files to Droplr using their official SDK

Readme

drplr

A command-line interface for uploading files to Droplr using their official SDK.

npm version MIT licensed npm downloads

Installation

npm install -g drplr

then use it like this:

drplr auth login your_username your_password
drplr file.png

Or try it without installing:

npx drplr auth login your_username your_password
npx drplr file.png

Authentication Setup

Choose one of these authentication methods:

Method 1: Username/Password (Easiest)

drplr auth login your_username your_password

Method 2: JWT Token (More Secure)

  1. Log into d.pr in your browser
  2. Open Chrome DevTools > Application > Cookies > d.pr
  3. Copy the JWT token value
  4. Configure the CLI:
    drplr auth token eyJhbGciOiJIUzI1NiIs...

Note: JWT tokens may expire and may need to be refreshed periodically.

Usage

File Uploads

# Upload a file
drplr file.png

# Upload a private file
drplr file.png --private

# Upload with password protection
drplr file.png --private --password mypassword

# Upload with custom title
drplr document.pdf --title "Important Document"

Link Shortening

# Create a short link
drplr link https://example.com/very/long/url

# Create a private link with title
drplr link https://example.com --private --title "My Link"

# Create a password-protected link
drplr link https://example.com --private --password secret123

Note Creation

# Create a text note
drplr note "This is my quick note"

# Create a note from a file
drplr note --file notes.txt

# Create a private note with custom title
drplr note "Secret information" --private --title "Confidential"

# Create a code snippet
drplr note --code 'console.log("Hello, World!")' --lang javascript

# Create code snippet with title
drplr note --code 'def hello(): print("Hi!")' --lang python --title "Python Hello"

Global Options

# Minimal output (just the URL)
drplr file.png --porcelain

# Debug mode with full API responses
drplr file.png --debug

# Combine global and command-specific options
drplr note "Debug this" --debug --private

Help and Information

# Show comprehensive help
drplr help

# Get help for specific commands (shows in usage examples)
drplr link
drplr note

Features

Core Drop Types

  • ✅ File uploads to Droplr using official SDK
  • ✅ Link shortening (URL drops) with title support
  • ✅ Note creation (text, file-based, and code snippets)
  • ✅ Code syntax highlighting for 25+ programming languages
  • ✅ Custom titles for all drop types

Privacy & Security

  • ✅ Public and private uploads/links/notes
  • ✅ Password protection for all drop types
  • ✅ JWT token authentication from browser
  • ✅ Username/password authentication
  • ✅ Encrypted credential storage with machine-specific keys

User Experience

  • ✅ Comprehensive help system with examples
  • ✅ Global flags (--porcelain for minimal output, --debug for diagnostics)
  • ✅ Detailed error messages with field-specific validation
  • ✅ Multiple file format support with automatic MIME type detection
  • ✅ Backward compatibility (config command still works as alias for auth)

Developer Experience

  • ✅ Comprehensive test suite (49 passing tests)
  • ✅ Modular architecture with clean separation of concerns
  • ✅ Complete documentation (README, TESTING, ROADMAP)
  • ✅ Multiple test script variants for different scenarios

Requirements

  • Node.js 14.0.0 or higher
  • Valid Droplr account

Testing

This project includes a comprehensive test suite with Jest:

# Run all working tests (49 tests)
npm test

# Run only unit tests
npm run test:unit

# Run only integration tests
npm run test:integration

# Run tests in watch mode
npm run test:watch

# Generate coverage report
npm run test:coverage

See TESTING.md for detailed information about the test architecture.

Documentation

Alternative Installation Methods

Other package managers

# Yarn
yarn global add drplr

# pnpm
pnpm install -g drplr

Manual install from GitHub

# Clone and set up
git clone https://github.com/jtsternberg/drplr.git
cd drplr
npm install

# Option 1: Create an alias
echo 'alias drplr="node /path/to/drplr/drplr.js"' >> ~/.bashrc
source ~/.bashrc

# Option 2: Add to PATH
export PATH="$PATH:/path/to/drplr"

Development Installation

  1. Clone this repository
  2. Install dependencies: npm install
  3. Link globally: npm link