Skip to main content

dayfile

dayfile

dayfile.app: a personal, append-only event log, served as feeds (JSON Feed, Atom, CloudEvents). Free beta: see the demo, then sign in with GitHub and get your own log at <username>.dayfile.cloud. Or self-host it: pip install dayfile, below.

Anything that can send an HTTP request can add events: a script, a webhook, a device, an AI assistant over MCP. The log is the source of truth; feeds are projections of it, addressed by URL queries such as /feed.json?tag=todo&status=open&within=7d. dayfile keeps the log, enforces who may write and read, and serves the feeds and the API. Getting events into the right shape from other systems (email, SMS, cron jobs) is the job of whatever posts them; the repo includes optional adapters for self-hosters.

  • Append-only SQLite log, enforced by triggers. State changes are new events that point back at the original (close it, replace it, retract it); the status of an event is worked out from that chain.
  • Time release (visible_at, expires_at), idempotent ingest, deny-by-default audiences.
  • A JSON API (GET /events, long-poll, live SSE stream) next to the feeds, and an MCP server so assistants such as Claude can read and write the log.
  • Per-credential feeds: read tokens (Bearer header or /t/<token>/ path) and write-only tokens.
  • Heartbeats: say how often a source should report and dayfile writes an open to-do when it goes quiet.
  • A web app (dayfile[web]): sign in with GitHub, a log you can read and post to, tokens, feeds (private or public) and settings. It is what runs at dayfile.app; see below for what runs where.
  • Ed25519 signed events and CloudEvents import/export.
  • Optional adapters for self-hosters, not part of the hosted service: Gmail/Google Voice SMS ingest over IMAP, weather and digest generators, ntfy push.

Design: docs/SPEC.md. Milestones and status: docs/ROADMAP.md. Contributor rules: CLAUDE.md.

How it fits together

architecture

State changes are new events, never edits:

lifecycle

One URL space, a different view per credential:

access control

Quick start

Requires Python 3.11 or newer.

pip install dayfile            # or: uv tool install dayfile  /  pipx install dayfile
export DAYFILE_DB=~/dayfile.db

dayfile add "buy milk" --tag todo --db "$DAYFILE_DB"     # write straight into the local log
dayfile token create --labels self                         # read token: prints the feed URLs once
dayfile token create --labels self --write-source adapter:cli   # write token, for remote clients
uvicorn dayfile.app:app                                    # serve on 127.0.0.1:8000

