In a CLI, oath lets you calculate a TOTP.
But it's maybe a bit more insecure if you use the same machine.