GUIDEGuide
Generate a TOTP code
movitera totp prints the current code for a login that has 2FA set up in Vault.
Use the credential name or id
bash
$ movitera totp github-admin
123456
(valid until 2026-11-13T18:31:00Z)The CLI looks for the exact name in the default team (or the team given with --team). If two logins share the name, use the id.
The first stdout line contains only the code. That keeps $(movitera totp github-admin) usable in scripts.
Find the id
bash
$ movitera creds list --search github
NAME KIND TAGS ID
github-admin login production cred_github_adminPick interactively
In an interactive terminal, omit the name. The CLI lists the team's credentials and prints the TOTP code for the one you pick.
bash
$ movitera totp --team <team-id>