Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

A Pixeldrain client

MIT License Go application Go Reference codecov Release


Upload files

pd upload <path[:name]>...

upload command uploads files specified by the given paths to Pixeldrain and shows a URL to download them. Each path can have an optional name. If a name is given, uploaded file will be renamed with it.

For example, this command reads img.png and uploads it as another.png:

pd upload img.png:another.png

If path is -, the uploading file is read from stdin. In this case, it's recommended to give a file name. For example, this command reads data from stdin and uploads it as output.log:

pd upload -:output.log

If multiple files are given, an album consists of them will be created. By default, the album has a random name. --album flag can specify the name. For example, this command uploads two files and creates an album named screenshots:

pd upload --album screenshots img1.png img2.png

Upload a directory

Since this application supports uploading a file from STDIN, you can upload a directory with tar command. For example, this command uploads ~/Documents directory:

tar zcf - ~/Documents | pd upload -:documents.tar.gz

Upload to your account

If you want to upload files to your account, give your API key with --api-key flag or via PIXELDRAIN_API_KEY environment variable.

An API key can be obtained from

Download files

pd download <URL>...

download command downloads files from Pixeldrain and stores it in the current directory by default.

If --dir or -o option is given with a directory path, the downloaded file is stored in the directory.

If the given URL refers an album which consists of multiple files, this command asks which file you want to download. If you want to download all files without any interaction, use --all flag.

End-to-end encryption

If recipients are specified with --recipient and/or --recipient-file flags to upload command, files will be encrypted before being uploaded by age. Encrypted files will have extension .age.

A recipient specified with --recipient flag can be an age public key generated by age-keygen ("age1...") or an SSH public key ("ssh-ed25519 AAAA...", "ssh-rsa AAAA..."). A recipient file specified with --recipient-file flag contains one or more recipients, one per line. Empty line sand lines starting with "#" are ignored as comments.

If a downloading file has extension .age and an identity file is specified with --identity flag to download command, the file will be decrypted.

An identity contains one or more secret keys ("AGE-SECRET-KEY-1..."), one per line, or an SSH key. Empty lines and lines starting with "#" are ignored as comments.

See age for the details of age and age-keygen.


If you're a Homebrew or Linuxbrew user, you can install this app by the following commands:

$ brew tap jkawamoto/pixeldrain
$ brew install pixeldrain

To build the newest version, use go get command:

$ go get

Otherwise, compiled binaries are also available in Github.


This software is released under the MIT License, see LICENSE.