Adam Coddington203 downloadsAdd periodic note endpoints for daily, weekly, monthly, quarterly, and yearly notes to the Local REST API, with an MCP tool for resolving the current note's path.
Adds periodic-note support to Obsidian Local REST API using functionality provided by @liamcaine's Periodic Notes plugin.
Once both this plugin and Local REST API are enabled:
/periodic/{period}/ and
/periodic/{period}/{year}/{month}/{day}/ for GET, PUT, POST, PATCH,
and DELETE, where {period} is one of daily, weekly, monthly,
quarterly, or yearly. Read, create, append to, patch, or delete the
current (or a dated) periodic note. A trailing path segment targets a heading
or block within the note, exactly as it does under /vault/.periodic_note_get_path tool that returns the vault-relative path
of the current periodic note for a period, creating it if necessary.This plugin delegates all folder/format/template/creation logic to the core
Daily Notes and community Periodic Notes plugins via
obsidian-daily-notes-interface — the same model Local REST API used
before its (since-removed) native implementation. Configure your periodic notes
in those plugins; this plugin reads their configuration. A period that is not
enabled in those plugins returns 400.
The REST routes resolve the target periodic note and then redirect (307) to
the host's existing /vault/{path} endpoint, so content negotiation and write
semantics stay identical to /vault/ and no host-private methods are
reproduced here. See the design note in src/routes.ts for the
trade-off this makes.
npm install
npm run dev # watch build
npm run build # production build
npm run typecheck # tsc --noEmit
npm run lint # eslint, including the obsidianmd plugin rules
npm test # jest
Releases are cut by tagging: npm version <x.y.z> updates manifest.json and
versions.json (via version-bump.mjs) and creates a bare tag, and pushing
that tag runs .github/workflows/release.yml, which type-checks, tests, builds,
attests, and publishes main.js and manifest.json to a GitHub release.