Storage Backends
Pick where hyprlayer stores plans, research, and handoffs
Hyprlayer supports four storage backends for thoughts. Pick one at init time — every slash command and sub-agent auto-detects the active backend and reads/writes through the right storage.
hyprlayer thoughts init --backend git # default: a separate git repohyprlayer thoughts init --backend obsidian # local Obsidian vault, no synchyprlayer thoughts init --backend notion # Notion database, via your agent tool's connectorhyprlayer thoughts init --backend anytype # Anytype object, via the Anytype MCP serverBackend matrix
Section titled “Backend matrix”| Backend | Storage | Sync | MCP registration | Setup prompts |
|---|---|---|---|---|
git | Separate git repo (default ~/thoughts/) | hyprlayer thoughts sync pushes/pulls | n/a | Location, dirs, user |
obsidian | A subfolder inside your existing vault | No-op (files are already on disk) | n/a | --vault-path, optional --vault-subpath |
notion | Notion database | No-op (agent writes directly via MCP) | Not managed by hyprlayer — uses your agent tool’s Notion connector | --parent-page-id, optional --database-id |
anytype | Objects in an Anytype space | No-op (agent writes directly via MCP) | Hyprlayer registers the MCP server automatically | --space-id, optional --type-id, --api-token-env (default ANYTYPE_API_KEY) |
For notion, install the Notion connector in your agent tool before running init — for Claude Code that’s /mcp → “Notion”. Hyprlayer never registers a self-hosted Notion MCP server or prompts for a NOTION_TOKEN.
For anytype, the Anytype desktop app must be running and ANYTYPE_API_KEY (or your chosen env var) must hold a valid key issued from the app’s Settings → API Keys panel.
Lazy schema bootstrap
Section titled “Lazy schema bootstrap”On notion and anytype, the target database (Notion) or object type (Anytype) is created on the first write-oriented slash command — typically the first /create_plan after init. The command’s dispatch preamble:
- Calls
hyprlayer storage info --jsonto getsettings.databaseId/settings.typeId. - If unset, creates the database/type via MCP using the unified schema.
- Calls
hyprlayer storage set-database-id <id>orhyprlayer storage set-type-id <id>to persist the returned ID. - Every subsequent command reuses the stored ID.
If you delete the database/type out-of-band, the next /create_plan detects the 404 and re-creates it, then persists the new ID. You don’t need a recovery command.
Unified metadata schema
Section titled “Unified metadata schema”Every thought carries the same 10 standardized properties regardless of backend. In git/obsidian they ride as YAML frontmatter; in notion they’re first-class database properties; in anytype they’re object-type properties.
| Field | Type | Required | Notes |
|---|---|---|---|
title | text | yes | Human-readable title |
type | plan | research | handoff | note | yes | Primary category |
date | date (YYYY-MM-DD) | yes | Creation date |
status | draft | active | implemented | superseded | archived | yes | Lifecycle state |
ticket | text | no | Optional external reference, e.g. ENG-1234 |
project | text | yes | Which code repo this relates to (mappedName from storage info) |
scope | user | shared | global | yes | Matches the thoughts directory split |
tags | multi-select | no | Freeform topic labels |
author | text | yes | Thoughts user |
related | relation | no | Cross-references: page/object IDs or file paths |
Run hyprlayer storage info --json from inside a project to see the resolved backend, settings, and the full schema contract the slash commands populate.
Switching backends
Section titled “Switching backends”hyprlayer thoughts init --backend <new> --force switches an already-initialized project. Hyprlayer does not migrate existing content — old artifacts remain in place in the old backend, new artifacts go to the new one. Settings from the previous backend (api_token_env, space_id, vault_path, etc.) are dropped to avoid leaking across.
What lives where
Section titled “What lives where”| Setting | git | obsidian | notion | anytype |
|---|---|---|---|---|
| Content location | Git repo (symlinked into project) | Vault subfolder (symlinked) | Notion database under parent page | Anytype space |
| Agent reads/writes | Filesystem | Filesystem | Notion MCP tools | Anytype MCP tools |
hyprlayer thoughts sync | Pushes/pulls the git repo | No-op | No-op | No-op |
Pre-commit hook blocking thoughts/ commits | Installed | Installed | n/a (no thoughts/ dir) | n/a (no thoughts/ dir) |
| Post-commit auto-sync hook | Installed | Skipped | n/a | n/a |
See also
Section titled “See also”- How Thoughts Work — the filesystem-centric view (applies to
gitandobsidian) - Syncing — what
thoughts syncdoes per backend - Profiles — each profile can select its own backend
- CLI Reference —
hyprlayer storage info,storage set-database-id,storage set-type-id