godaily

command module
v0.0.0-...-b6c7e25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2026 License: MIT Imports: 1 Imported by: 0

README

godaily

Daily Go news, straight to your inbox.

Usage · Configuration · GitHub Action

Go Report Card Made with Go Go Reference License Daily Digest ainsley.dev Twitter Handle

godaily

godaily is a CLI that aggregates the day's Go news from a handful of community sources, hands it to Claude for synthesis, and ships the resulting digest to your inbox via Resend. It's designed to run unattended on a schedule — one binary, a few env vars, and a GitHub Actions cron.

Key Features:

  • Multi-source aggregation: Hacker News, Reddit, Lobsters, Dev.to, Medium, GitHub trending, YouTube, golangbridge, godevblog
  • AI synthesis: items summarised and ranked by Anthropic Claude
  • Email delivery: digests rendered and sent through Resend
  • Scheduled by default: weekday mornings at 08:00 London time via GitHub Actions
  • Single static binary: configured entirely through environment variables

Installation

Build from source:

git clone https://github.com/ainsleyclark/godaily.git
cd godaily
make build

Configuration

godaily reads configuration from environment variables. A local .env file in the working directory is loaded automatically.

Variable Purpose
RESEND_TOKEN API token for sending the digest via Resend.
ANTHROPIC_API_KEY API key for Claude, used to synthesise the digest.
YOUTUBE_API_KEY API key for the YouTube Data source.
GITHUB_TOKEN Token used by the GitHub trending source.
EMAIL_SEND_ADDRESS Recipient address for the digest email.

Copy .env.example to .env and fill in the values to get started locally.

Usage

Run the full digest:

godaily run

Useful flags:

  • --dry-run — gather everything but skip sending the email.
  • --output <path> — write the aggregated items to a JSON file.
  • --source <name> — only run the named source(s); repeat for multiple. Defaults to all.

List registered sources:

godaily sources

Fetch a single provider (JSON to stdout):

godaily fetch --provider hackernews

Project Structure

godaily/
├── cmd/
│   └── godaily/         # CLI entry point
├── internal/
│   ├── cron/            # Orchestration of a full digest run
│   ├── news/            # Source registry and shared types
│   ├── source/          # Per-source fetchers (HN, Reddit, GitHub, ...)
│   ├── synth/           # Claude-powered synthesis & ranking
│   └── email/           # Templating and Resend delivery
├── examples/            # Example digest outputs
└── .github/workflows/   # Scheduled GitHub Actions

Development

make build              # Build the godaily binary
make test               # Run unit tests with coverage
make test-race          # Run tests with the race detector
make test-integration   # Hit real source endpoints (tagged: integration)
make lint               # golangci-lint with autofix
make cover              # Open the HTML coverage report
make all                # Format, lint, license, and test

Scheduled Runs

The Daily Digest workflow runs godaily run every weekday at 08:00 London time. Two cron entries (08:00 GMT and 07:00 UTC) cover GMT/BST, and a London-time guard skips the firing that falls outside 08:00 local. The workflow can also be dispatched manually with a --dry-run toggle.

License

Code released under the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
gen-examples command
gen-examples fetches live data from every registered source and writes the results to internal/examples/rendered and internal/examples/raw.
gen-examples fetches live data from every registered source and writes the results to internal/examples/rendered and internal/examples/raw.
pkg
api
Package api provides helpers for writing HTTP JSON responses.
Package api provides helpers for writing HTTP JSON responses.
cmd
db
Package db owns the *sql.DB lifecycle and schema evolution for godaily.
Package db owns the *sql.DB lifecycle and schema evolution for godaily.
env
hook
Package hook provides fire-and-forget HTTP helpers used by serverless handlers.
Package hook provides fire-and-forget HTTP helpers used by serverless handlers.
ingest
Package ingest holds the cross-cutting plumbing shared by every per-provider source: HTTP fetch, response transformation, and snippet enrichment.
Package ingest holds the cross-cutting plumbing shared by every per-provider source: HTTP fetch, response transformation, and snippet enrichment.
mocks/digest
Package mockdigest is a generated GoMock package.
Package mockdigest is a generated GoMock package.
mocks/news
Package mocknews is a generated GoMock package.
Package mocknews is a generated GoMock package.
mocks/subscriber
Package mocksubscriber is a generated GoMock package.
Package mocksubscriber is a generated GoMock package.
subscriber
Package subscriber owns the subscription lifecycle: creating subscribers, sending welcome emails, and processing unsubscribes.
Package subscriber owns the subscription lifecycle: creating subscribers, sending welcome emails, and processing unsubscribes.
synth
Package synth turns a day's scored news into a short suggested social post by calling the Anthropic Messages API.
Package synth turns a day's scored news into a short suggested social post by calling the Anthropic Messages API.
web
views/components
templ: version: v0.3.1001
templ: version: v0.3.1001
views/graphics
templ: version: v0.3.1001
templ: version: v0.3.1001
views/graphics/logos
templ: version: v0.3.1001
templ: version: v0.3.1001
views/layouts
templ: version: v0.3.1001
templ: version: v0.3.1001
views/pages
templ: version: v0.3.1001
templ: version: v0.3.1001

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL