-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: extracted core funcionality to lib2fas
BREAKING CHANGE
- Loading branch information
1 parent
3a922fa
commit 88ca459
Showing
16 changed files
with
269 additions
and
572 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,50 @@ | ||
# 2fas Python | ||
|
||
2fas-python is an unofficial implementation | ||
of [2FAS - the Internet’s favorite open-source two-factor authenticator](https://2fas.com). | ||
It consists of a core library in Python and a CLI tool. | ||
|
||
## Installation | ||
|
||
To install this project, use pip or pipx: | ||
|
||
```bash | ||
pip install 2fas | ||
# or: | ||
pipx install 2fas | ||
``` | ||
|
||
## Usage | ||
|
||
To see all available options, you can run: | ||
```bash | ||
2fas --help | ||
``` | ||
|
||
If you simply run `2fas` or `2fas /path/to/file.2fas`, an interactive menu will show up. | ||
If you only want a specific TOTP code, you can run `2fas <service>` or `2fas /path/to/file.2fas <service>`. | ||
Multiple services can be specified: `2fas <service1> <service2> [/path/to/file.2fas]`. | ||
Fuzzy matching is applied to (hopefully) catch some typo's. | ||
You can run `2fas --all` to generate codes for all TOTP in your `.2fas` file. | ||
|
||
### Settings | ||
```bash | ||
# see all settings: | ||
2fas --settings # shortcut: -s | ||
# see a specific setting: | ||
2fas --setting key | ||
# update a setting: | ||
2fas --setting key value | ||
``` | ||
|
||
The `--settings`, `--setting` or `-s` flag can be used to read/write settings. | ||
This can also be done from within the interactive menu. | ||
|
||
### As a Library | ||
|
||
Please see the documentation of [lib2fas-python](https://github.com/robinvandernoord/lib2fas-python) for more details on | ||
using this as a Python library. | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
""" | ||
This file stores the module version. | ||
""" | ||
|
||
__version__ = "0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
from .core import load_services | ||
""" | ||
Entrypoint which exposes app. | ||
""" | ||
|
||
__all__ = ["load_services"] | ||
from .cli import app | ||
|
||
__all__ = ["app"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.