⭐️ Adding attachments

Add files by drag-and-drop or by clicking the plus (+) sign next to Attached Files in the sidebar, which opens an attachment picker in the navigation pane.

All attachments are stored in .moment/attachments/ at the document root. Files are tracked in git, so commits include the attachment bytes.

What you can attach

Moment currently supports these file types:

.csv — auto-loaded into an in-memory SQLite database as a table named data.

.sqlite — opened directly; query any table inside.

⚠️ Moment does not yet support other file formats (e.g., PDF, JSON) as attachments.

Viewing attachments

You can view attachments to the current document under Attached Files in the side bar.

Querying tables

CSV and SQLite files can be queried programmatically. See ⭐️ Querying tabular data files for more information.

Tips & gotchas

CSV table name is always data. No matter the filename, queries use FROM data.

filePath is just the filename. The runtime resolves it inside .moment/attachments/ automatically — don't include the directory.

Caching vs. one-shot. query() deduplicates and caches; mutation() runs each call independently. For reads, prefer query().

Big CSVs load into memory. Each query rebuilds the in-memory database. Prefer a real .sqlite file once a CSV grows past a few MB.

Version-controlled bytes. Attachments are committed to the repo, so don't drop in anything sensitive or huge that you don't want in git history.