Skip to content

Signing in

tcc setup does the whole first run in one command: sign in, register this computer as a device, set up the key that unlocks your connections, and download what it needs.

tcc setup

It opens your browser at the Trusted Codes sign-in page, waits for you to finish there, and continues on its own. When it is done it prints your personal code, which is how you know it worked.

You do not have to run setup first. Any command that needs an account will do the same sequence before it runs — the first tcc code show on a fresh machine signs you in, registers the device and syncs. setup exists so you can do that deliberately rather than in the middle of something else.

The browser sends the finished session back to a short-lived listener on this machine, on the loopback address only. Nothing else can reach it, and it stops as soon as the sign-in completes.

Your tokens are kept in the operating system keychain, not in a file in your home directory.

tcc auth status # are we signed in, and as whom
tcc auth login # sign in again
tcc auth logout # clear the tokens from the keychain

tcc auth token prints the current access token to standard output, for piping into another tool. Treat it as a password.

Signing in is not enough on its own. Your connection secrets are end-to-end encrypted, so this computer needs a key of its own before it can compute anything.

tcc device status # is this computer registered
tcc device register # register it
tcc device list # every device signed in to this account
tcc device remove <device-id>

tcc device list shows every device on the account, not just this one, and tcc device remove signs one out — use it when you no longer have the machine.

Recovery words are how a new device gets access to connections that already exist. Without them, a fresh install can sign in but cannot read anything.

On your first or only device, create them:

tcc device setup-recovery
tcc device setup-recovery --lang de

The language may be en, de, es, fr, it or nl, and defaults to en. Write the words down somewhere that is not this computer.

On a later device, enter them:

tcc device recover

tcc device regenerate-recovery issues a new set of words for the same key, for when you think the old set has been seen by someone else.

If setup stops and tells you the key exists but this device has no access to it, that is the case tcc device recover is for.

tcc sync # download connection secrets, upload any a peer is missing
tcc sync status # when it last ran, and how much is cached
tcc sync clear # discard the local cache

Commands that need secrets sync on their own when the cache is older than five minutes, so you rarely have to call this. It is useful straight after accepting an invitation on your phone, when you do not want to wait.

tcc switch

This clears the current session, the device registration and the whole local cache, then signs in as somebody else and sets that account up from scratch. It is not a quick toggle between two accounts — the machine ends up holding one account’s data only.

Signing in as a different account through tcc setup or an ordinary command does the same reset, and says so before it does.

tcc profile # show it
tcc profile set-name "Ada Byron"
tcc profile set-language de

The language set here is the one your codes are generated in unless a connection or a --lang flag says otherwise.