setup-gmail

A private, single-user tool that keeps the operator's own Gmail filters in a file instead of in a web form.

setup-gmail manages the mail filters and labels of the operator's own Gmail accounts declaratively. The filters live in a text configuration file kept under version control; the tool compares that file with what Gmail currently has and applies the difference. Editing a rule is a diff and a commit rather than a dozen clicks in the Gmail settings screen.

It is not a product and has no users other than its author. There is no sign-up, no hosted service and nobody else's account is ever touched. This page exists because Google requires an application using the Gmail API to publish a home page and a privacy policy.

What it does

  1. Reads the operator's filter and label definitions from a local configuration file.
  2. Asks the Gmail API for the filters and labels currently configured on the operator's own account, and shows the difference.
  3. On an explicit confirmation, creates, updates or removes filters and labels so that the account matches the file.

The application holds no access to mail itself. Its OAuth scopes cover settings and labels only, so it cannot read, send, modify or delete a single message — a limitation that is enforced by Google, not merely by the code.

Everything runs on the operator's own machine, started by hand. It is not a web service and accepts no inbound connections. The tool is a thin wrapper around the open-source gmailctl; its own source lives in a private repository.