Google Messages (RCS and SMS) in your terminal. Pair it with your Android phone, the way Google Messages for web does, and read and answer your texts without leaving the terminal.
Built on the protocol work of mautrix-gmessages and its library libgm, by Tulir Asokan and the mautrix contributors: they reverse-engineered Google Messages for web, and this project would not exist without them.
Not affiliated with Google. Google Messages is a trademark of Google LLC.
Packages for Linux x86-64 are attached to each release:
Elsewhere, build it with Cargo (below). Packages are made with multi-distro-packager from packaging/; packaging/aur/ holds the PKGBUILD for the AUR.
Needs Rust ≥ 1.89 and the OpenSSL development package (Fedora: openssl-devel, Debian/Ubuntu: libssl-dev). On Linux, the sign-in window also needs GTK 3 and WebKitGTK 4.1 (Fedora: gtk3-devel webkit2gtk4.1-devel, Debian/Ubuntu: libgtk-3-dev libwebkit2gtk-4.1-dev).
cargo install --locked gmessages-tui # or a package, above gmessages-tui First run: sign in to the phone's Google account in the window that opens, then tap on your phone the emoji shown in the terminal. That's it: your conversations come in.
No display (over SSH, in a container)? The sign-in window is skipped: pairing goes on from your browser (see options). Add --no-default-features to the install for a headless build without the window at all. The latest sources: cargo install --locked --git https://github.com/louisrubet/gmessages-tui; from a checkout: cargo install --locked --path ..
gmessages-tui ──HTTPS──▶ Google's relay (as messages.google.com) ◀──▶ Google Messages on your phone Google Messages has no public API. Like Google Messages for web, gmessages-tui never talks to the phone directly: both talk to a Google relay. The phone holds the messages and sends them, so it must stay online.
gmessages-tui --unpair unpairs: Google revokes this device, so your phone no longer lists it (Device pairing), and the session here is deleted; the messages stored stay, and the next start pairs again. (--reset-login, its name up to 1.3.1, does the same.)
gmessages-tui --manual pairs from your browser: open the link printed in the terminal, sign in in a Firefox private window, then Developer tools › Network › config › Copy as cURL, and paste in the terminal or the page. It is also what happens when the sign-in window cannot open (no display), and the way out when Google refuses the window, or shows in it a captcha that cannot be read.
gmessages-tui --qr pairs by QR code, for phones that still offer it: scan it with the scanner of Google Messages (Device pairing › QR code scanner), not with the camera, which only opens a Google help page. No scanner there? Use --manual.
gmessages-tui --version prints the release version, gmessages-tui --help the options.
gmessages-tui --uninstall # unpairs, then: store key in the keyring, ~/.local/share/gmessages-tui, ~/.cache/gmessages-tui cargo uninstall gmessages-tui # the program (or with your package manager) --uninstall asks for confirmation. If Google could not be told, it says so: then remove the device from your phone (Device pairing).
Any terminal works. For thumbnails, use one that speaks the kitty graphics protocol with Unicode placeholders:
On Windows, Rio is the only native option; kitty also runs under WSL with WSLg.
Elsewhere (WezTerm, Konsole, iTerm2, Warp, Windows Terminal, Alacritty, inside tmux…) everything works but graphics are reduced: images show as [image #1] and open full size with o.
The state holds the session (session.json: it gives access to your messages through the phone), the store and the log (phone.log).
Earlier versions embedded gmd, a Go helper built on libgm. Its session is converted on the first start of 1.3, without pairing again; the old file is kept as session.gmd.json.
cargo run # the app cargo test --workspace # the app and gmessages-proto cargo run --example wry_signin --features wry-signin # does Google accept the webview? GMESSAGES_TUI_LOG=gmessages_proto=trace cargo run # log everything to phone.log Credits mautrix-gmessages and libgm, by Tulir Asokan and the mautrix contributors (AGPL-3.0): the reverse engineering of Google Messages for web that this project stands on. The protocol specification in doc/protocol/ was written from their work, and gmessages-tui up to 1.2 ran on libgm itself. UKEY2 by Google, the key exchange of account pairing. The photos of the demo GIF: Wikimedia Commons, CC BY-SA (authors in examples/demo/). License AGPL-3.0-only, gmessages-tui and gmessages-proto alike.




