Signing in
Signing in happens through a short device-code flow: tCode opens auth.artfical.com in your browser and asks you to enter a code back in the terminal to link the two together.
This is the same general pattern many command-line tools use for authentication, borrowed specifically because it avoids ever needing to type a password directly into the terminal itself.
Once linked, your session is remembered on that machine going forward, so there is no need to repeat this every time you start tCode there, only after an explicit /logout or when setting tCode up on a genuinely new machine for the first time.
If you are already signed in to tAI in the browser tab that opens for this step, linking is typically a single confirmation click rather than a full login form; the flow reuses whatever session the browser already has rather than asking you to sign in twice.
The code itself is short-lived, generated fresh for that specific sign-in attempt; if it expires before you finish entering it, running /login again generates a new one rather than leaving you stuck with an expired code.