Open the feed URL that token create printed (http://127.0.0.1:8000/t/<read token>/feed.json, or feed.atom) in a browser or a feed reader. Add events from another machine with DAYFILE_WRITE_TOKEN=<write token> dayfile --url http://127.0.0.1:8000 add "buy milk" --tag todo. For a server that stays up, use Docker or systemd: deploy/selfhost.

Extras: pip install "dayfile[mcp]" for the assistant (MCP) server, "dayfile[web]" for the dayfile.app web app.

Feed URLs

A feed URL answers two questions: which view of the log, and who is asking.

Path Meaning Example
/feed.json, /feed.atom, /feed.cloudevents the default feed: the whole log, filtered by query parameters /feed.json?tag=todo&status=open
/f/<feed>.json, .atom, .cloudevents a named feed: a saved filter (tags, status, time window) with a fixed meaning /f/todo-open.atom
/t/<token>/... the same feeds, with a read token in the path, for feed readers that cannot send headers /t/<token>/f/todo-open.atom
  • .cloudevents serves the same page as a CloudEvents 1.0 JSON batch. POST /events also accepts CloudEvents (application/cloudevents+json or application/cloudevents-batch+json). The mapping is in docs/SPEC.md.
  • Programs should send the token as Authorization: Bearer <token> and leave /t/<token> out; the path form is a compatibility layer.
  • The token decides what you may see (its audience labels), and it can expire or be revoked. Treat a URL that contains one as a secret.
  • A named feed is private unless you make it public. Anyone can read a public feed without a token, but only the events whose audience includes public.
  • Create and manage named feeds and tokens in the web app (Feeds, Tokens) or with the CLI. The full list of endpoints is on the docs page and in docs/SPEC.md.

JSON API

curl -H "Authorization: Bearer $READ_TOKEN" 'http://127.0.0.1:8000/events?tag=todo&status=open'
curl -H "Authorization: Bearer $READ_TOKEN" 'http://127.0.0.1:8000/events?since_seq=42&wait=25'   # long-poll
curl -N -H "Authorization: Bearer $READ_TOKEN" http://127.0.0.1:8000/events/stream               # live, SSE
curl -H "Authorization: Bearer $WRITE_TOKEN" -d @event.json -H 'content-type: application/json' http://127.0.0.1:8000/events

The stream sends only events that arrive after you connect. To catch up on older ones, read /events?since_seq=<n> first (0 starts from the beginning), then follow the stream.

See the JSON API section of docs/SPEC.md.

Commands

Command Purpose
dayfile add append an event: with --db PATH straight into the database (operator mode), otherwise POST to --url using a write token in $DAYFILE_WRITE_TOKEN
dayfile token create|list|revoke manage read and write tokens
dayfile poll-email ingest a Gmail folder (default SMS) using GMAIL_USER / GMAIL_APP_PASSWORD from env or .env
dayfile notify publish urgent events to ntfy ($NTFY_URL) as they become visible
dayfile gen weather|digest generators that write ordinary events back to the log
dayfile key create|list|import signing keys (add --sign)
dayfile mcp MCP server on stdio for AI assistants (pip install dayfile[mcp]); see below
dayfile backup DEST consistent online copy of the database
dayfile tenant ... managed-service operations: create, suspend, limit, usage (see docs/CLOUD.md)

MCP server

Let an assistant such as Claude read and write your log. Both ways use the same five tools (dayfile_list_events, dayfile_get_event, dayfile_add_event, dayfile_close_todo, dayfile_retract_event) and can do only what their tokens allow.

Hosted (dayfile.cloud). One address works for everyone: https://dayfile.cloud/mcp. You sign in with GitHub, so there is no username to type.

  • Claude: open Customize, then Connectors, then Add custom connector, paste the address and press Connect. Sign in with GitHub and choose read and write or read only.
  • Claude Code: claude mcp add --transport http dayfile https://dayfile.cloud/mcp, then run /mcp to sign in.
  • With tokens, no sign-in: send Authorization: Bearer <username>:<read>~<write>: your username, a colon, then a read token and a write token joined with ~ (read only: the read token alone).

Your log's own address, https://<username>.dayfile.cloud/mcp, works the same way, and there the tokens go without the <username>: prefix. Disconnect any time under Tokens.

Local, over stdio. dayfile mcp (pip install "dayfile[mcp]") calls the API at $DAYFILE_URL with a read token in $DAYFILE_READ_TOKEN and a write token in $DAYFILE_WRITE_TOKEN; leave the write token out for a read-only assistant. This is the way to use a self-hosted server without OAuth.

{"mcpServers": {"dayfile": {
  "command": "uvx", "args": ["--from", "dayfile[mcp]", "dayfile", "mcp"],
  "env": {"DAYFILE_URL": "https://myname.dayfile.cloud",
          "DAYFILE_READ_TOKEN": "...", "DAYFILE_WRITE_TOKEN": "..."}}}}

Self-hosting the hosted endpoint: set DAYFILE_MCP=1 (needs dayfile[mcp]) and, to offer the sign-in button, DAYFILE_OAUTH_ISSUER to the address of a dayfile web app that has accounts.

Two ways to run it

Hosted: dayfile.app, nothing to run: your log, feeds, tokens and MCP endpoint at <username>.dayfile.cloud. Self-hosted: your own server with one log in $DAYFILE_DB (deploy/selfhost: docker compose up or systemd). The same code serves both. To run a multi-user service of your own, see docs/CLOUD.md.

The web app (src/dayfile/web, install with pip install "dayfile[web]") is a separate process that talks to the API over HTTP. Accounts, GitHub sign-in, invite codes and the dashboard exist only in the multi-user setup (they create logs through an admin API). A self-hosted server runs the API, CLI and feeds, plus an optional read-only web view of your one log (DAYFILE_SINGLE_LOG=1, started by its compose file; see deploy/selfhost), signed in with a read token. To try it first, run bash deploy/selfhost/try-web-view.sh from a checkout, or curl -fsSL https://raw.githubusercontent.com/dayfile/dayfile/master/deploy/selfhost/try-web-view.sh | bash (Python 3.11 or newer): it installs dayfile into a temporary virtualenv, starts the API and the web view with sample events, prints a sign-in URL, and deletes everything on Ctrl-C. Billing is not built.

Security notes

  • Keep the server on localhost or behind a trusted TLS proxy; tokens in URL paths are a compatibility layer for feed readers.
  • Only token hashes are stored; token values are redacted from logs. .env is gitignored.

Contributing

Want to change dayfile itself? Setup, tests and the rules for changes are in CONTRIBUTING.md.

License

dayfile is free software under the GNU Affero General Public License v3 (AGPL-3.0-only). You may use, modify and self-host it freely. If you run a modified version as a network service, section 13 requires you to offer its users the corresponding source code.

Metadata

Release files for dayfile 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dayfile 0.2.0
File Size Uploaded Provenance Actions
dayfile-0.2.0.tar.gz 513.1 kB Without provenance Details for dayfile-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dayfile 0.2.0
File Interpreter ABI Platform Actions
dayfile-0.2.0-py3-none-any.whl Python 3 none any Details for dayfile-0.2.0-py3-none-any.whl

Total release size: 809.0 kB

Release files / dayfile-0.2.0.tar.gz

Download URL dayfile-0.2.0.tar.gz
Size 513.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d2b655675be5d9bfc68ec213dfda92691afb3ce3ae964fbe70505091e4dfe8ce
BLAKE2b-256 checksum
How to use checksums
76a869021d9439ae405b827a74089a2c6520b76ddf935daa928ff7676d960880
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dayfile-0.2.0-py3-none-any.whl

Download URL dayfile-0.2.0-py3-none-any.whl
Size 295.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cabfb7f2d70b1bd46e62b8cb02018840275e84efe6d4b3ba2e29114dea0359bc
BLAKE2b-256 checksum
How to use checksums
91b9975fbf8ad6e3be33a6b72134d58e76f4503adf780d2e58703a707d786568
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for dayfile 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page