Use onetime from the command line
onetime is also a single-file command-line tool. It uses the same encryption and the same links as this site: a link made on the command line opens in a browser, and the other way round. The server never sees the secret or the key.
It has been run on Linux. Windows and macOS are not tested yet.
Install
One file. It needs only Node.js 22 or newer.
Linux and macOS
curl -fsSL https://onetimepass.pages.dev/cli/onetime.mjs -o onetime && chmod +x onetime
Or save the file as onetime.mjs and run it as node onetime.mjs.
Windows
Download onetime.mjs and onetime.cmd
into a folder that is on your PATH. Then run it as onetime.
Check the download
A SHA-256 checksum is at /cli/onetime.mjs.sha256. Compare it with the
output of sha256sum onetime (macOS: shasum -a 256 onetime). It comes from the same
site, so it detects a damaged download, not a compromised server.
Commands
onetime send- Reads the secret from a pipe or a hidden prompt, encrypts it and prints only the link.
onetime gen-
Generates a password or token and creates the link in one step. With
--print-onlyit only prints a generated secret and contacts no server. onetime get -- Asks you to paste the link, reveals the secret and uses the link up.
onetime status -- Checks whether the link is still waiting, without using it up.
Run onetime --help or onetime gen --help for all options.
Examples
On Windows, write onetime instead of ./onetime.
Share a secret
Type it at the hidden prompt, or pipe it in from a file. The link expires after 1 hour here.
./onetime send --ttl 1h
./onetime send --ttl 1h < secret.txt
Generate a password and share it
./onetime gen --type password --length 32
Open a link
Paste the link when asked. This uses the link up, like the Reveal button.
./onetime get -
Check a link without opening it
./onetime status -
Privacy
- The secret is never taken as a command-line argument, so it stays out of shell history and process lists.
-
A link passed as an argument to
getdoes end up in shell history. Useonetime get -or open the link in a browser instead. - No telemetry, no config files, no update checks.
How your secret is stored explains the encryption and what the server keeps. It is the same for the command line.