The fidant command
fidant sends a file or a secret from a terminal on your own computer, or from a CI job you run, with the same code as the send page. This page covers what it does differently from the web app and what it leaves behind.
What it does
fidant <file> sends a file, and fidant --secret a secret text, from your own computer or a CI job you run. It runs the same code as the Send a file and Share a secret pages: the same links, keys and encryption, over a direct connection to each recipient's browser, or, if you allow it and no direct route connects, through our relay. The recipient opens the link in the usual page. When the command sends, the file's protection rests on the code in your own copy of it and its dependencies, not on the code our site serves.
In a terminal it opens a menu, where you choose whether the relay may be used or asked for per link, add recipients, copy, view or share each recipient's link and follow each transfer. It copies a recipient's link to your clipboard when you press c, and shows it when you press v, until you press v again, press Esc or move on. On a Mac, s opens the Mac's share menu with the link, the one the Share button on the send page opens, and you pick where it goes, such as Messages, Mail or AirDrop. The command hands the link to the program that opens that menu through a pipe, never in its arguments, which other users of your computer could read in the list of running programs. With --print-links it opens no menu: it prints one link for a script to pass on, or, with --to, one line per name with the name, a tab and that recipient's link, only into a pipe or a file, never onto the terminal, and in CI only into a file. With --to, run in the foreground of a terminal, you can press + while it sends, type a name and press Enter to print one more line for a new recipient. Each link goes to whoever opens it first. The command sends the names to no server: they go only into what it prints, never into a request or a setup message. Without a terminal, or with -y, it needs --print-links and otherwise stops. A secret comes from a pipe or from a hidden prompt, never from an argument, and a piped secret always needs --print-links.
Without the menu, its exit status says how the send ended: 0 when the recipient's checksum matched, 20 when they declined, 21 when the transfer failed, 124 when nobody took it before --wait ran out (10 minutes unless you set it), 2 for a bad or conflicting option or argument, 1 for any other error, and 128 plus the signal's number when a signal stops it, such as 130 after Ctrl-C. With several names, each recipient ends on its own, --wait counts for each of them, and the command ends when all have: 0 only when every checksum matched, otherwise 21 if any transfer failed, else 20 if anyone declined, else 124. Quitting the menu gives 0 only when every recipient's checksum matched.
A few things the send page does are still missing from the command. fidant --help lists them.
Before it starts
Each run first asks the origin, fidant.se or the site you name with --origin, which versions of the command its pages work with: one GET /command.json over HTTPS, with no query, body or cookies, and nothing of your file, its name, a key or a token. It follows no redirect, and gives up after 10 seconds or 64 KiB.
If your command is older than the minimum in the answer, it stops before it opens any connection or prompt, and says how to upgrade. If a newer command is out, it prints one line that says so: at the start without the menu, and after the menu closes with it. Only a request that gets no answer at all stops a send, because the links need the origin. With --browser the command goes on and leaves that to the page. Every other answer, such as a redirect, an error or text it can't read, lets the command go on as if no versions were published. So this check is no kill switch: a network that drops the answer lets an old command go on.
To send, it then asks the origin where its pages connect for setup: one GET /signals.json, with the same limits, unless you named a server with --signaling or ran fidant --browser. If the origin answers 404, it publishes no list: for fidant.se the command uses the address it was built with, and for any other origin wss://<host>/signal. Any other answer, a redirect or a list it can't read stops it, and it suggests naming the server with --signaling.
Those are the only requests it sends to the origin. It sends no HEAD / and nothing else. On a Mac, the share menu that s opens draws its preview from a title and icon the command gives it, and made no request of its own when we tried it on macOS 26.7.3. The app you pick there may fetch the link's page for its own preview (see Traces elsewhere). A secret you pipe in is read and checked before the first request. The hidden prompt opens only after it, so you never type a secret only to be told to upgrade.
Another signaling server
With --signaling wss://<host>/signal the command uses that signaling server instead of asking /signals.json. The address must have exactly that form. The server can be ours or anyone's. It then passes the setup messages instead of ours, and sees what ours would: your IP address and each recipient's, which recipient connects to you and when, and how many recipients you have.
A link connects only when the recipient's page uses the same server, because the page connects on its own, and a server that doesn't know the link can't pair it. The links are still built on the origin, so they open the origin's receive page. --signaling can't be used with --browser, because the send page uses its own server.
Your name
--from <name> gives your own name, with or without the menu. In the menu it fills in the From row, which you can change until sending starts. The name goes to every recipient inside the encrypted META, and they see it as on the page: typed by you and not verified.
The command checks the name as the page does, before any request: at most 100 characters, none of the characters the page refuses, and short enough to fit in META beside the file's name. --from can't be used with --browser: type your name on the send page instead.
The file
Before any request, the command checks the file's name and size as the send page checks a file you choose, and stops with the page's message when the page would refuse it: characters the page refuses in a name, a name that is too long, or a size over 4 PiB.
A browser tells the page a file's type. The command has no browser to ask, so it guesses the type from the name's last extension, from a fixed table modelled on Chromium's. An extension it doesn't know gives an empty type, as in a browser. The type travels inside the encrypted META, like the name.
It reads the file where it lies, in pieces, and writes nothing to disk. It computes the file's checksum with Node's own SHA-256 code, over the same bytes it sends.
The relay
By default the command sends as the page does with “Use our relay if needed” unticked: it uses our relay only to learn your public address (STUN), never to carry the transfer. --relay, or the choice in the menu, allows it.
With the relay allowed and our relay up, if the two ends still haven't connected 3 seconds after the recipient answers, the command ends that attempt, and the recipient's page joins again. If our relay isn't up, the attempt keeps trying directly, and fails if nothing has connected after 20 seconds. The page would add the relay to the stalled connection, but the command can't. So the new attempt, and every later attempt on that link until the file is delivered, reserves a relay address from its start, even where a direct route would work. Only the command reserves one; the recipient's page doesn't. So a recipient that can reach the relay only over TCP or TLS can't connect through the command, though they could from the page.
With the relay not allowed and our relay up, the menu asks you, as the page does, whether to allow our relay for a link that can't connect directly: it rings the terminal's bell once and shows a notice, and r on that recipient's row allows it for that link only. The recipient's page waits until you answer. The page also beeps again after a minute and after five and can show a notification; the menu doesn't. Without the menu nobody is asked: the attempt keeps trying directly, and fails if nothing has connected after 20 seconds. If a route drops after the transfer started, the recipient's page joins again, and the new attempt continues the file from what arrived.
Answering a request link
fidant --answer <request link> <file>, or with --secret, sends to the Ask for a file page that made the request link, for example from a CI job. It makes no link of its own, so it opens no menu, prints nothing on stdout and can't be used with --to, --print-links or --browser. The request link holds only the page's public key, no secret, so it may sit in a job's input or log. It must be for the site the command uses, fidant.se or the one you name with --origin; otherwise the command stops and says which --origin to pass.
The command makes one key pair for the run and works out the secret from its own private key and the page's public key. Before it connects, it prints its key fingerprint on stderr: Key fingerprint: and 22 characters. The fingerprint is made from the command's public key, so it isn't secret and is safe in a job's log. The person who asked can paste it into their page, which says whether it matches the sender it connected to. Only that comparison shows that the file came from your command, and not from someone else who read the request link or from a server that swapped the key.
With --answer, --wait is 2 minutes unless you set it, since the page is already open. If the server holds the request for another connection, most likely another sender, the command keeps trying and says so once. When the wait runs out with the request still held, it says so and ends with 1. Otherwise it ends as any send without the menu does: 0 when the checksum matched, 20 or 21 for a decline or a failure, 124 when nobody took the file in time.
Handing a file to your browser
With fidant --browser <file>, the command instead hands that file to the Send a file page in your default browser. Before it serves the file, it asks our site once which versions of the command the page works with, and stops if it is too old. That request carries nothing of the file, its name or the token. Apart from it, the command talks to no server of ours. It serves the file on 127.0.0.1, an address only your own computer can reach, and opens the page with a port number and a random token of 32 bytes after the # sign, which browsers never send to us. The page takes them out of the address at once and trades the token for a new one, which the command makes for this page only and which never goes in an address, so the token in the address works once. The page then reads the file from that port with the new token, part by part as it needs them, and sends it as if you had picked it. It reads at most 4 MiB of the file for each read and never stores it in your browser's profile, so your browser has no copy of it to keep. The command answers only Fidant's page and only with the new token. It keeps running while the page holds the file, because the checksum and each recipient's transfer read the file from it, and stops once the page lets go of it: when you close the tab, reload it, start a new send or choose another file. So keep the command running until you are done with the file. If you stop it earlier, the page says the command stopped, a transfer already under way goes on if it needs no more of the file and otherwise fails, and the links that haven't got the file stop working.
If you choose a file, add a recipient or start a new send before the page has taken the file, the page keeps your choice and, once it has the new token, tells the command, and the command stops and says the send page moved on without the file. If the page had already started to take the file, the command also warns that someone else on this computer may have taken part of it if you didn't choose something else on the page; since you did, you can ignore that. If the token in the address is used a second time, the command stops and says so, because someone else may have used it. It also stops after 5 requests with a wrong or missing token, or after 10 minutes if no page has taken the file. Other stray requests, such as ones from another website, never count toward the 5.
Safari doesn't let a page on fidant.se reach 127.0.0.1, so it can't take the file, and the page says so. The browser and the file must be on the same computer, so it doesn't work over SSH. Our tests run it against a local copy of Fidant in Chromium and Firefox, and in WebKit they check Safari's message. Chrome, and Firefox in our test of a Firefox 159 build, first ask whether fidant.se may access other apps and services on this device. The page says so while it waits. Choose Allow, or the file doesn't arrive and the command waits until it stops. If you chose Block, the page says how to allow it: in Chrome with the site setting Local network access, and in Firefox by choosing Allow on the next try, unless you told it to remember Block. Choosing Block in Chrome, private windows, Firefox's release build, other browsers and Windows are not tested yet.
This leaves traces in your browser. The page reads the parts of the file it needs, at most 4 MiB at a time for the checksum and 48 KiB for each transfer, keeps no reference to a part once it has used it and keeps the answers out of the browser's cache, so the browser stores no copy of the file in its profile. A file of 4 MiB or less can be in the tab's memory whole. Your browser's history probably keeps the address the command opened, with a token that stops working once the page has traded it for the new one, which in Chrome and Firefox is once access is allowed (in Safari, and if you choose Block, it works until the command stops). The new token stays in the tab's memory while the page holds the file or, if you chose something else first, until the page has told the command. In our test, Chrome didn't ask again once access had been allowed, and our Firefox build asked each time unless “Remember my choice for this site” was ticked. We saw that before the page read the file in parts; whether Firefox asks again during one long handoff, without that box ticked, is not tested yet.
While the program that opens the browser runs, other users of the same computer can read the address with the token in the list of running programs, and could use it before the page has traded it and take the file. Your page then gets no file, and if the command still runs, it stops and says the address was used twice. They could also take the file, read part of it and then stop the command before your page trades the token, by telling it the page moved on or with 5 wrong tokens, and the command then never sees the address used twice. So if the file had started to go out, which it does as soon as a page takes it, when the command stops because the page moved on or after 5 requests with a wrong or missing token, it also says that someone else on this computer may have taken part of it: after the page moved on, if you didn't choose something else on the page. It can't say how much they took. As soon as anyone takes the file, the command says that it handed the file to the page that asked for it, and that someone else may have taken it if your browser doesn't show it. In Safari, and if you choose Block, the page never trades the token, so it works until the command stops, and the page can't reveal that someone else used it first. Another user of the same computer could also run a program of their own on 127.0.0.1 and get you to open a Send a file address that points at it. The page would then show their file as the one you chose, and send it if you went on. In Safari it can't reach their program either, so no file arrives. We accept that for now, so check the file's name and size before you send.
Traces on your computer
When you send a file: the command with the file's path, the recipients' names, your own name if you gave it with --from and any signaling server you named with --signaling, in your shell's history until you clear it, and in the list of running programs while it runs, which other users of your computer can read. Every link and key in the command's memory until it exits, up to a second after you quit or stop it, after it crashes, or, with --print-links, after its last recipient ends, while it closes its connection to our server. Once a recipient's connection opens, a random token from the signaling server for that link, in the command's memory only and never printed, so the command can take its place back if its connection to that server drops; a new one replaces it each time the command takes its place back, and it stays until the command's next connection to the server uses it, the link connects again or the command exits. A link you copied, key included, on your clipboard until you copy something else, or longer with a clipboard manager. A link the menu showed, in any recording of the terminal, such as with script or asciinema, until you delete it. On a Mac, a link you shared with s, in the memory of the program that opens the share menu until you close the menu without picking, the app you picked has sent it or you cancel there, or you quit the command's menu, at most 10 minutes (if the command is killed before it can close it, within a second after), and wherever you sent it, for as long as that app or device keeps it. With --print-links, the printed links, with any names you gave with --to or typed after +, in the pipe or file they went to, for as long as whatever reads or keeps them does. When the menu closes, the terminal keeps only each recipient's name and how it went, never a link; without the menu, the same goes for the lines it writes to stderr, which start with each name you gave with --to or typed after +, wherever stderr goes, such as a CI job's log. A name you type after + is shown on the terminal, which keeps it, but it isn't in your shell's history or the list of running programs.
When you send with fidant --secret: the same, except that the secret isn't part of the command line, so it is in neither your shell's history nor the list of running programs, except for a late part of a paste (below). If you piped it in, such as pass show db | fidant --secret --print-links, the history keeps that command, but not the secret, and the program that wrote it, or the file you read with <, keeps its own traces. The secret stays in the command's memory until it exits. The hidden prompt shows nothing it reads. If you paste a long secret into a terminal that doesn't mark pastes, a part that arrives after the prompt has ended, such as over a slow connection or after you stopped the command, is shown on screen and can reach the shell, and with it the shell's history. So pipe in a secret of several lines.
When you answer a request with fidant --answer: the command line with the request link, which holds no secret, in your shell's history and the list of running programs, and on a CI runner in the job's definition or input and any log that prints it. The key fingerprint on stderr, in the terminal or the job's log; it isn't secret. The command's public key, the secret it works out with its private key, to which it keeps no reference after that, and the keys from that secret, only in the command's memory until it exits. A CI runner you run the command on counts as your computer: whoever runs that machine, such as GitHub for its hosted runners, can read the file and the keys in the command's memory, so run it only on a runner you trust with the file.
When you run fidant --browser: the command with the file's path in your shell's history, until you clear it. While the program that opens the browser runs, the address with the token in the list of running programs. In the command's memory until it exits: the file's path, name, size and modification time, the two tokens and an open handle to the file, and while the page holds the file, pieces of the parts it reads, each part's last piece held back until the file proved unchanged. It exits once the page lets go of the file.
The command writes nothing to disk and logs nothing but what it prints. If you installed it from its release tarball, npm's cache on your computer keeps the packages until you clear it, and npm's log keeps the install's command line and working directory until npm has written 10 newer logs and runs again. The folder you unpacked the tarball into and ran npm ci in keeps the command and the packages npm put in it until you delete it.
If you installed it with Homebrew, Homebrew's download cache keeps the command's tarball and the packages npm fetched, and its logs keep the install's output, both until brew cleanup, which brew install and brew upgrade also run now and then. Homebrew keeps its copy of our tap, with the formula's history, until you untap it, and its trust list keeps the command's name until you uninstall it or run brew untrust. The command and its packages stay installed until you uninstall it, and an older version until brew cleanup.
Traces elsewhere
The CDN that delivers fidant.se's pages, or the site you named with --origin, sees the request for /command.json on each run and, unless you ran fidant --browser or named a server with --signaling, the one for /signals.json, each with your computer's IP address and node as the user agent, as it sees a page load. Neither holds anything of your file, its name, a key or a token. On a Mac, the app you pick in the share menu that s opens may fetch the link's page to show its own preview of it, as a chat app does when you paste a link, so the CDN sees the IP address it comes from, your computer's when the app runs on it, and the link ID, as it does when the recipient opens the link. That request doesn't hold the part after the # sign, which holds the key. When we tried Notes on macOS 26.7.3, its preview didn't run the page's script.
Our signaling server, and AWS's load balancer in front of it, see what they see of a sending page, except that the command names no browser and sends no Origin header. With --signaling, the server you named sees that instead, your IP address included. The command closes its connection to our server before it exits, also when you stop it. Then our server keeps no place for it. If the command is killed outright, crashes without its menu, is stopped or crashes just as its menu starts to send, or loses its network, our server keeps its place in a transfer under way for up to 30 seconds, as for a page, and if the command connects again within that time, it takes its place back.
Our relay sees your IP address when the command asks it for your public address. Once the relay is allowed and a stall has made the command reserve a relay address on that link, the relay can also learn the recipient's IP address, even when a direct route carries the file. When it carries the transfer, it also sees when the transfer happens and roughly how big the file is. Each recipient sees your IP address, and the file's name, type and size and your name, as when you send from the page.
If you installed the command from its release tarball, the npm registry, which isn't ours, saw your computer's address when you installed it.
If you installed the command with Homebrew, GitHub saw your computer's address when Homebrew fetched our tap and the command's tarball, and counts each download of that tarball, which anyone can read. GitHub's package registry also saw it when Homebrew fetched ready-built packages: on an Apple silicon Mac for Node and all its dependencies, on an Intel Mac only for the few built for every Mac. On an Intel Mac, Homebrew fetches the source of the rest, and of what it needs to build them, from each one's own site, such as nodejs.org, and those sites saw it. The npm registry, which isn't ours, also saw it when npm fetched the command's packages. Unless you turned Homebrew's analytics off, Homebrew counts the install under our tap's name, with your Mac's processor and major macOS version, keeps that for a year, and its public totals may include it. The signed record that our workflow built the command's tarball is public and names no one who installs it.