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

photo-distributor-cli

v0.0.2

Published

CLI for uploading photos and videos to a photo-distributor server.

Readme

Command-line uploader for sending photos and videos from an SD card (or any folder) to a running photo-distributor server.

Requirements

  • Node.js 20.0.0 or later

What it does

  • Auto-detects mounted camera/SD card volumes by looking for a DCIM directory
  • Recursively scans for supported media files
  • Uploads files to the photo-distributor upload API
  • Skips duplicates reported by the server
  • Supports dry-run mode to preview uploads
  • Saves default server credentials locally for repeat use

Install

From npm (global install):

npm install -g photo-distributor-cli

This installs the pd-upload command globally on your machine.

If you prefer not to install globally, run it with npx:

npx photo-distributor-cli <command> [options]

Quick start

# Auto-detect SD card, then upload from selected DCIM folder
pd-upload

# Upload from a specific folder
pd-upload upload /Volumes/CANON/DCIM

# Default command is upload, so this is equivalent
pd-upload /Volumes/CANON/DCIM

# Preview files without uploading
pd-upload --dry-run /Volumes/CANON/DCIM

Commands

| Command | Description | | --------------------------- | ------------------------------------------------------------------------ | | pd-upload [source] | Default command. Upload from source, or auto-detect SD card if omitted | | pd-upload upload [source] | Explicit upload command | | pd-upload detect | List detected SD cards / camera storage volumes | | pd-upload config | Show or save default connection settings |

Connection options

These apply to upload and config:

| Option | Description | Default | | ----------------------- | ------------------------------------------------ | ----------------------- | | --url <url> | Server URL (http or https) | http://localhost:3001 | | --user <user> | Username | pd | | --password <password> | Password | prompted if missing | | --dry-run | List files that would be uploaded, do not upload | off |

Save defaults once

pd-upload config --url http://192.168.1.50:3001 --user pd --password mysecret

Then run uploads without repeating flags:

pd-upload

The CLI stores settings in:

  • ~/.photo-distributor.json

SD card detection behavior

The CLI checks mounted volumes and keeps entries containing a DCIM directory.

  • macOS: /Volumes/*
  • Linux: /media/<user>/*, /media/*, /run/media/*, /mnt/*
  • Windows: drive letters A:\ through Z:\

Supported file types

Photos:

  • .jpg, .jpeg, .png, .heic, .heif, .webp, .tiff, .tif, .cr2, .cr3

Videos:

  • .mp4, .mov, .avi, .mkv, .m4v, .3gp, .wmv

Typical workflow

# 1) Verify server is running
#    Example: http://localhost:3001

# 2) Save connection once
pd-upload config --url http://localhost:3001 --user pd

# 3) Detect card
pd-upload detect

# 4) Dry-run first
pd-upload --dry-run

# 5) Upload
pd-upload

Troubleshooting

Authentication failed

  • Confirm --user and --password
  • Re-save credentials with pd-upload config

Cannot reach server

  • Confirm server URL and port, for example http://localhost:3001
  • Make sure photo-distributor is running and reachable from this machine

No SD cards detected

  • Provide a source path explicitly, for example:
pd-upload /path/to/media

No files found

  • Confirm files are under the selected folder
  • Confirm file extensions are in the supported list above