REFERENCE
Exit codes and -y
These rules apply to every command. Use them in scripts, cron jobs and ssh sessions.
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | The command failed. Tether prints one Error: ... line on stderr |
2 | Usage error, such as an unknown command or option, or a missing argument |
-y and prompts
-y,--yesanswers every prompt: it confirms the action, and takes the default answer of each question- Without a terminal and without
-y, a prompt fails with a message that names-y -ynever approves an Inbox item or trusts a key. Without a terminal,packages approveandrejectneed--expect, andmachines trustneeds--fingerprint- The one exception:
tether packages approve --all -yapproves the packages it lists. It still leaves machine keys, malicious packages, packages whose record fails its signature, and packages without a version or tap to name -ydoes not pick an answer for a question that has no safe default. For example, it never picks a side of a conflict
Terminal
tether -y upgrade
tether packages approve npm:typescript --expect 5.6.3
tether machines trust work-laptop --fingerprint SHA256:... Without a terminal
tether sync without a terminal, for example from cron or ssh, runs as the daemon does:
- It records conflicts for
tether resolveand keeps those files out of the push - It holds new packages and machine keys in the Inbox
- It defers casks that need a password to the next
tether syncin a terminal - Git commands that reach the remote stop after 5 minutes. The next sync tries again
JSON output
status, machines list, packages list and packages inbox take --json. They print one JSON value on stdout. Messages go to stderr. The flag is experimental in 2.0: field names can still change.
Colour
Tether prints no colour codes when stdout is not a terminal, such as a pipe or a file, or when NO_COLOR is set.
Machine arguments and package ids
- A machine argument takes a machine id, or a hostname that names exactly one trusted machine or this machine.
machines trustalso takes the hostname of a new machine whose record a key signs. A name that matches no machine is an error - A package id is
manager:name, such asnpm:typescript. Managers:brew_formulae(orbrew),brew_casks(orcask),brew_taps,npm,pnpm,bun,gem,uv