.\" .\" Copyright (c) 2025 Murilo Ijanc .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd March 25, 2025 .Dt TP 1 .Os .Sh NAME .Nm tp .Nd tesseras-paste client .Sh SYNOPSIS .Nm .Op Fl s Ar sock .Op Fl v .Ar command .Op Ar args .Sh DESCRIPTION .Nm is a command-line client for .Xr tpd 1 , the tesseras-paste daemon. It communicates over a Unix domain socket to store and retrieve encrypted pastes on the tesseras-dht distributed hash table. .Pp The options are as follows: .Bl -tag -width Ds .It Fl s Ar sock Path to the Unix domain socket. The default is .Pa /var/tesseras-paste/daemon.sock . .It Fl v Enable verbose output. Shows the socket path, the request sent to the daemon, and the raw response received. .El .Pp The following commands are available: .Bl -tag -width Ds .It Cm put Oo Fl t Ar ttl Oc Oo Fl p Oc Op Fl l Ar label Read standard input and store it as a paste. On success, print the paste key to standard output. .Pp .Fl t Ar ttl sets the time-to-live for the paste. The value can be suffixed with .Sq h for hours, .Sq m for minutes, or .Sq s for seconds. A bare number is interpreted as seconds. The default is .Dq 24h . .Pp .Fl p stores the paste in public mode without encryption. .Pp The maximum input size is 1.44 MB. Pastes larger than 8 KiB are automatically split into chunks and reassembled transparently on retrieval. .Pp .Fl l Ar label attaches a label to the paste for later identification. Labels are stored locally in .Pa ~/.config/tp/labels . .It Cm get Ar key Retrieve the paste identified by .Ar key and write its contents to standard output. .It Cm del Ar key Delete the paste identified by .Ar key . If the paste has a label, the label is also removed. .It Cm pin Ar key Pin the paste so it never expires. .It Cm unpin Ar key Remove the pin from a paste, allowing it to expire normally. .It Cm list List all labeled pastes. Each line shows the paste key and its label, separated by a tab. .It Cm label Ar key Ar text Add or update the label for the paste identified by .Ar key . All remaining arguments are joined as the label text. .It Cm status Display the daemon status. .El .Sh FILES .Bl -tag -width "/var/tesseras-paste/daemon.sock" -compact .It Pa /var/tesseras-paste/daemon.sock Default Unix domain socket. .It Pa ~/.config/tp/labels Local paste labels, one per line in .Dq key\etlabel format. .El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES Store a paste with default TTL: .Pp .Dl $ echo \&"hello world\&" | tp put .Pp Retrieve a paste: .Pp .Dl $ tp get Ar key .Pp Store a paste with a label: .Pp .Dl $ echo \&"hello\&" | tp put -l \&"dmesg openbsd 7.9\&" .Pp Store a public paste with a 1-hour TTL: .Pp .Dl $ echo \&"public data\&" | tp put -t 1h -p .Pp List labeled pastes: .Pp .Dl $ tp list .Pp Label an existing paste: .Pp .Dl $ tp label Ar key my zine ep 1 .Sh SEE ALSO .Xr tpd 1 .Sh AUTHORS .An Murilo Ijanc Aq Mt murilo@ijanc.org