piano(1) BSD General Commands Manual piano(1) NAME piano — Command interface to pianod(1). SYNOPSIS piano [-cdvgm] [-r] [-s] [-h host] [-p port] [-U username] [-P password] [command [Arguments ...]] DESCRIPTION piano issues commands to and retreives data from pianod(1), allowing shell scripts or interactive access without having to go through telnet(1) or nc(1). Options allow formatting data in various ways, either convenient for reading (interactive use) or in more raw forms (for fur‐ ther processing). If no command is given, retrieves the playback status (playing, paused, stopped, etc.) instead of issuing a command; status is indicated only by exit status unless -v is given. OPTIONS -c In output, include numeric status codes. -d Data only; in output, strip the field names. -v Verbose. Output status text instead of just returning a sta‐ tus code. Applies to checking status or playlist. -g Report diagnostic information (3xx messages). -m Multiple record format. Includes pianod's end-of-data mes‐ sage at the end of the output, which is extraneous for sin‐ gle records but useful when processing multiple records. -r Report remaining time in current track. Returned as a num‐ ber of seconds, suitable for passing to sleep(1). -s Use a secure connection. -h host The host on which pianod is running. Defaults to localhost, or $PIANOD_HOST if set. -p port The port at which to connect to pianod. By default, connec‐ tions are attempted at 4445. piano can connect to either the line or HTTP port. -U user The user to authenticate on the server. Not all commands require authentication; if neither this option or the corre‐ sponding environment variable are indicated, then authenti‐ cation is not performed. -P password The password to authenticate with. EXIT STATUS The exit statuses are: 0 Success, or the server is playing (including between tracks or stalled). 1 Command or query error, or the server is paused or stopped. 254 A transport mechanism cannot be found. 255 Server cannot be reached, did not respond, or otherwise did some‐ thing unexpected ENVIRONMENT PIANOD_HOST The pianod host to connect to. PIANOD_PORT The port at which to connect to pianod. PIANOD_USER The username to authenticate with. PIANOD_PASSWORD The password with which to authenticate. FILES None. BUGS JSON requests will fail when asUser, inRoom, and/or withSource clauses are used with the -U option or the $PIANOD_USER environment variable. AUTHOR Perette Barella . COPYRIGHT Copyright Perette Barella. piano is available under the MIT license. SEE ALSO pianod(1), runmix(1), football(3) UNIX/Linux/Darwin January 9, 2021 UNIX/Linux/Darwin