Not specifically for GMail, so there's probably no way to create e-mail filters for your web account from a CLI if that's what you are referring to, but I recently found out about Alpine
, and its fork re-alpine
which are cross-platform terminal-based e-mail clients capable of understanding a lot of different e-mail protocols.
Alpine
or re-alpine
can be used to compose and receive mails for and from a GMail account.
I have never tried it, so I do not know what the extent of its capabilities are beyond that, but there are several guides for it and it seems to be quite powerful.
It does provide a view of the folders within your account, so it might even be capable of setting up filters.
The thing I'm almost sure it is not that good for is automation, as it uses a TUI (Textual User Interface) library, so you'd need a special program for automating it.
EDIT: There is also msmtp
, recommended to me by a colleague, which is entirely command-line based in the traditional sense.