Crates.io | aegis-cli |
lib.rs | aegis-cli |
version | 1.2.2 |
source | src |
created_at | 2024-10-24 19:08:39.829452 |
updated_at | 2024-11-13 02:30:32.44918 |
description | Show TOTPs from Aegis vault on CLI |
homepage | |
repository | https://github.com/pepa65/aegis-cli |
max_upload_size | |
id | 1421631 |
size | 96,727 |
Show TOTPs from Aegis vault on CLI
CLI app for showing TOTP codes from an Aegis vault file (backup file from the Aegis Authenticator Android app Aegis Authenticator).
wget https://github.com/pepa65/aegis-cli/releases/download/1.2.2/aegis
sudo mv aegis /usr/local/bin
sudo chown root:root /usr/local/bin/aegis
sudo chmod +x /usr/local/bin/aegis
If not installed yet, install a Rust toolchain, see https://www.rust-lang.org/tools/install
cargo install aegis-cli
cargo install --git https://github.com/pepa65/aegis-cli
git clone https://github.com/pepa65/aegis-cli
cd aegis-cli
rustup target add x86_64-unknown-linux-musl
export RUSTFLAGS='-C target-feature=+crt-static'
cargo build --release --target=x86_64-unknown-linux-musl
Even without a full Rust toolchain, rust binaries can be installed with the static binary cargo-binstall
:
# Install cargo-binstall for Linux x86_64
# (Other versions are available at https://crates.io/crates/cargo-binstall)
wget github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
tar xf cargo-binstall-x86_64-unknown-linux-musl.tgz
sudo chown root:root cargo-binstall
sudo mv cargo-binstall /usr/local/bin/
Only a linux-x86_64 (musl) binary available: cargo-binstall aegis-cli
Then aegis
will be installed in ~/.cargo/bin/
which will need to be added to PATH
!
To start aegis-cli
, simply pass the path to your backup file as an argument and enter the password when prompted.
For example:
aegis aegis-backup-20230512-193110.json
? Insert Aegis Password › ********
Fuzzy finding is supported for quickly locating entries. Type some letters of the entry's name to filter the list.
Pressing Esc
exits the app.
After an entry is selected, the TOTP can be copied from the terminal or pasted through the integrated clipboard support.
TOTPs are updated automatically upon expiration. Pressing Esc
will go back to the Fuzzy selection screen.
To unlock the Aegis vault, aegis-cli
supports the following methods:
aegis-cli
will prompt for a password.AEGIS_PWFILE
-p <PASSWORD_FILE>
or --password-file <PASSWORD_FILE>
aegis -p ~/.aegis.pw aegis-vault.json
AEGIS_PASSWORD
-P <PASSWORD>
or --password <PASSWORD>
aegis -P jkhglhkjhkjf aegis-vault.json
-n <NAME>...
or --name <NAME>...
: Pre-filter entries by entries NAME.
aegis -n git dave aegis-vault.json
-i <ISSUER>...
or --issuer <ISSUER>...
: Pre-filter entries by entries ISSUER.-o
or --otp
: Output selected OPTs as plain text.-j
or --json
: Output selected entries as JSON.-u
or --uri
: Output selected entries as otpauth URIs, according to
https://datatracker.ietf.org/doc/draft-linuxgemini-otpauth-uri/01/aegis-cli 1.2.2 - Show TOTPs from Aegis vault on CLI
Usage: aegis [OPTIONS] <VAULT_FILE>
Arguments:
<VAULT_FILE> Encrypted Aegis Vault JSON file (separate it from name/issuer
filters by putting -- before it [env: AEGIS_VAULT_FILE=]
Options:
-o, --otp Show OTP entries in plain text
-j, --json Export entries to Plain Aegis Vault JSON
-u, --url Export entries in URL format
-p, --pwfile <PWFILE> Aegis Vault passwordfile [env: AEGIS_PWFILE=]
-P, --password <PASSWORD> PASSWORD for Aegis Vault [env: AEGIS_PASSWORD]
-i, --issuer <ISSUER>... Filter by ISSUER (multiple allowed)
-n, --name <NAME>... Filter by NAME (multiple allowed)
-h, --help Print help
-V, --version Print version
This project has been divided into a CLI binary (this repo) and a vault utility crate so that other projects can utilize the parsing and TOTP generation functionalities as well.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.