#steam #2fa #authentication #cli #steamguard

app steamguard-cli

A command line utility to generate Steam 2FA codes and respond to confirmations

10 unstable releases (3 breaking)

new 0.7.1 Mar 18, 2023
0.7.0 Dec 5, 2022
0.6.0 Dec 5, 2022
0.5.0 Jun 25, 2022
0.0.0 Jul 30, 2021

#2 in #gaming

Download history 37/week @ 2022-11-29 31/week @ 2022-12-06 23/week @ 2022-12-13 14/week @ 2022-12-20 6/week @ 2022-12-27 6/week @ 2023-01-03 8/week @ 2023-01-10 16/week @ 2023-01-17 13/week @ 2023-01-24 15/week @ 2023-01-31 72/week @ 2023-02-07 60/week @ 2023-02-14 20/week @ 2023-02-21 8/week @ 2023-02-28 7/week @ 2023-03-07 30/week @ 2023-03-14

67 downloads per month


3.5K SLoC


Lint, Build, Test AUR Tester

A command line utility for setting up and using Steam Mobile Authenticator (AKA Steam 2FA). It can also be used to respond to trade and market confirmations.

The only legitimate place to download steamguard-cli binaries is through this repo's releases, or by any package manager that is linked in this document.


This utility is effectively in beta. Use this software at your own risk. Make sure to back up your maFiles regularly, and make sure to actually write down your revocation code. If you lose both of these, we can't help you, your only recourse is to beg Steam support.


If you have the Rust toolchain installed:

cargo install steamguard-cli

Arch-based systems can install from the AUR:

  • For steamguard-cli-git
  • Non-git release is not officially provided. Please open an issue if you would like to help set that up.

Otherwise, you can download binaries from the releases.

Building From Source

cargo build --release


steamguard-cli looks for your maFiles/manifest.json in at these paths, in this order:

  • ~/.config/steamguard-cli/maFiles/
  • ~/maFiles/

Your maFiles can be created with or imported from Steam Desktop Authenticator. You can create maFiles with steamguard-cli using the setup action (steamguard setup).


Full helptext can be displayed with:

steamguard --help

One Liners

Generate and copy a new code to clipboard:

steamguard-cli | xclip -selection clipboard

Importing 2FA Secret Into Other Applications

It's possible to import your 2FA secret into other applications. This is useful if you want to use a password manager to generate your 2FA codes, like KeeWeb.

To make this easy, steamguard-cli can generate a QR code for your 2FA secret. You can then scan this QR code with your password manager.

steamguard qr # print QR code for the first account in your maFiles
steamguard -u <account name> qr # print QR code for a specific account

There are some applications that do not generate correct 2fa codes from the secret, so do not use them:

  • Google Authenticator
  • Authy


By contributing code to this project, you give me and any future maintainers a non-exclusive transferable license to use that code for this project, including permission to modify, redistribute, and relicense it.


steamguard-cli, the command line program is licensed under GPLv3.

steamguard, the library that is used by steamguard-cli is dual licensed under MIT or Apache 2.0, at your option.

Used By


~653K SLoC