QRCP(1)

NAME

qrcp:zap: Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the…

SYNOPSIS

$go install github.com/claudiodangelis/qrcp@latest

INFO

10.4k stars
549 forks
0 views

DESCRIPTION

:zap: Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the terminal.

README

Logo

$ qrcp

Transfer files over Wi-Fi from your computer to a mobile device by scanning a QR code without leaving the terminal.

Go Report Card

You can support development by donating with Buy Me A Coffee.

Join the Telegram channel qrcp_dev or the @qrcp_dev Twitter account for news about the development.


How does it work?

Screenshot

qrcp binds a web server to the address of your Wi-Fi network interface on a random port and creates a handler for it. The default handler serves the content and exits the program when the transfer is complete. When used to receive files, qrcp serves an upload page and handles the transfer.

The tool prints a QR code that encodes the text:

http://{address}:{port}/{random_path}

Most QR apps can detect URLs in decoded text and act accordingly (i.e., open the decoded URL with the default browser), so when the QR code is scanned, the content will begin downloading by the mobile browser.

Demo

Send files to mobile:

screenshot

Receive files from mobile:

Screenshot


Installation

Using Go (Latest Development Version)

Requires Go 1.18 or later:

go install github.com/claudiodangelis/qrcp@latest

Prebuilt Binaries

Download the latest release for your platform from the Releases page.

PlatformInstructions
LinuxExtract the .tar.gz archive, move the binary to /usr/local/bin, and set permissions.
WindowsExtract the .tar.gz archive and place the .exe file in a directory in your PATH.
macOSExtract the .tar.gz archive, move the binary to /usr/local/bin, and set permissions.

Package Managers

PlatformPackage ManagerCommand
LinuxArchLinux (AUR)yay -S qrcp-bin or yay -S qrcp
LinuxDebian/Ubuntusudo dpkg -i qrcp_<version>_linux_x86_64.deb
LinuxCentOS/Fedorasudo rpm -i qrcp_<version>_linux_x86_64.rpm
WindowsWinGetwinget install --id=claudiodangelis.qrcp -e
WindowsScoopscoop install qrcp
WindowsChocolateychoco install qrcp
macOSHomebrewbrew install qrcp

Confirm Installation

After installation, verify that qrcp is working:

qrcp --help

Usage

Send Files

ActionCommand Example
Send a fileqrcp MyDocument.pdf
Send multiple filesqrcp MyDocument.pdf IMG0001.jpg
Send a folderqrcp Documents/
Zip before transferringqrcp --zip LongVideo.avi

Receive Files

ActionCommand Example
Receive to current directoryqrcp receive
Receive to a specific directoryqrcp receive --output=/tmp/dir

Configuration

qrcp works without prior configuration, but you can customize it using a configuration file or environment variables.

Configuration File

The default configuration file is stored in $XDG_CONFIG_HOME/qrcp/config.yml. You can specify a custom location using the --config flag:

qrcp --config /tmp/qrcp.yml MyDocument.pdf

Configuration Options

KeyTypeDescription
interfaceStringNetwork interface to bind the web server to. Use any to bind to 0.0.0.0.
bindStringAddress to bind the web server to. Overrides interface.
portIntegerPort to use. Defaults to a random port.
pathStringPath to use in the URL. Defaults to a random string.
outputStringDefault directory to receive files. Defaults to the current working directory.
fqdnStringFully qualified domain name to use in the URL instead of the IP address.
keep-aliveBoolKeep the server alive after transferring files. Defaults to false.
secureBoolUse HTTPS instead of HTTP. Defaults to false.
tls-certStringPath to the TLS certificate. Used only when secure: true.
tls-keyStringPath to the TLS key. Used only when secure: true.

Environment Variables

All configuration parameters can also be set via environment variables prefixed with QRCP_:

  • $QRCP_INTERFACE
  • $QRCP_PORT
  • $QRCP_KEEPALIVE

Advanced Usage

Network Interface

To use a specific network interface:

qrcp -i tun0 MyDocument.pdf

To bind the web server to all interfaces:

qrcp -i any MyDocument.pdf

HTTPS

Enable secure transfers with HTTPS by providing a TLS certificate and key:

qrcp --tls-cert /path/to/cert.pem --tls-key /path/to/cert.key MyDocument.pdf

Shell Completion

qrcp provides shell completion scripts for Bash, Zsh, and Fish.

ShellCommand Example
Bashsource <(qrcp completion bash)
Zshqrcp completion zsh > "${fpath[1]}/_qrcp"
Fish`qrcp completion fish

Authors and Credits


Clones and Similar Projects

Project NameDescription
qr-fileshareA similar idea executed in NodeJS with a React interface.
instant-file-transfer (Uncredited)Node.js project similar to this.
qr-filetransferPython clone of this project.
qr-filetransferAnother Node.js clone of this project.
qr-transfer-nodeAnother Node.js clone of this project.
QRDELIVERNode.js project similar to this.
qrfileTransfer files by scanning a QR code.
quick-transferNode.js clone of this project.
share-file-qrPython re-implementation of this project.
share-files (Uncredited)Yet another Node.js clone of this project.
ezshareAnother Node.js two-way file sharing tool supporting folders and multiple files.
local_file_share"Share local file to other people, OR smartphone download files which is in PC."
qrcpA desktop app clone of qrcp, written with C# and .NET Core, works for Windows.
swift_fileRust project inspired by qrcp.
qrcp-androidAndroid app inspired by qrcp.

License

MIT. See LICENSE.

SEE ALSO

clihub3/4/2026QRCP(1)