ZettelControl — CLI utility for managing a Zettelkasten note-taking system
Project description
ZettelControl (ztlctl)
ZettelControl (ztlctl) is a local knowledge operating system for human users and AI agents. It separates agent-assisted capture and synthesis from human-led enrichment, so research capture, durable notes, and garden work can coexist without sharing the same workflow.
ztlctl manages durable knowledge artifacts as structured markdown files backed by a SQLite index and a weighted knowledge graph. Operational state such as sessions, logs, generated self/ documents, and event dispatch is internal and rebuildable rather than part of the file-first durability contract.
Installation
pip install ztlctl
Or with uv:
uv tool install ztlctl
Optional extras: pip install ztlctl[mcp] (MCP server), pip install ztlctl[semantic] (vector search), pip install ztlctl[community] (advanced graph algorithms).
See the Installation Guide for details.
Quick Start
# 1. Initialize a new vault
ztlctl init my-vault --topics "python,architecture,devops"
# 2. Enter the vault directory
cd my-vault
# 3. Start a research session
ztlctl agent session start "Learning Python async patterns"
# 4. Create notes as you learn
ztlctl create note "Asyncio Event Loop" --tags "lang/python,concept/concurrency"
ztlctl create note "Async vs Threading" --tags "lang/python,concept/concurrency"
# 5. Create references to external sources
ztlctl create reference "Python asyncio docs" --url "https://docs.python.org/3/library/asyncio.html"
# 6. Track tasks that emerge
ztlctl create task "Refactor API to use async" --priority high --impact high
# 7. Let the graph grow — reweave discovers connections
ztlctl reweave --auto-link-related
# 8. Search your knowledge
ztlctl query search "async patterns" --rank-by relevance
# 9. Build a topic packet and draft from it
ztlctl query packet --topic architecture --mode review
ztlctl query draft --topic architecture --target note
# 10. Close the session when done
ztlctl agent session close --summary "Mapped async patterns, identified refactoring task"
Features
- Two explicit working layers: capture/synthesis for agent-assisted research and enrichment for garden work (Knowledge Paradigms)
- File-first durable artifacts for notes, references, and tasks, with rebuildable indexes and operational state (Core Concepts)
- Knowledge graph with 4-signal reweave scoring (BM25, tag overlap, graph proximity, topic match) for automated link discovery (Tutorial)
- Session-based agentic workflows with token-budgeted 5-layer context assembly (Agentic Workflows)
- Digital garden maturity tracking — seed, budding, and evergreen stages (Knowledge Paradigms)
- Text-first ingestion for raw text, markdown files, and provider-backed URL capture (Command Reference)
- Durable source bundles for agent-fetched web and multimodal captures, persisted beside ingested references for later packet/export reuse (Agentic Workflows)
- Full-text + semantic search with BM25/vector hybrid ranking, explainable review/garden modes, and topic packets (Command Reference)
- Conversational enrichment workflows with packet-to-draft note/task/decision generation (Agentic Workflows)
- Dashboard and dossier export for review queues, garden backlog, and topic workbenches (Tutorial)
- MCP server with discovery-first tooling, portable prompts, capture-spec resources, and exported client assets for AI integration (MCP Server)
- Generated Claude and Codex workflow assets via
ztlctl workflow exportfor portable agent setup - Export to markdown, indexes, graph formats, and dashboard artifacts (Tutorial)
- Plugin system via pluggy event bus with built-in git integration (Development)
- Structured JSON output on every command for scripting and agent consumption (
--jsonflag) - Vault integrity checking, auto-fix, full rebuild, and rollback (Troubleshooting)
Documentation
| Guide | Description |
|---|---|
| Installation | Install via pip/uv, optional extras |
| Quick Start | Your first vault in 9 commands |
| Tutorial | Step-by-step vault building guide |
| Core Concepts | Content types, lifecycle, vault structure, graph |
| Command Reference | All CLI commands, options, and filters |
| Configuration | ztlctl.toml settings and environment variables |
| Agentic Workflows | Sessions, context assembly, batch, scripting |
| Knowledge Paradigms | Capture/synthesis and enrichment, mapped to note-taking paradigms |
| MCP Server | Model Context Protocol integration |
| Development | Contributing, architecture, local setup |
| Troubleshooting | Common issues and solutions |
Full documentation is also available at thatdevstudio.github.io/ztlctl.
Architecture
ztlctl follows a strict 6-layer package structure where dependencies flow downward:
src/ztlctl/
├── domain/ # Types, enums, lifecycle rules, ID patterns
├── infrastructure/ # SQLite/SQLAlchemy, NetworkX graph, filesystem
├── config/ # Pydantic config models, TOML discovery
├── services/ # Business logic (create, query, graph, reweave, ...)
├── output/ # Rich/JSON formatters
├── commands/ # Click CLI commands
├── plugins/ # Pluggy hook specs and built-in plugins
├── mcp/ # MCP server adapter
└── templates/ # Jinja2 templates for content creation
See Development for details and DESIGN.md for the complete internal design specification.
Contributing
This project uses conventional commits. See CONTRIBUTING.md for the full guide.
- Branch from
develop:git checkout -b feature/<name> develop - Make changes and commit with conventional messages
- Open a PR targeting
develop - Releases are automated when version-bumping commits (
feat:,fix:) merge todevelop
Community
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ztlctl-1.6.0.tar.gz.
File metadata
- Download URL: ztlctl-1.6.0.tar.gz
- Upload date:
- Size: 452.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72a145758dc57c27cc7ba455003279faf3a064447e8ed8af2b8b64e087ec5261
|
|
| MD5 |
2e132c0d7eab2ecff30dac6051dd8979
|
|
| BLAKE2b-256 |
8371f4206ff7291babaf1c25c3622b51c0a96745f9193ae0e277caf132f21cb8
|
Provenance
The following attestation bundles were made for ztlctl-1.6.0.tar.gz:
Publisher:
publish.yml on ThatDevStudio/ztlctl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ztlctl-1.6.0.tar.gz -
Subject digest:
72a145758dc57c27cc7ba455003279faf3a064447e8ed8af2b8b64e087ec5261 - Sigstore transparency entry: 1006805668
- Sigstore integration time:
-
Permalink:
ThatDevStudio/ztlctl@6251234455f8fc81aae60e04c85aaf543b8c71e2 -
Branch / Tag:
refs/tags/v1.6.0 - Owner: https://github.com/ThatDevStudio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6251234455f8fc81aae60e04c85aaf543b8c71e2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ztlctl-1.6.0-py3-none-any.whl.
File metadata
- Download URL: ztlctl-1.6.0-py3-none-any.whl
- Upload date:
- Size: 222.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5af6b1cfeda156ab5def02467dac68eda5cc0585c3eb94c6ddcbc2ace2a39f23
|
|
| MD5 |
d1aeb70485ad19b737277bb934f4ccd5
|
|
| BLAKE2b-256 |
74cbcbed75baa4cf19b0ce6fa8a4e046350267763c3dc587da858643924f37d3
|
Provenance
The following attestation bundles were made for ztlctl-1.6.0-py3-none-any.whl:
Publisher:
publish.yml on ThatDevStudio/ztlctl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ztlctl-1.6.0-py3-none-any.whl -
Subject digest:
5af6b1cfeda156ab5def02467dac68eda5cc0585c3eb94c6ddcbc2ace2a39f23 - Sigstore transparency entry: 1006805674
- Sigstore integration time:
-
Permalink:
ThatDevStudio/ztlctl@6251234455f8fc81aae60e04c85aaf543b8c71e2 -
Branch / Tag:
refs/tags/v1.6.0 - Owner: https://github.com/ThatDevStudio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6251234455f8fc81aae60e04c85aaf543b8c71e2 -
Trigger Event:
release
-
Statement type: