airpaste
Share text between computers via network
TLDR
Wait for a message and display it when received
Send text
Send a file
Receive a file
Create or join a channel
SYNOPSIS
airpaste [options] [file...]
PARAMETERS
-p port
Specifies the port to listen on or connect to. Defaults to 8080.
-n name
Sets the service name for mDNS discovery. Allows multiple airpaste instances on the same network.
-v
Enables verbose output, showing more details about the connection and transfer process.
-d directory
Specifies the directory where received files should be saved.
-s
Starts airpaste in server mode, continually listening for incoming data without exiting after one transfer.
-c
On the sender side, clears the terminal after sending the content.
-t timeout
Sets a timeout for waiting for a peer in seconds. Defaults to 5 seconds.
-h
Displays the help message and exits.
DESCRIPTION
airpaste is a lightweight command-line utility designed for quickly sharing text snippets or small files between machines on the same local area network. It leverages Multicast DNS (mDNS), also known as Bonjour or Avahi, for automatic service discovery, eliminating the need to know IP addresses or hostnames.
When executed, airpaste broadcasts its availability on the network and listens for incoming connections, or discovers other airpaste instances to send data to. Data transfer occurs over HTTP. This tool is particularly useful for ad-hoc sharing scenarios where setting up a full file server or using more complex tools like SCP might be overkill. It simplifies the process of sending output from a command, a block of text, or a small file to another nearby machine without manual configuration.
CAVEATS
airpaste is designed for convenience on trusted local networks and has several limitations. It does not employ any encryption, meaning all data is transferred in plain text and could be intercepted by other devices on the same network. It is not suitable for transferring very large files due to its HTTP-based transfer mechanism and lack of resume capabilities. Its reliance on mDNS means it might not work across different subnets or if mDNS services (like Avahi or Bonjour) are not properly configured or allowed on the network.
<I>USAGE MODES</I>
When sending text (e.g., via pipe), airpaste automatically acts as a sender. When invoked without piped input or file arguments, it defaults to receiver mode, waiting for incoming data. If file arguments are provided, it sends those files.
<I>DISCOVERY MECHANISM</I>
airpaste uses mDNS (Multicast DNS) for discovery. Senders broadcast their service, and receivers listen for these broadcasts. This allows peers to find each other by name rather than IP address, simplifying ad-hoc connections.
HISTORY
airpaste is a relatively modern, open-source utility created by Zack Scholl (schollz). It was developed to address the need for simple, ad-hoc data sharing within a local network, drawing inspiration from similar pastebin concepts but tailored for direct peer-to-peer communication without external servers. Its development reflects a trend towards lightweight, zero-configuration tools for common command-line tasks.