Skip to content
Back to search

rail

A modern terminal mail client for Gmail and Microsoft 365, with an MCP server for AI agents

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/vitosans/rail with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/vitosans/rail'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/vitosans--rail/badge.svg)](/listings/vitosans--rail)

HTML

<a href="/listings/vitosans--rail"><img src="/api/listings/vitosans--rail/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Linux x86_64 binaries are available on the [GitHub releases page](https://github.com/vitosans/rail/releases) with SHA-256 checksums. They require glibc 2.36 or newer. Extract the archive and put `rail` in a directory on your `PATH`. Build from source on macOS and other Linux systems.

Rail builds from source with Cargo. You need Rust 1.88 or newer and a C compiler (SQLite is bundled and compiled in). Supported platforms are Linux and macOS.

git clone https://github.com/vitosans/rail
cd rail
cargo install --locked --path crates/rail

This puts `rail` in `~/.cargo/bin`. To upgrade, pull and run the same command; the first command of the new version replaces any older daemon still running, including one from an earlier build of the same version. When an upgrade changes the store, the new daemon migrates it the first time it starts (rebuilding the search index can take a moment on a large mailbox); until then the mail screen says the store is not set up.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 237 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <h1 align="center">
  2. <picture>
  3. <source media="(prefers-color-scheme: dark)" srcset="assets/brand/rail-dark.png">
  4. <source media="(prefers-color-scheme: light)" srcset="assets/brand/rail-light.png">
  5. <img alt="Rail. Modern email. Native to your terminal." src="assets/brand/rail-light.png" width="560">
  6. </picture>
  7. </h1>
  8. [![ci](https://github.com/vitosans/rail/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/vitosans/rail/actions/workflows/ci.yml?query=branch%3Amain)
  9. [![CodeQL](https://github.com/vitosans/rail/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/vitosans/rail/actions/workflows/codeql.yml?query=branch%3Amain)
  10. [![coverage](https://raw.githubusercontent.com/vitosans/rail/badges/coverage.svg)](https://github.com/vitosans/rail/actions/workflows/ci.yml?query=branch%3Amain)
  11. [![version](https://img.shields.io/github/v/tag/vitosans/rail?sort=semver&filter=v%2A&label=version)](https://github.com/vitosans/rail/tags)
  12. [![rust](https://img.shields.io/badge/rust-1.90%2B-orange.svg)](Cargo.toml)
  13. [![platforms](https://img.shields.io/badge/platforms-Linux%20%7C%20macOS-blue.svg)](#install)
  14. [![license](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](#license)
  15. Rail is a terminal mail client for Gmail and Microsoft 365, written in Rust.
  16. It keeps a local copy of your mail in SQLite, synced by a small background daemon. Every list,
  17. search and open is a local query, so the interface never waits on the network.
  18. It is built for people who live in a terminal and want something in the spirit of mutt, with
  19. threads, a unified inbox across accounts, readable HTML and a command palette. It also speaks MCP,
  20. so an AI coding agent can help you set it up without ever seeing your secrets.
  21. <p align="center">
  22. <img alt="The mail screen: the sidebar, the unified inbox and an open thread side by side, with the hint bar below" src="assets/screenshots/mail.jpg" width="100%">
  23. </p>
  24. <p align="center"><sub>The mail screen at 150 columns: the sidebar, the unified inbox and an open thread, with the keys for the pane you are in along the bottom. The accounts and the mail in these pictures are invented.</sub></p>
  25. <p align="center">
  26. <img alt="A 24-second tour: opening a thread and turning its messages round with :thread-order, paging the sidebar, turning the key hints off with :hints, and previewing themes as you type in :theme" src="assets/screenshots/tour.gif" width="100%">
  27. </p>
  28. <p align="center"><sub>A short tour: open a thread and turn its older messages round with <code>:thread-order</code>, page the sidebar with <code>Ctrl-d</code>, turn the key hints off with <code>:hints</code>, and preview themes as you type in <code>:theme</code> (<code>Esc</code> puts yours back).</sub></p>
  29. <table>
  30. <tr>
  31. <td width="50%" valign="top" align="center">
  32. <img alt="The thread list" src="assets/screenshots/list.jpg"><br>
  33. <sub>The thread list: date groups, an unread dot in the account's colour, the account's badge, the people, stars and attachments, the message count after the subject and the time at the edge.</sub>
  34. </td>
  35. <td width="50%" valign="top" align="center">
  36. <img alt="A thread in the reader" src="assets/screenshots/thread.png"><br>
  37. <sub>A thread: the title block, the newest message open with its quoted lines folded, and the older messages as numbered cards. <code>n</code> and <code>p</code> move between messages, <code>Tab</code> opens or folds one.</sub>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td width="50%" valign="top" align="center">
  42. <img alt="A message with its headers shown" src="assets/screenshots/message-headers.png"><br>
  43. <sub>A message after <code>h</code>: the From, To and Date lines above the body. The title block shows names only, so the addresses stay out of the way until you ask.</sub>
  44. </td>
  45. <td width="50%" valign="top" align="center">
  46. <img alt="The command palette" src="assets/screenshots/palette.png"><br>
  47. <sub>The command palette on <code>:</code>: every command with its key, narrowed as you type. Themes, mailboxes and the settings toggles live here too.</sub>
  48. </td>
  49. </tr>
  50. <tr>
  51. <td colspan="2" valign="top" align="center">
  52. <img alt="The sidebar" src="assets/screenshots/sidebar.png"><br>
  53. <sub>The sidebar: the merged mailboxes across every account, then each account with its badge, its system folders and <code>More folders</code> for the rest, folded and unfolded with <code>Space</code>.</sub>
  54. </td>
  55. </tr>
  56. </table>
  57. > **Rail is pre-1.0.** Account setup, background sync, search, reading mail, acting on threads
  58. > (archive, trash, star, read, move) and writing mail (new messages, replies and forwards, with
  59. > undo send, and drafts saved to the account's Drafts) work today for Gmail and Microsoft 365.
  60. > Labels are Gmail's; on Microsoft 365 `m` moves to a folder instead.
  61. ## Features
  62. - **Local first.** A unified inbox and per-account and per-label lists over a local store, kept
  63. current by a background daemon that can start at login.
  64. - **A reader built for threads.** Opens on the newest message with the older ones as cards,
  65. folded quotes, numbered (clickable) links, and HTML mail drawn with its styles and pictures
  66. (remote pictures only when you ask).
  67. - **Fast to drive.** Filter as you type, saved searches, a command palette, selections and bulk
  68. actions with undo, snooze, and keys you can change (with `vim`, `mutt`, `emacs`, `gmail` and `outlook` presets).
  69. - **Writing in your own editor**, with a ten second undo send and drafts that sync to the
  70. account's Drafts.
  71. - **Gmail and Microsoft 365**, including organisation presets and Microsoft admin consent.
  72. - **Tokens kept safe** in the OS keyring, a private file or 1Password.
  73. - **`rail doctor`**, a single health check, and an **MCP server** for setting Rail up from an AI
  74. agent.
  75. ## Install
  76. ### Binaries
  77. Binaries are available on the [GitHub releases page](https://github.com/vitosans/rail/releases)
  78. with SHA-256 checksums:
  79. | Platform | Requirement |
  80. |---|---|
  81. | Linux x86_64 and ARM64 | glibc 2.36 or newer |
  82. | macOS on Apple Silicon and Intel | macOS 11 or newer |
  83. Up to v0.2.3 only Linux x86_64 was published.
  84. Extract the archive and put `rail` in a directory on your `PATH`. GitHub Actions builds each
  85. archive and attests where it came from; check one with
  86. `gh attestation verify <archive> --repo vitosans/rail`. Build from source on other systems.
  87. ### From source
  88. You need Rust 1.90 or newer and a C compiler (SQLite is bundled and compiled in). Supported
  89. platforms are Linux and macOS.
  90. ```sh
  91. git clone https://github.com/vitosans/rail
  92. cd rail
  93. cargo install --locked --path crates/rail
  94. ```
  95. This puts `rail` in `~/.cargo/bin`. To upgrade, pull and run the same command.
  96. The first command of the new version replaces any older daemon still running, including one from
  97. an earlier build of the same version. When an upgrade changes the store, the new daemon migrates
  98. it the first time it starts (rebuilding the search index can take a moment on a large mailbox);
  99. until then the mail screen says the store is not set up.
  100. ### Arch Linux
  101. [`rail-bin`](https://aur.archlinux.org/packages/rail-bin) on the AUR packages the release binaries
  102. for x86_64 and ARM64, with the docs and licences:
  103. ```sh
  104. yay -S rail-bin # or: paru -S rail-bin
  105. ```
  106. A community member maintains it, not this repository, and it follows each release within a day or
  107. so. Its checksums are the ones in the release's `SHA256SUMS`. If it falls behind, flag it out of
  108. date on its AUR page.
  109. ### Nix and NixOS
  110. The repository ships a `flake.nix` with the package, a development shell and a formatter:
  111. ```sh
  112. nix run github:vitosans/rail # run Rail without installing it
  113. nix profile install github:vitosans/rail # put `rail` on your PATH
  114. ```
  115. Both build the latest commit on `main`; `nix profile upgrade rail` rebuilds from it again. The flake
  116. covers Linux (x86_64 and ARM) and Apple Silicon Macs. nixpkgs no longer supports Intel Macs, so
  117. use the release archive or `cargo install` there.
  118. On NixOS or with home-manager, add the flake as an input and install its package:
  119. ```nix
  120. inputs.rail.url = "github:vitosans/rail";
  121. # NixOS: environment.systemPackages = [ inputs.rail.packages.${pkgs.stdenv.hostPlatform.system}.default ];
  122. # home-manager: home.packages = [ inputs.rail.packages.${pkgs.stdenv.hostPlatform.system}.default ];
  123. ```
  124. For development, the shell has the Rust version `rust-toolchain.toml` pins, with `clippy`,
  125. `rustfmt`, `cargo-deny` and `cargo-llvm-cov`, the same set CI uses:
  126. ```sh
  127. nix develop # enter the development shell
  128. nix build # the binary at ./result/bin/rail
  129. cargo test --workspace --locked # inside `nix develop`
  130. ```
  131. `direnv allow` loads that shell automatically when direnv and nix-direnv are installed. The Nix
  132. package builds with `doCheck = false`: the test suite binds loopback sockets and drives the binary
  133. in a pseudo-terminal, and the Nix sandbox allows neither, so run the tests from `nix develop`.
  134. The Nix package links nixpkgs' SQLite rather than the copy Rail bundles, as nixpkgs does for every
  135. Rust package, so SQLite updates come with nixpkgs.
  136. ## Quick start
  137. ```sh
  138. rail # read your mail
  139. rail setup # add an account: guided steps, then a browser login
  140. rail sync # fill the local store and watch progress
  141. rail search invoice # one line per matching thread
  142. rail doctor # check that everything is in order
  143. rail daemon install # keep syncing after you log out and back in
  144. ```
  145. 1. **`rail setup`** opens the setup wizard, which shows the portal steps, asks for the values the
  146. portal gave you, and logs you in through the browser. See [Account setup](docs/accounts.md).
  147. 2. **`rail sync`** fills the local store. Newest mail arrives first, but a first sync of a large
  148. mailbox takes hours; set [`history_days`](docs/configuration.md#sync-settings) to sync only
  149. recent mail.
  150. 3. **`rail`** opens the mail screen. Press `?` for the keys of the view you are in, or `:` for the
  151. command palette. See [Reading mail](docs/reading.md).
  152. 4. **`rail daemon install`** starts the daemon at login. Without it, the daemon starts on demand.
  153. Every command and flag is in [Commands](docs/commands.md).
  154. ## Documentation
  155. | Page | What it covers |
  156. |---|---|
  157. | [Account setup](docs/accounts.md) | The setup wizard, Gmail and Microsoft 365 app registration, admin consent, Microsoft 365 differences, organisation presets. |
  158. | [Reading mail](docs/reading.md) | The mail screen, the reader, pictures, links, attachments, filtering, saved searches, the palette, themes. |
  159. | [Doing things to mail](docs/actions.md) | Archive, trash, star, labels, moving, selections, undo, snooze. |
  160. | [Writing mail](docs/writing.md) | The editor, the review, sending with undo, drafts, limits. |
  161. | [Keys](docs/keys.md) | Key names, `[keys]`, presets, editing keys in text fields, and every action with its default keys. |
  162. | [Configuration](docs/configuration.md) | Every `config.toml` setting, sync, 1Password, file locations, the daemon. |
  163. | [Commands](docs/commands.md) | Every command, its flags and exit codes. |
  164. | [MCP](docs/mcp.md) | Using Rail from an AI agent. |
  165. | [Security and privacy](docs/security.md) | Tokens, local storage, remote content, logs. |
  166. | [Troubleshooting](docs/troubleshooting.md) | Common messages and fixes, Microsoft sign-in errors. |
  167. ## Status
  168. **Coming next:** agent tools for drafts and sends, the last piece of mail work, governed by the
  169. per-account [`ai_send`](docs/configuration.md#ai_send-what-an-ai-agent-may-do-with-your-mail)
  170. policy. **Later:** search operators, layout options.
  171. **Pre-1.0 caveats.** Config keys, command output and the store's schema may change between
  172. releases. The store migrates forward on its own; there is no downgrade path. Rail is tested on
  173. Linux and macOS only.
  174. ## Contributing
  175. Bug reports and pull requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for the
  176. development loop, ground rules and commit format, and [CHANGELOG.md](CHANGELOG.md) for what has
  177. shipped.
  178. ## License
  179. Licensed under either of
  180. - Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))
  181. - MIT license ([LICENSE-MIT](LICENSE-MIT))
  182. at your option.
  183. The colour schemes behind `:theme` are the
  184. [iTerm2-Color-Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes) collection,
  185. © 2011 to present Mark Badolato, MIT licence.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.