# πŸ—ΊοΈ Newsletter CLI Roadmap > **Repository:** [github.com/loickal/newsletter-cli](https://github.com/loickal/newsletter-cli) A modern, privacy-friendly terminal tool to analyze and clean up newsletters directly from your inbox. --- ## πŸš€ Project Vision `newsletter-cli` helps users reclaim control over their inbox by: - Analyzing incoming emails via IMAP - Identifying recurring newsletters - Displaying sender statistics in an elegant TUI - Offering one-click or automated unsubscribing Built with **Go**, **Cobra**, and **Bubble Tea** β€” focused on simplicity, local privacy, and delightful UX. --- ## 🧩 Completed Features (v0.1.0 - v1.0.0-BETA-1) ### Core Features (v0.1.0 - v0.2.0) βœ… βœ… IMAP login & server autodiscovery (DNS SRV, autoconfig/autodiscover) βœ… Fetch & analyze recent emails βœ… Heuristic newsletter detection βœ… Interactive Bubble Tea dashboard βœ… Real unsubscribe link detection (via `List-Unsubscribe` header) βœ… Secure encryption using age (ChaCha20Poly1305) βœ… Config persistence & local encryption βœ… Multiple account management (add, switch, delete) βœ… Mass unsubscribe with multiselect βœ… Automatic mailto: unsubscribe via SMTP βœ… Persistent tracking of unsubscribed newsletters βœ… CLI flags for non-interactive usage βœ… Color-coded counts and visual indicators βœ… Search/filter functionality βœ… Auto-discovery of IMAP servers βœ… GUI launcher (double-click support) βœ… Cross-platform support (macOS, Linux, Windows) βœ… Homebrew package distribution βœ… Winget package (pending Microsoft approval) ### Premium Features (v1.0.0-BETA-1) βœ… **NEW** βœ… **Cloud Sync** - Sync accounts and unsubscribed lists across devices βœ… **Conflict Resolution** - Three-way merge with automatic conflict detection βœ… **Stripe Subscriptions** - Full subscription management (Starter, Pro, Enterprise) βœ… **Analytics Dashboard** - Web-based dashboard with charts and trends βœ… **Advanced Analytics** - Newsletter categorization & quality scoring βœ… **Usage Tracking** - API usage statistics and abuse detection βœ… **Rate Limiting** - Tier-based API rate limits βœ… **HMAC Signing** - Optional request signing for extra security βœ… **Server-Side Security** - All premium features secured server-side βœ… **Account Limit Validation** - Server-side enforced account limits - Starter: 3 accounts, Pro: 10 accounts, Enterprise: 50 accounts - Validates on every sync attempt, cannot be bypassed --- ## πŸ“ˆ Phase 2 – Core Enhancements βœ… COMPLETE ### πŸ”Ή Auto-Unsubscribe Mode βœ… - βœ… Mass unsubscribe with multiselect (`Space` to select, `U` to unsubscribe) - βœ… Handle both HTTP (GET/POST) and `mailto:` unsubscribe links - βœ… Automatic SMTP server detection for mailto links - βœ… Display summary after unsubscribe operations ### πŸ”Ή Multiple Account Management βœ… - βœ… Add, switch, and delete email accounts - βœ… Persistent account selection - βœ… Account management UI screen ### πŸ”Ή Command-Line Flags βœ… - βœ… Support non-interactive usage: ```bash newsletter-cli analyze --days 60 --email foo@example.com --server imap.gmail.com:993 ``` ### πŸ”Ή Persistent Unsubscribe Tracking βœ… - βœ… Save unsubscribed newsletters to `unsubscribed.json` - βœ… Visual indicators for already unsubscribed items - βœ… Persistent across sessions --- ## πŸ’… Phase 3 – UI & UX Polish βœ… MOSTLY COMPLETE ### πŸ”Ή TUI Improvements βœ… - βœ… Search / filter bar (`bubbles/textinput`) - `/` key - βœ… Color-coded counts (green β†’ red scale) - βœ… Keymap help shown in footer - βœ… Header summary (total newsletters & emails) - βœ… Visual indicators for selected and unsubscribed items ### πŸ”Ή Loading & Feedback βœ… - βœ… Spinner animation while fetching (`bubbles/spinner`) - βœ… Status messages during operations - βœ… Error handling and user feedback ### πŸ”Ή Remaining - Keymap help dialog (`?` key) - Confirmation dialog for unsubscribing (currently direct) - Persistent selection memory per sender --- ## πŸ—οΈ Phase 4 – Architecture & Quality 🟑 IN PROGRESS ### πŸ”Ή Secure Storage βœ… - βœ… Replace XOR encryption with [`filippo.io/age`](https://pkg.go.dev/filippo.io/age) - βœ… Store credentials and tokens securely in `$HOME/.config/newsletter-cli/` - βœ… System-specific key derivation (machine-bound encryption) ### πŸ”Ή Logging & Verbosity ⏳ - Integrate `zerolog` or Go `slog` for structured logging - `--debug` and `--silent` flags ### πŸ”Ή Configuration ⏳ - Fully integrate `viper` for env/flag/config overrides - Consistent defaults across OSes - Account naming/labeling support ### πŸ”Ή Local Cache ⏳ - Use BoltDB for sender cache (faster re-runs) - Track unsubscribe status per sender - Cache IMAP server discovery results --- ## 🌍 Phase 5 – Distribution & Release βœ… COMPLETE ### πŸ”Ή Automated Releases βœ… - βœ… [GoReleaser](https://goreleaser.com/) configuration - βœ… GitHub Actions workflow for tagged releases - βœ… Automatic release on tag push ### πŸ”Ή Packaging βœ… - βœ… Build binaries for macOS, Linux, Windows (amd64, arm64) - βœ… Homebrew tap: ```bash brew install loickal/newsletter-cli/newsletter-cli ``` - βœ… Winget package manager (Windows) - **Pending Microsoft approval**: ```bash winget install Loickal.NewsletterCLI # Coming soon ``` - βœ… Docker image: ```bash docker run --rm -it -v ~/.config/newsletter-cli:/config loickal/newsletter-cli analyze ``` - βœ… GUI launcher (double-click support on macOS, Linux, Windows) --- ## βš™οΈ Phase 6 – Testing & CI/CD - Unit tests for header parsing & IMAP logic - Mock IMAP backend (`emersion/go-imap/backend/memory`) - GitHub Action: `go test`, `go vet`, `golangci-lint` - Integration test with fake inbox dataset --- ## 🧠 Phase 7 – Future Premium Features | Feature | Description | Status | |----------|-------------|--------| | πŸ“Š Trend Dashboard | βœ… Visual charts of newsletters/week (web export) | βœ… **Complete** | | ☁️ Cloud Sync | βœ… Sync unsubscribed list across devices | βœ… **Complete** | | πŸ“ˆ Analytics | βœ… Analytics collection and web dashboard | βœ… **Complete** | | 🎯 Advanced Analytics | βœ… Newsletter categorization and quality scoring | βœ… **Complete** | | πŸ”” Notifications | Optional Discord / Telegram alerts for new senders | πŸ”œ Future | | πŸ€– AI Classifier | Use LLM to classify "useful" vs "spammy" newsletters | πŸ”œ Future | | πŸ“… Smart Scheduling | Gradual unsubscribe automation with queue system | πŸ”œ Future | | πŸ”— Webhooks | Integration webhooks for automation | πŸ”œ Future | | πŸ‘₯ Team Workspaces | Multi-user workspaces (Enterprise) | πŸ”œ Future | | πŸ“‹ Compliance Reports | GDPR/CCPA audit logs and reports (Enterprise) | πŸ”œ Future | --- ## 🧩 Milestones | Version | Scope | Status | |----------|--------|--------| | **v0.1.0** | MVP: IMAP connection, newsletter detection, basic TUI | βœ… Complete | | **v0.2.0** | Mass unsubscribe, mailto support, multiple accounts, age encryption | βœ… Complete | | **v0.4.0** | CI/CD with GoReleaser, Homebrew (Winget pending) | βœ… Complete | | **v1.0.0-BETA-1** | Premium features, cloud sync, analytics, subscriptions, account limits | βœ… **Current** | | **v1.0.0** | Stable release with comprehensive testing + docs | πŸ”œ Future | --- ## 🧠 Commit Convention Follow [Conventional Commits](https://www.conventionalcommits.org): | Type | Example | |------|----------| | `feat(ui): add search filter to dashboard` | | `feat(unsubscribe): support --all flag` | | `refactor(imap): move parsing to separate package` | | `fix(config): ensure secure file permissions` | | `chore(release): bump version to v0.2.0` | --- ## ❀️ Contributing 1. Fork the repo 2. Create a feature branch (`feat/unsubscribe-automation`) 3. Follow semantic commits 4. Submit PR β†’ tagged reviewers --- ## 🧭 Summary The long-term vision is to make **Newsletter CLI** the β€œbrew install inbox hygiene” tool: lightweight, cross-platform, and privacy-respecting β€” no web tracking, no cloud sync by default, just pure terminal control. --- **Maintainer:** [@loickal](https://github.com/loickal) **License:** AGPL-3.0 **Current Version:** `v1.0.0-BETA-1`