Skip to main content

An unofficial command line interface for 2FAS

twofas-cli is an unofficial client for 2FAS written in Python that can retrieve 2fa codes stored on your mobile device by registering itself as a browser extension with 2FAS. Every request this tool makes for a 2FA code needs to be approved on your mobile device, just like with 2FAS' browser extensions. You can use it for scripting automatic logins to services that require a second factor via TOTPs.

Installation

Install via pip from PyPi:

pip install twofas-cli

Usage

In order to use twofas-cli you need to have the 2FAS app installed on your mobile device. Head over to 2fas.com for instructions and a download link for your app store.

After installing 2fas on your mobile device and PC, register twofas-cli as a browser extension by running:

twofas-cli register

After running this command successfully you should see a directory containing a QR code image called qrcode.png. Open it and scan it using your 2FAS app.

Afterward, you can run twofas-cli get --help to see the available options for retrieving 2fa codes or twofas-cli --help to see all possible actions.

Compatibility

twofas-cli should be able to run anywhere its dependencies and Python itself runs, however, it has only been tested so far on MacOS and Linux. It requires a recentish Python 3 version (>= 3.7).

Contributing

Contributions are welcome. Please use the Github Page to report issues or submit Pull Requests.

Metadata

Release files for twofas-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for twofas-cli 0.1.0
File Size Uploaded Provenance Actions
twofas-cli-0.1.0.tar.gz 8.1 kB Without provenance Details for twofas-cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for twofas-cli 0.1.0
File Interpreter ABI Platform Actions
twofas_cli-0.1.0-py3-none-any.whl Python 3 none any Details for twofas_cli-0.1.0-py3-none-any.whl

Total release size: 16.2 kB

Release files / twofas-cli-0.1.0.tar.gz

Download URL twofas-cli-0.1.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
93dc4c7e02d40840e3645d14b5462637a8810f8a934a6252f3c0e243413ec968
BLAKE2b-256 checksum
How to use checksums
d16ddfbe158ed24a3a1e8fd0e7f655c11625f3a8469050aa39537a70ed69f608
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / twofas_cli-0.1.0-py3-none-any.whl

Download URL twofas_cli-0.1.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e2ab83bbd9ee251175679709dfb64a7b682d3ac482dae3c648a2ed4e911d9fb
BLAKE2b-256 checksum
How to use checksums
d71655e304a70175c2b29b795842b629dc71557551cc397422b8a308e7a26340
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Security for twofas-cli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page