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 detects the active backend and reads and writes through it.
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 for you | --space-id, optional --type-id, --api-token-env (default ANYTYPE_API_KEY) |
For notion, install the Notion connector in your agent tool before you run init. In Claude Code that’s /mcp → “Notion”. Hyprlayer never registers a self-hosted Notion MCP server or prompts for a NOTION_TOKEN.
For anytype, keep the Anytype desktop app running and put a valid key in ANYTYPE_API_KEY (or the env var you chose). Issue the key from the app’s Settings → API Keys panel.
Lazy schema bootstrap
Section titled “Lazy schema bootstrap”On notion and anytype, the first write-oriented slash command creates the target database (Notion) or object type (Anytype), usually 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 stay in the old backend and new artifacts go to the new one. Hyprlayer drops the previous backend’s settings (api_token_env, space_id, vault_path, and the rest) so none of them leak 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, for
gitandobsidian - Syncing: what
thoughts syncdoes per backend - Profiles: each profile selects its own backend
- CLI Reference:
hyprlayer storage info,storage set-database-id,storage set-type-id