Show HN: Higgs, a local AI CLI for Proton Mail (no cloud, no telemetry) Higgs, an unofficial, agent-first CLI for Proton Mail designed to be driven by language models, has been released as a local-only tool with no cloud dependencies or telemetry. The project, built by the community and not affiliated with Proton AG, features a schema manifest, NDJSON streaming, typed error envelopes, and checkpointed state to simplify integration with AI agents. Its first workload is a Proton Mail inbox classifier using a local LLM via Ollama and Proton Mail Bridge. An agent-first CLI for Proton Mail. Schema manifest for tool use, NDJSON on stdout, typed error envelopes, and a stable exit-code enum — designed to be driven by a language model, not a human. Unofficial project. higgs is an independent, community-built CLI for Proton Mail. It is not affiliated with, endorsed by, or sponsored by Proton AG. "Proton", "Proton Mail", and related marks are trademarks of Proton AG; this project uses them only to describe interoperability. Wiring a normal CLI into an agent loop is painful. Stdout mixes prose and data, errors are English sentences, exit codes are 0-or-1, and the only tool specification is --help . higgs inverts that. Every design decision assumes the primary caller is a model: Schema manifest. higgs schema emits a JSON description of every subcommand — flags, args, stdout format, exit codes. An agent loads it once and can drive the tool without prompt-engineered command syntax. NDJSON streaming with a terminator. Every streaming command emits one JSON object per line and ends with {"type":"summary", ...} . Callers know when a stream is done without heuristics. Typed error envelopes. Every failure emits {"error": {"kind", "code", "reason", "message", "hint"}} . Agents branch on .error.kind , not on parsed English. Exit codes as an enum. Exit codes map 1:1 to error kinds, so retry and escalation are deterministic: retry on 5 imap , prompt the user on 2 auth , surface to the caller on 4 config . Sanitized stderr. Human-readable progress on stderr, stripped of ANSI escapes, bidi controls, and zero-width characters — safe to feed back into a model's context. Checkpointed state. SQLite state DB with backfill and state clear so runs are resumable across crashes and restarts. Secrets out-of-band. Credentials go to the OS keyring macOS Keychain, Windows Credential Manager, libsecret on Linux with an AES-256-GCM file fallback, so nothing sensitive flows through an agent's context. The first workload riding this contract is a local-only Proton Mail inbox classifier via Proton Mail Bridge and Ollama. The classifier is useful on its own, but the contract is the point. higgs classify connects to a running Proton Mail Bridge https://proton.me/mail/bridge over IMAP, streams each message through a local LLM Ollama https://ollama.com/ by default, or any self-hosted OpenAI-compatible server such as llama.cpp llama-server — see PM LLM BACKEND , and applies one or more labels from an 11-category taxonomy. Every step runs on localhost : no API keys, no cloud inference, no telemetry. The default model is Gemma 4 https://ollama.com/library/gemma4 , chosen because it has native function-calling support, a 128K context window on the small variants, and fits comfortably on a laptop. - Install and sign into Proton Mail Bridge https://proton.me/mail/bridge . Note the IMAP username and bridge password it assigns. - Install Ollama https://ollama.com/download and pull a model: ollama pull gemma4 - Install higgs : Homebrew macOS & Linux brew tap higgscli/higgs brew install higgs go install go install github.com/higgscli/higgs/cmd/higgs@latest Or build from source: git clone https://github.com/higgscli/higgs.git cd higgs make build - Export Bridge and Ollama settings. A .env at the repo root works: export PM IMAP USERNAME="alice@proton.me" export PM IMAP PASSWORD="bridge-generated-password" export PM IMAP HOST="127.0.0.1" export PM IMAP PORT="1143" export PM OLLAMA MODEL="gemma4" - Dry-run against your inbox: higgs classify --dry-run --limit 20 INBOX Review the NDJSON. When the suggestions look right, rerun with --apply to write labels back to Proton. higgs schema returns a manifest of every subcommand. Load it once, drive the CLI from it. higgs schema classify { "name": "classify", "summary": "Classify messages with Ollama and optionally apply labels", "args": {"name": "mailbox", "required": false, "default": "INBOX"} , "flags": {"name": "dry-run", "type": "bool", "description": "Preview suggestions without writing labels"}, {"name": "apply", "type": "bool", "description": "Apply suggested labels to IMAP"}, {"name": "limit", "type": "int", "default": 100}, {"name": "workers", "type": "int", "default": 4}, {"name": "no-state", "type": "bool"}, {"name": "reprocess", "type": "bool"} , "stdout": "ndjson", "exit codes": 0, 2, 3, 4, 5, 6, 7, 9 } stdout : structured JSON. Single-object commands pretty-print; streaming commands emit NDJSON. stderr : human-readable progress, sanitized of ANSI escapes, bidi controls, and zero-width characters. NDJSON terminator : every streaming command ends with one {"type":"summary", ...} line. Read until you see it. Error envelope : failures emit a typed envelope with kind , code , reason , message , and hint . { "error": { "kind": "config", "code": 400, "reason": "configError", "message": "PM IMAP USERNAME is required", "hint": "export PM IMAP USERNAME=