Skip to content

Repository files navigation

Morning Agent icon

Morning Agent

Your morning assistant, living in the macOS menu bar. Every morning it emails you a briefing — things to do, a piece of good news and a short private newsletter — generated by AI from your own notes and feeds.

macOS Python Homebrew License: MIT

🌐 Project site · 💻 GitHub


The ☀︎ icon sits in the menu bar next to the clock. Clicking it opens the menu:

☀︎ Morning Agent
  Auto-deliver ON · screen · last: 2026-09-21
  🗒  Today note
  ▶︎  Deliver now
  👀  Preview (screen only)
  ⚙︎  Settings ▸
  Auto-deliver: ON  (07:00)
  Open config file
  ℹ︎  About Morning Agent

At a set time the app reads your notes folder, asks your chosen model (via OpenRouter) to compose a concise briefing, and emails it to you (via Resend). No app to open — the mail is simply waiting in your inbox in the morning.

✨ Features

  • 🖥️ Lives in the menu bar — a lightweight icon, no windows or Dock (native via rumps).
  • 🧠 Any model via OpenRouter — Claude, GPT, Llama… you just type the model slug.
  • 📂 Content from your notes — reads .md/.txt files from a folder you pick (Obsidian, Bear, any folder).
  • 📰 Blogs & newsletters via RSS — add feed URLs and the app pulls the latest items into the mail.
  • ✍️ Your own morning prompt — you define the instruction the model gets each morning, right from the menu.
  • 📨 Email or on screen — get the brief by email (Resend) and/or shown in a window on your Mac.
  • ⏰ Every day at a set time — automatically, at most once per day.
  • 👀 Preview without sending — see the mail in your browser before it goes out.
  • 🔒 Keys stay local — in ~/.config/morning-agent/, never in the repo.

🚀 Installation

Homebrew (recommended)

brew install rafalgawlik/tap/morning-agent

Run it (the ☀︎ icon appears):

morning-agent

Auto-start at login + run in the background:

brew services start morning-agent
Alternatively: run from source (for developers)
git clone https://github.com/rafalgawlik/morning-agent
cd morning-agent
./run.sh          # creates .venv, installs dependencies and launches

⚙️ Configuration

Click the ☀︎ → ⚙️ Settings icon and fill in:

Setting Description
Resend API key key from resend.com (re_…)
Sender address an address on a domain verified in Resend (e.g. brief@your-domain.com)
Recipient address where the briefing should arrive
OpenRouter API key key from openrouter.ai (sk-or-…)
Model an OpenRouter slug, e.g. anthropic/claude-3.5-sonnet, openai/gpt-4o-mini
Note files the exact .md/.txt files fed into the prompt (pick them with Add files…)
Notes folder optional: a whole folder scanned recursively (newest files first)
RSS feeds RSS/Atom feed URLs (one per line) — recent items are added as Latest reads
Feed max age only include feed items from the last N days (0 = no limit)
Morning prompt the instruction the model gets each morning — you decide what goes in the mail
Deliver as Email, Screen (a notification → click opens the brief window), or Both
Send time HH:MM, e.g. 07:00
Email subject subject prefix

Settings are saved in ~/.config/morning-agent/config.json. The morning prompt is edited conveniently from the menu (Settings → Morning prompt) — it drives what the model puts in the mail and how. Leaving the field empty restores the default instruction. You can also open the whole file by hand (menu → Open config file).

Note

The sender address must belong to a domain verified in Resend — otherwise delivery is rejected.

Tip

Auto-send only works while the app is running. Use brew services start morning-agent to keep it running in the background, set-and-forget.

From the menu bar icon

  • 🗒 Today note — opens today's brief in a window right away (builds it if needed).
  • ▶︎ Deliver now — runs delivery in your chosen mode (email / notification).
  • 👀 Preview (screen only) — opens the brief in a window without emailing.

A ready-to-use set of RSS feeds is in examples/feeds.txt.

🧠 How it works

  menu bar (rumps)
        │  at time X
        ▼
  reads notes + RSS feeds  ──►  OpenRouter (your model)  ──►  Resend  ──►  📬 inbox
   (.md/.txt + latest posts)       composes the briefing        sends HTML

The app scans the notes folder recursively, takes .md, .markdown, .txt, .mdx files (most recently modified first, with size limits), skips .git, .obsidian, node_modules, etc., and fetches the latest items from any RSS/Atom feeds you added. All of it goes to the model as context; the model pulls tasks out of it and composes the mail per your prompt.

Default mail structure: greeting with the date → ✅ Today (things to do) → 💡 Good news / motivation → 📰 Latest reads (from your feeds) → one line to set up a good day.

🗂️ Project structure

morning_agent/
  app.py        — menu bar app (rumps) + schedule
  config.py     — config.json / state.json
  notes.py      — reads the notes folder
  feeds.py      — fetches & parses RSS/Atom feeds (stdlib only)
  llm.py        — OpenRouter client
  mailer.py     — sending via Resend
  composer.py   — notes → model → ready email HTML
  assets/sun.png — menu bar template icon
pyproject.toml                 — pip package (the `morning-agent` command)
run.sh                         — run from source
packaging/
  make_icon.py                 — regenerates the menu bar icon (dev-only, needs Pillow)
  homebrew/morning-agent.rb    — Homebrew formula (goes into the tap)
  homebrew/release-sha.sh      — computes the release tarball sha256

📦 Publishing via Homebrew (for the maintainer)

Expand the steps to cut a new release

1. Code on GitHub

git push -u origin main

2. Release (the tag drives the URL in the formula)

git tag v1.0.0 && git push origin v1.0.0
gh release create v1.0.0 --generate-notes   # or via the GitHub UI

3. Write the tarball sha256 into the formula

./packaging/homebrew/release-sha.sh 1.0.0

4. Tap repo — create a separate repo named exactly homebrew-tap and put the formula under Formula/morning-agent.rb:

mkdir -p Formula
cp /path/to/morning-agent/packaging/homebrew/morning-agent.rb Formula/
git add Formula/morning-agent.rb && git commit -m "morning-agent 1.0.0" && git push

5. Done — anyone can now install:

brew install rafalgawlik/tap/morning-agent

New version: bump version in pyproject.toml, url in the formula, cut a new tag/release, run release-sha.sh <version> and push the formula.

🛣️ Roadmap

  • A real .app (py2app) + a Homebrew cask with an icon
  • Sections: today's calendar, weather, reminders
  • Choose days of the week (e.g. weekdays only)
  • Model fallback and retry on network errors
  • Native macOS notifications

📄 License & author

MIT © 2026 Rafał Gawlik — rafalgawlik.com · @rafalgawlik

Built with Python · rumps · OpenRouter · Resend

Releases

Packages

Contributors

Languages