π English | ηΉι«δΈζ
A local-first CLI knowledge management tool inspired by Anytype and Capacities.
Your knowledge base is made of Objects β not files. Markdown is just the storage format.
Most note-taking tools make you think like a computer: files, folders, hierarchies.
TypeMD lets you think in Objects β books, people, ideas, meetings β connected by Relations. The structure emerges from your knowledge, not from a folder tree.
- Typed Objects β define schemas for each type (Book, Person, Idea, etc.)
- Structured Relations β connect objects with named, optionally bidirectional links
- Wiki-links & Backlinks β link objects inline with
[[type/name-ulid]]syntax, with automatic backlink tracking - Full-text search β find anything across your vault
- Structured queries β filter objects by type, property, or relation
- TUI β Three-panel interface powered by Bubble Tea, with inline property editing and auto-refresh on file changes
- Web UI β Browser-based interface via
tmd serve, with three-panel layout, property editing, and object creation - AI Assist β generate descriptions, suggest tags, and explore schemas with Claude AI in the TUI
- MCP Server β integrate with AI assistants via Model Context Protocol
- Local-first β everything lives on your machine as plain Markdown files
vault/
βββ .typemd/
β βββ index.db # SQLite index (auto-updated)
β βββ tui-state.yaml # TUI session state (auto-saved)
βββ types/ # user-defined type schemas (directory format)
β βββ book/
β β βββ schema.yaml # you create these
β βββ person/
β βββ schema.yaml
βββ properties/
β βββ <name>.yaml # shared property definitions (optional, one per property)
β βββ ...
βββ templates/ # object templates by type (optional)
β βββ book/
β βββ review.md # template with default frontmatter + body
βββ objects/
βββ book/
β βββ golang-in-action-01jqr3k5mpbvn8e0f2g7h9txyz.md
βββ person/
βββ alan-donovan-01jqr3k8yznw2a4dbx6t7c9fpq.md
Objects are stored as Markdown files with YAML frontmatter. Each directory under objects/ is a type namespace β different types can share the same slug.
The full Object ID is type/<slug>-<ulid>, e.g. book/golang-in-action-01jqr3k5mpbvn8e0f2g7h9txyz. A ULID is automatically appended to every new object to guarantee uniqueness.
brew install typemd/tap/typemd-cliOr from source:
go install github.com/typemd/typemd/cmd/tmd@latestPre-built binaries are also available on GitHub Releases.
# Initialize a new vault
tmd init
# Open TUI
tmd
# Create objects (names are auto-slugified, ULID appended)
tmd object create book "Clean Code"
tmd object create "Some Thought" # uses default type from config
# Search and explore
tmd search "concurrency"
tmd object show book/clean-code # prefix matching, no full ULID needed
tmd object list
# Connect objects (name references in frontmatter auto-expand on sync)
tmd relation link book/golang-in-action author person/alan-donovan
# Manage templates
tmd template list # list all templates
tmd template show book/review # view template content
tmd template create book/review # create and open in $EDITOR
tmd template delete book/review # delete with confirmation
# Maintenance
tmd format # normalize frontmatter & schema formatting
tmd doctor # vault health check
tmd stats # vault-wide statistics
# Web UI
tmd serve # starts web UI at http://localhost:3000
tmd serve -p 8080 # custom port
# MCP server for AI integration
tmd mcpSee tmd --help and docs for the full command reference.
ββ Objects ββββββββββ ββ Body ββββββββββββββ ββ Properties βββββββ
β βΌ book (2) β β # Notes β β title: Go in β
β golang-in-actionβ β A great book about β β Action β
β clean-code β β Go... β β status: reading β
β βΆ person (1) β β β β author: β
β βΆ note (3) β β β β β person/alan β
β β β β β β
β β β β β β
β β β β β β
βββββββββββββββββββββ ββββββββββββββββββββββ βββββββββββββββββββββ
Press ? in the TUI for the full keybinding reference.
Define your types in types/ (tag and page are built-in β all others are user-defined):
# types/book/schema.yaml
name: book
plural: books
emoji: π
properties:
- name: title
type: string
- name: author
type: relation
target: person
bidirectional: true
inverse: books
- name: status
type: select
options:
- value: to-read
- value: reading
- value: done
default: to-read
- name: rating
type: numberRelations are defined as type: relation properties. Use bidirectional and inverse to auto-sync both sides. See docs for full schema reference.
Run tmd mcp to start a Model Context Protocol server over stdio. AI clients (e.g. Claude Code) can read and write your vault through these tools:
| Tool | Description |
|---|---|
search |
Full-text search objects, returns ID, type, and filename |
get_object |
Get full object detail by ID, including properties and body |
list_types |
List all available type schemas with metadata |
vault_overview |
One-call vault summary: per-type count, emoji, description, and recent objects |
list_objects |
List object summaries with optional type filter and pagination |
query_objects |
Structured query with filters, optional sort, and pagination |
list_backlinks |
Return wiki-link and typed-relation backlinks for an object |
vault_stats |
Per-property distribution stats for a single type (filled, fill rate) |
create_object |
Create a new object with type, name, optional template, properties, and body |
update_object |
Update an object's properties (merge) and/or body (replace) |
link_objects |
Create a relation between two objects |
unlink_objects |
Remove a relation between two objects |
TypeMD is a monorepo with a shared Go core and multiple interfaces:
typemd/
βββ core/ # Core library β objects, types, relations, index
βββ cmd/ # CLI commands (Cobra)
βββ tui/ # Terminal UI (Bubble Tea)
βββ mcp/ # MCP server for AI integration
βββ web/ # Web UI β Go HTTP server + React frontend
βββ site/ # Official website (Astro) β typemd.io
βββ docs/ # Documentation (Starlight) β docs.typemd.io
βββ app/ # Desktop app (planned)
All interfaces share the same core library.
- Language: Go
- TUI: Bubble Tea + Lip Gloss
- Web UI: React + Tailwind CSS + Vite (embedded in Go binary)
- MCP: mcp-go β Model Context Protocol server
- Index: SQLite with FTS5 full-text search
- Storage: Markdown + YAML frontmatter
- Anytype β encrypted, local-first alternative to cloud apps
- Capacities β object-based knowledge studio