# andcli

> CLI tool for managing 2FA tokens from encrypted backups of popular authenticator apps

Stars: 161 · Categories: Dev Tools

- Repository: https://github.com/tjblackheart/andcli
- Page: https://www.trmn.sh/tools/andcli

## Install

- Go: `go install github.com/tjblackheart/andcli/v2/cmd/andcli@latest`

## Overview

andcli is a command-line interface for managing two-factor authentication (2FA) tokens using encrypted backups exported from popular authenticator applications. The tool supports encrypted vault formats from andOTP, Aegis, 2fas, Stratum/Authenticator Pro, KeePass (kdbx v2), and ProtonPass, processing only TOTP entries while keeping all data in memory without persisting to disk.

The tool provides both an interactive terminal user interface and direct query functionality. Users can search for entries with `/`, navigate with keyboard shortcuts, view tokens by pressing Enter, and copy tokens to the system clipboard with `c`. The TUI includes features like toggling username visibility and supports theming through hexadecimal color configuration.

andcli handles cross-platform clipboard integration automatically, detecting available tools like xclip, xsel, or wl-copy on Linux, pbcopy on macOS, and clip.exe on Windows. For non-interactive use, the `--query` flag enables direct vault queries that return results in the format `<Issuer> <Token> <ValidSecs>`. The tool also supports reading passwords from stdin with `--passwd-stdin`, making it suitable for automation workflows.

### Installation

```bash
# via Go
go install github.com/tjblackheart/andcli/v2/cmd/andcli@latest
```

![andcli terminal interface demo](https://media.trmn.sh/cached/1c7f9f5f44aab14c54d0c5e4694e6df57fab8ff5ee98170841462099afc7efb6.gif)

## Alternatives

- [crates-tui](https://www.trmn.sh/tools/crates-tui.md): Terminal interface for browsing and exploring Rust crates from crates.io with search and clipboard integration. (155 stars)
- [termframe](https://www.trmn.sh/tools/termframe.md): Non-interactive terminal emulator that executes commands and exports their output as SVG screenshots. (Rust, 144 stars)
- [awsesh](https://www.trmn.sh/tools/awsesh.md): TUI and CLI tool for managing AWS SSO sessions with fuzzy search, account switching, and shell integration. (Go, 143 stars)
- [b4n](https://www.trmn.sh/tools/b4n.md): Terminal user interface for Kubernetes API management with resource CRUD, logs, shell access, and port forwarding (109 stars)
- [textual-astview](https://www.trmn.sh/tools/textual-astview.md): TUI tool for exploring Python Abstract Syntax Trees (AST) with interactive tree view and source highlighting (Python, 100 stars)

---

Canonical: https://www.trmn.sh/tools/andcli
