···6677- `make build` — compile to `./neomd` (also regenerates `docs/keybindings.md` from `internal/ui/keys.go`)
88- `make run ARGS="..."` — build and run
99-- `make install` — install to `~/.local/bin/neomd`
1010-- `make test` — `go test ./...`
99+- `make install` — install to `~/.local/bin/neomd` (default target)
1010+- `make test` — `go test ./...` (unit tests, no network)
1111+- `make test-integration` — integration tests against real IMAP/SMTP (requires demo account env vars)
1112- `make vet` / `make fmt` / `make tidy`
1212-- `make docs` — regenerate keybindings doc from `internal/ui/keys.go` (runs as part of `build`)
1313+- `make docs` — regenerate keybindings doc from `internal/ui/keys.go` (runs as part of `build`) and sync README to docs site
1414+- `make docs-serve` — serve Hugo docs locally at http://localhost:1313
1515+- `make docs-build` — build Hugo docs site to `docs/public/`
1316- `make send-test TO=addr` — run `./cmd/sendtest` to send a test email
1417- `make demo` / `make demo-hp` — run with demo configs at `~/.config/neomd-demo/` and `~/.config/neomd-demo-hostpoint/`
1518- `make benchmark` — IMAP latency benchmark (requires `IMAP_PASS_SIMU`, `IMAP_APPPASS_GMAIL_NEOMD` env vars)
1619- `make android` — cross-compile ARM64 for Termux
2020+- `make release VERSION=v0.1.0` — tag and push a new release (runs docs build, GitHub Actions handles publishing)
1721- Single test: `go test ./internal/smtp -run TestBuildMessage`
18221923Requires Go 1.22+. Binary version is injected via `-ldflags -X main.version=$(git describe)`.
···51555256**Screener** (`internal/screener/`) reads line-based lists of email addresses from paths defined in config. Default paths are under `~/.config/neomd/lists/`. Classification (`I`/`O`/`F`/`P`) appends to the corresponding list file and moves the message to the matching folder. Auto-screening runs on Inbox load and on a 5-minute background timer (`ui.background_sync_interval`).
53575454-**Config** (`internal/config/`) — TOML at `~/.config/neomd/config.toml`, auto-created with placeholders. Supports multiple `[[accounts]]` and SMTP-only `[[senders]]` aliases (cycled with `ctrl+f` in compose/pre-send). `-config PATH` flag overrides location.
5858+**Config** (`internal/config/`) — TOML at `~/.config/neomd/config.toml`, auto-created with placeholders. Supports multiple `[[accounts]]` and SMTP-only `[[senders]]` aliases (cycled with `ctrl+f` in compose/pre-send). OAuth2 authentication supported via `oauth2_client_id`, `oauth2_client_secret`, `oauth2_issuer_url`, `oauth2_scopes` fields. `-config PATH` flag overrides location.
5959+6060+**Documentation** — Hugo site in `docs/` served at https://ssp-data.github.io/neomd/. README.md is synced to `docs/content/overview.md` via `scripts/sync-readme-to-docs.sh`. Keybindings are auto-generated from `internal/ui/keys.go` via `cmd/docs/main.go` — never hand-edit the markdown tables.
6161+6262+**Package structure:**
6363+- `internal/ui/` — bubbletea TUI: model.go (state machine), inbox.go, reader.go, compose.go, keys.go (single source of truth for keybindings)
6464+- `internal/imap/` — IMAP client wrapper using go-imap/v2
6565+- `internal/smtp/` — email sender, MIME builder (`BuildMessage` is the main entry point)
6666+- `internal/screener/` — HEY-style sender classification
6767+- `internal/config/` — TOML config parsing
6868+- `internal/editor/` — spawns $EDITOR with neomd-*.md temp files
6969+- `internal/render/` — glamour-based Markdown rendering for terminal
7070+- `internal/mailtls/` — TLS/STARTTLS connection helpers
7171+- `internal/oauth2/` — OAuth2 flow for Gmail/Office365
55725673## Project-Specific Conventions
5774