# rage: Rust implementation of age
rage is a simple, modern, and secure file encryption tool, using the *age*
format. It features small explicit keys, no config options, and UNIX-style
composability.
The format specification is at [age-encryption.org/v1](https://age-encryption.org/v1).
age was designed by [@Benjojo](https://benjojo.co.uk/) and
[@FiloSottile](https://bsky.app/profile/did:plc:x2nsupeeo52oznrmplwapppl).
The reference interoperable Go implementation is available at
[filippo.io/age](https://filippo.io/age).
Hardware PIV tokens such as YubiKeys are supported through the
[age-plugin-yubikey](https://github.com/str4d/age-plugin-yubikey) plugin.
For more plugins, implementations, tools, and integrations, check out the
[awesome age](https://github.com/FiloSottile/awesome-age) list.
## Installation
| Environment | CLI command |
|-------------|-------------|
| Cargo (Rust 1.65+) | `cargo install rage` |
| Homebrew (macOS or Linux) | `brew install rage` |
| MacPorts | `port install rage` |
| Alpine Linux (edge) | `apk add rage` |
| Arch Linux | `pacman -S rage-encryption` |
| Debian | [Debian packages](https://github.com/str4d/rage/releases) |
| NixOS | Add to config: `environment.systemPackages = [ pkgs.rage ];`
Or run `nix-env -i rage` |
| openSUSE Tumbleweed | `zypper install rage-encryption` |
| Ubuntu 20.04+ | [Debian packages](https://github.com/str4d/rage/releases) |
| FreeBSD | `pkg install rage-encryption` |
| Scoop (Windows) | `scoop bucket add main`
`scoop install main/rage` |
On Windows, Linux, and macOS, you can use the
[pre-built binaries](https://github.com/str4d/rage/releases).
> Help from new packagers is very welcome. Please use the package name `rage`;
> the fallback package name `rage-encryption` should be used only when there are
> *unavoidable* name conflicts in package systems that use global namespaces. Do
> not rename any binaries; instead use your package system's conflicting package
> mechanism to prevent installation of both packages at once.
## Usage
```
Usage: rage [--encrypt] (-r RECIPIENT | -R PATH)... [-i IDENTITY] [-a] [-o OUTPUT] [INPUT]
rage [--encrypt] --passphrase [-a] [-o OUTPUT] [INPUT]
rage --decrypt [-i IDENTITY] [-o OUTPUT] [INPUT]
Arguments:
[INPUT] Path to a file to read from.
Options:
-h, --help Print this help message and exit.
-V, --version Print version info and exit.
-e, --encrypt Encrypt the input (the default).
-d, --decrypt Decrypt the input.
-p, --passphrase Encrypt with a passphrase instead of recipients.
--max-work-factor Maximum work factor to allow for passphrase decryption.
-a, --armor Encrypt to a PEM encoded format.
-r, --recipient Encrypt to the specified RECIPIENT. May be repeated.
-R, --recipients-file Encrypt to the recipients listed at PATH. May be repeated.
-i, --identity Use the identity file at IDENTITY. May be repeated.
-j Use age-plugin-PLUGIN-NAME in its default mode as an identity.
-o, --output