Skip to main content

ZettelControl — CLI utility for managing a Zettelkasten note-taking system

Project description

ZettelControl (ztlctl)

CI PyPI version License: MIT Docs

ZettelControl (ztlctl) is a CLI utility and agentic note-taking ecosystem that combines zettelkasten, second-brain, and knowledge-garden paradigms into a single tool designed for both human users and AI agents.

ztlctl manages your knowledge vault as structured markdown files backed by a SQLite index, connected through a weighted knowledge graph, and accessible via CLI, MCP server, or direct Python API.

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. Close the session when done
ztlctl agent session close --summary "Mapped async patterns, identified refactoring task"

Features

  • 4 content types with enforced lifecycle state machines — notes, references, tasks, and session logs (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)
  • Full-text + semantic search with BM25/vector hybrid ranking and three ranking modes (Command Reference)
  • MCP server with 12 tools, 6 resources, and 4 prompts for AI client integration (MCP Server)
  • Export to markdown, indexes, and graph formats (DOT, JSON) (Tutorial)
  • Plugin system via pluggy event bus with built-in git integration (Development)
  • Structured JSON output on every command for scripting and agent consumption (--json flag)
  • 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 Zettelkasten, second brain, digital garden
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.

  1. Branch from develop: git checkout -b feature/<name> develop
  2. Make changes and commit with conventional messages
  3. Open a PR targeting develop
  4. Releases are automated when develop is merged to main

Community

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ztlctl-1.1.1.tar.gz (372.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ztlctl-1.1.1-py3-none-any.whl (162.8 kB view details)

Uploaded Python 3

File details

Details for the file ztlctl-1.1.1.tar.gz.

File metadata

  • Download URL: ztlctl-1.1.1.tar.gz
  • Upload date:
  • Size: 372.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ztlctl-1.1.1.tar.gz
Algorithm Hash digest
SHA256 8fd3b02b0f658829e80befd945dbaa61ac9449bb1b6ee80ab8549adb3d692859
MD5 0417ab1f9b6cd8e11cfea3cb7c2e5408
BLAKE2b-256 f7b2fb53bbeb8492ace26c0d377b2778f79a5ba6354d99305e7dfa1135200cbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for ztlctl-1.1.1.tar.gz:

Publisher: publish.yml on ThatDevStudio/ztlctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ztlctl-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: ztlctl-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 162.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ztlctl-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ff19022edecea4ebd5d25b5e4ccbc9b69a248798fe2ff14b6032a6daf2aca1f
MD5 01c99c9812f10382bfe66d3e842c51c4
BLAKE2b-256 5284911e78ba2ff0657ef13227f9ab1ad580512cb86b623e0ffe49c99d24c66b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ztlctl-1.1.1-py3-none-any.whl:

Publisher: publish.yml on ThatDevStudio/ztlctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page