# Install gmailctl with Homebrew, dnf, MacPorts, Nix

Declarative configuration for Gmail filters. Version 0.12.0 via Homebrew; verified 2026-05-19.

## Install

```sh
sudo av install brew:gmailctl
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install gmailctl
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gmailctl
```

  Evidence: MacPorts ports tree: mail/gmailctl/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- dnf (92%):

```sh
sudo dnf install gmailctl
```

  Evidence: Fedora Rawhide package metadata: gmailctl from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#gmailctl
```

  Evidence: nixpkgs package indexes: pkgs/by-name/gm/gmailctl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:gmailctl
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/gmailctl>
- **Version:** 0.12.0
- **Source summary:** Declarative configuration for Gmail filters
- **Homepage:** <https://github.com/mbrt/gmailctl>
- **Repository:** <https://github.com/mbrt/gmailctl>
- **Upstream docs:** <https://github.com/mbrt/gmailctl#readme>
- **License:** MIT
- **Source archive:** <https://github.com/mbrt/gmailctl/archive/refs/tags/v0.12.0.tar.gz>
- **Last updated:** 2026-05-19T12:54:23Z
- **Generated:** 2026-07-09T07:20:21+00:00

## Executables

- gmailctl (cli)
- gmailctl (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-09
- Package-manager version: 0.12.0
- Package-manager updated: 2026-05-19
- Local data: ok
- Upstream repository: https://github.com/mbrt/gmailctl
- Upstream latest detected: v0.12.0 (current)
## Project history and usage

gmailctl is a Go command-line tool for maintaining Gmail filters as declarative Jsonnet configuration. It treats mail filtering rules as code: users edit a local configuration, review a diff, and apply the result through the Gmail API instead of importing XML filters by hand.

### Project history

The public repository was created in 2018 by Marco Bertoni. The README frames the project around a practical frustration with long, hard-to-audit Gmail filter lists and contrasts gmailctl with tools that generate XML for manual import.

The project developed around a small CLI surface: init, edit, diff, apply, download, export, and debug. Versioned GitHub releases show a 0.x series continuing from 2021 through 2026, with prebuilt binaries and Go installation documented upstream.

### Adoption history

gmailctl's adoption story is that of a focused personal-infrastructure tool rather than a large ecosystem platform. It reached package managers such as Homebrew, Fedora, MacPorts, Nix, and Snap, making a Gmail-account automation workflow installable through normal workstation provisioning.

The repository's star count and package availability indicate a recognizable niche among users who want email rules to live in version control and code review, especially people already comfortable with command-line tools and declarative configuration.

### How it is used

Practitioners run gmailctl init to set up Gmail API access, then use gmailctl edit or a local Jsonnet file to maintain filters. The tool can show diffs against Gmail settings, apply the local configuration, export XML, and download existing filters as a migration starting point.

Its main operational value is repeatability: filter rules can be reviewed, backed up, refactored, and reapplied, while credentials and tokens stay in the gmailctl configuration directory.

### Why package nerds care

For package users, gmailctl is a small example of SaaS configuration drifting into dotfile territory. It packages the hidden state of a Gmail account as a CLI-managed artifact, so a mail workflow can be installed and upgraded alongside other command-line tools.

### Timeline

- 2018: Public GitHub repository created.
- 2021: Version 0.10.0 published in the GitHub releases stream.
- 2026: Version 0.12.0 published.

### Related projects

- gmail-britta is cited by the README as an earlier Gmail-filter DSL approach based around XML import.
- Jsonnet supplies the configuration language used for composable Gmail filter definitions.

### Sources

- <https://api.github.com/repos/mbrt/gmailctl>
- <https://github.com/mbrt/gmailctl>
- <https://github.com/mbrt/gmailctl/releases>


## Security Notes

No matching local secret-handling manifest was found for gmailctl. Nucleus package metadata is still published here so future coverage has a stable package URL.



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: $XDG_CONFIG_HOME/gmailctl/config.jsonnet, ~/.config/gmailctl/config.jsonnet, ~/.gmailctl/config.jsonnet

## Credential files

- Unix: $XDG_CONFIG_HOME/gmailctl/credentials.json, $XDG_CONFIG_HOME/gmailctl/token.json, ~/.config/gmailctl/credentials.json, ~/.config/gmailctl/token.json, ~/.gmailctl/credentials.json, ~/.gmailctl/token.json
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gmailctl
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - gmailctl: normalized package name match | nixpkgs package indexes: pkgs/by-name/gm/gmailctl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- dnf - gmailctl - 0.12.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: gmailctl from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Declarative configuration for Gmail filters | https://github.com/mbrt/gmailctl
- MacPorts - gmailctl: normalized package name match | MacPorts ports tree: mail/gmailctl/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [aerc](https://www.automicvault.com/pkg/brew/aerc/) - Shares av.db curated category or tags: cli, email, productivity.
- [alot](https://www.automicvault.com/pkg/brew/alot/) - Shares av.db curated category or tags: cli, email, productivity.
- [alpine](https://www.automicvault.com/pkg/brew/alpine/) - Shares av.db curated category or tags: cli, email, productivity.
- [extract_url](https://www.automicvault.com/pkg/brew/extract-url/) - Shares av.db curated category or tags: cli, email, productivity.
- [gyb](https://www.automicvault.com/pkg/brew/gyb/) - Shares av.db curated category or tags: cli, email, gmail, productivity.
- [himalaya](https://www.automicvault.com/pkg/brew/himalaya/) - Shares av.db curated category or tags: cli, email, productivity.
- [imap-backup](https://www.automicvault.com/pkg/brew/imap-backup/) - Shares av.db curated category or tags: cli, email, gmail, productivity.
- [lbdb](https://www.automicvault.com/pkg/brew/lbdb/) - Shares av.db curated category or tags: cli, email, productivity.
- [gmail-getter](https://www.automicvault.com/pkg/npm/gmail-getter/) - Local package facts share a topical domain. Shared terms: cli, email, gmail, productivity.

## Combined YAML source

View the package source record on GitHub. [combined/gmailctl.yml](https://github.com/automic-vault/db/blob/main/combined/gmailctl.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
