Send Files and Messages Between Machines
Move a file, a message or a notification from one of your machines to another, wherever they are. Nothing gets a public link: the other machine has to be online under a name, with a key of your account.
Goal
From your laptop: send report.txt to work-laptop, send it a message and get the reply, and pop up a notification on it.
Prerequisites
- Two machines (your laptop, and
work-laptop) with thenfltrCLI. - Each with its own API key of your account, saved with
nfltr config add-api-key. One key runs one connection at a time, so the receiving machine needs its own key. - For the clipboard (step 4) on Linux:
xclip,xselorwl-clipboard(wl-copy/wl-paste) on each machine whose clipboard nfltr reads or writes. macOS and Windows need nothing extra. Without one,clipboard listenprintsListening as work-laptop, but copies and pastes will fail: no clipboard tool found ….
1. Send a file (peer to peer)
On work-laptop, wait for a file:
$ nfltr p2p recv --name work-laptop --output ./inbox
[p2p] listening as work-laptop — waiting for incoming P2P connection…
On your laptop, send it:
$ echo "Q3 numbers: 42" > report.txt
$ nfltr p2p send report.txt work-laptop
[p2p] connecting…
[p2p] connected via 192.168.1.9:52558 → 192.168.1.20:52551
[p2p] sending file "report.txt" (15 B)…
[p2p] [████████████████████] 100% (15 B / 15 B)
[p2p] ✓ transfer complete
The machines connect directly when they can (the same LAN, or NAT that allows it) and fall back to the relay otherwise; --force-relay always uses the relay. work-laptop prints ✓ saved to "inbox/report.txt" and exits (--keep keeps it waiting for more; --from you-laptop accepts only one sender). A directory works the same way: nfltr p2p send ./data/ work-laptop.
$ cat inbox/report.txt
Q3 numbers: 42
2. Send a message and get a reply
On work-laptop, listen. By default every message is printed and echoed back; --exec 'jq .command' answers with a command's output instead:
$ nfltr a2a listen --name work-laptop
Listening as work-laptop for incoming A2A calls... (Ctrl+C to stop)
On your laptop:
$ nfltr a2a send work-laptop "deploy finished"
Connected as you-laptop, sending to work-laptop...
deploy finished
work-laptop prints [you.you-laptop] deploy finished. Pipe data in instead of an argument:
$ echo '{"cmd":"status"}' | nfltr a2a send work-laptop
{"cmd":"status"}
Messages are end-to-end encrypted by default. To keep the relay out of the key exchange as well, see pairing keys. nfltr a2a list shows which of your machines are online.
$ nfltr a2a list
Connected agents (2):
you.work-laptop (a2a, a2a-e2ee)
you.build-box (a2a, node, a2a-e2ee) [nfltr.agent.claude=available, nfltr.machine_id=build-box, nfltr.node.harnesses=claude-code, nfltr.node.id=build-box, nfltr.node.max_agents=2, nfltr.node.monitors=allowed, nfltr.runtime=node]
Send a message:
nfltr a2a send you.work-laptop "hello"
It lists everything your account has online, on any of its keys (here also a node from Join machines as nodes), each with its capabilities in ( ) and its labels in [ ]. Names carry your key's prefix (you. here); a2a send takes the short name.
3. Send a notification
$ nfltr notify send work-laptop "Build finished" --title CI
Notification sent to work-laptop
A machine running nfltr notify listen shows it as a desktop notification (step 5). The a2a listen from step 2 prints it instead: [you.you-laptop] notify:CI:Build finished. Pipe the text in for scripts: npm test && echo "tests passed" | nfltr notify send work-laptop.
# Ctrl+C in the nfltr a2a listen terminal on work-laptop
4. Share a clipboard
Put text on work-laptop's clipboard, and fetch its clipboard back into yours. On work-laptop, receive copies. --allow-paste also lets your machines read its clipboard; without it, pastes are refused:
$ nfltr clipboard listen --name work-laptop --allow-paste
Receiving clipboard copies as work-laptop; pastes allowed
On your laptop, the target comes first:
$ nfltr clipboard copy work-laptop "staging password rotated at 14:05"
Copied 33 bytes to work-laptop's clipboard
$ nfltr clipboard paste work-laptop --stdout
staging password rotated at 14:05
Without text, clipboard copy sends your current clipboard (or piped input: cat notes.txt | nfltr clipboard copy work-laptop). Without --stdout, clipboard paste writes to your clipboard.
# Ctrl+C in the nfltr clipboard listen terminal on work-laptop
5. Receive desktop notifications
On work-laptop, leave this running; each nfltr notify send work-laptop … from any of your machines shows up as a desktop notification:
$ nfltr notify listen --name work-laptop
Listening for notifications as work-laptop...
$ nfltr notify send work-laptop "Deploy finished" --title CI
Notification sent to work-laptop
# Ctrl+C in the nfltr notify listen terminal on work-laptop
Clean up
Stop every listener with Ctrl+C. p2p recv without --keep has already exited.
If it goes wrong
| You see | Meaning and fix |
|---|---|
Error: rpc error: code = NotFound desc = target agent not connected | Nothing listens under that name. Start a2a listen (or notify listen) there, and check the --name. |
Error: peer "nobody-here" not found after a few retries | p2p send found no p2p recv under that name. Start the receiver first. |
Error: work-laptop is not running `nfltr clipboard listen` … | Something else (an a2a listen, for example) answers under that name. Run nfltr clipboard listen there. |
Error: work-laptop: this machine does not share its clipboard … | Its clipboard listen runs without --allow-paste. Restart it with the flag to allow pastes. |
API key is already in use by agent … | Both machines use the same API key. Give each machine its own key. |
peer's A2A E2EE key failed pairing-key verification | The two machines have different pairing key files. See pairing keys. |