Skip to main content

kd

Knowledge Dispatcher. A command-line and Python tool for accessing and managing information that lives in issue trackers and knowledge bases — designed to be equally natural for humans and large language models.

Today kd speaks YouTrack. On the roadmap: JIRA, GitHub Issues, GitLab, and possibly Obsidian. One tool, one set of verbs, many backends.

What kd does

  • Full issue CRUD from the terminal or a script. Create, update, comment, link, time-log, assign, query — no web UI round-trips, no ad-hoc REST glue.
  • Knowledge-base article workflows. Idempotent push from local markdown, pull as markdown for editing, moves across projects, tag-driven queries. Articles round-trip cleanly through an HTML-comment marker so repeated LLM-driven edits preserve upstream identity instead of creating duplicates.
  • Cross-project visibility via tokens. kd sees exactly what the token's connection permits on the upstream server — nothing more, nothing less. Access control stays upstream where it belongs, not in a parallel local config.
  • Cross-entity search spanning issues and articles in a single query.
  • Structured output (JSON, YAML, table, markdown) because the primary consumer is often another program — an LLM, a shell pipeline, a CI job — not a human eyeballing a terminal.

The primer — and why it exists

The primer (kd /primer) is the centerpiece: a small, workspace-local file of pinned references and curated notes that every kd session can surface on demand.

It exists to solve a problem that has gotten worse as LLMs have become central to real work:

  • Visible memory. Agentic tools accumulate hidden "memories" in opaque per-LLM buckets you cannot easily read, edit, or audit. The primer is a plain file you can open, version, and review. If an LLM appears to "remember" something load-bearing, you can see exactly where that came from.
  • LLM-portable. One primer works for any model. Switch from Claude to GPT to the next generation — the primer travels with the project, not with a vendor.
  • Shared by humans and LLMs. A developer jotting "on this project the sprint field is called Board" in the primer is building the same artifact an LLM would build, in the same place, readable by both. No separate convention to maintain.
  • A routing layer, not a copy. The primer can pin real knowledge-base articles (kd /primer/article add FB-A-42). It never duplicates their content — it points at them. The rest of kd extends this shape: pull what the current task needs from live systems, reason, push updates back. Nothing gets mirrored into a parallel store.

What kd is not

  • Not a migration platform. Cross-system moves are deliberate lossy cherry-picks — a stub on the target side with a backref to the source, not a faithful reproduction.
  • Not a data warehouse. Data lives in the upstream tracker; kd sits on top.
  • Not a faithful replica. kd reads what a task needs and writes what actually changed. It never claims to be a complete mirror.

If you need a migration tool or a comprehensive import/export platform, kd is the wrong tool.

Install

# pipx (recommended)
pipx install kd-cli

# or uv
uv tool install kd-cli

The PyPI distribution name is kd-cli (two-letter kd is reserved by PyPI policy). The installed command, the import name, and the CLI entry point are all kd.

Release notes for the installed version: kd /release-notes. Every release is listed in the changelog.

Configure

# Global config with your YouTrack URL (recommended on first install).
kd init --global https://your-instance.youtrack.cloud

# The scaffolded connection reads its token from KD_TOKEN (its token_env).
export KD_TOKEN=perm:your-token-here

# Check the connection.
kd /system info

Create the token in YouTrack under Profile → Account Security → New token. In PowerShell, set it with $env:KD_TOKEN = "perm:your-token-here", or setx KD_TOKEN perm:your-token-here to keep it, then open a new terminal. token_cmd: in the connection reads the token from a command, such as a secrets manager, instead.

Global config lives at ~/.config/kd/config.yaml (Windows: C:\Users\<you>\.config\kd\config.yaml); kd init <url> without --global writes .kd/config.yaml in the current directory. KD_CONNECTION picks the connection by name.

Usage

CLI

# Projects
kd /project list
kd /project show FB

# Issues
kd /issue list --project FB --query "#Unresolved"
kd /issue create "Fix router configuration" -p FB --type Task
kd /issue show FB-1

# Time tracking
kd /time log FB-1 45 --type Development --description "Router reconfiguration"

# Articles
kd /article list --project FB
kd /article push guide.md --project FB --title "Setup Guide" --tag "type:guide"
kd /article pull FB-A-42 > setup.md

# Tags
kd /tag list
kd /tag articles type:case --project FB

# Saved queries
kd /query list
kd /query issues "Sprint 47" --project FB

# Primer (workspace knowledge, LLM context)
kd /primer/note add "Sprint field is called 'Board'"
kd /primer/article add FB-A-42 --summary "Architecture Overview"
kd /primer show

# Cross-entity search
kd /search "router" --types issue,article --project FB

# Output formats
kd /project list --output json | jq '.[].key'
kd /issue list --output yaml

Python SDK

The CLI is a thin wrapper over a Python library. Same capabilities, programmatic interface:

from kd import YouTrackClient

client = YouTrackClient(
    url="https://your-instance.youtrack.cloud",
    token="your_token",
)

projects = client.projects.list()
issue = client.issues.create(project="FB", summary="Fix router config")
client.time.log(issue_id="FB-1", minutes=45, work_type="Development")
articles = client.tags.articles(["type:case"], project="FB")
results = client.search.search("router", types=["issue", "article"])

Development

pytest tests/ -v --tb=short

ruff format kd/ tests/
ruff check --fix kd/ tests/
uv run mypy

Updated: 2026-11-01

Metadata

Release files for kd-cli 2.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kd-cli 2.11.0
File Size Uploaded Provenance Actions
kd_cli-2.11.0.tar.gz 274.0 kB With provenance Details for kd_cli-2.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kd-cli 2.11.0
File Interpreter ABI Platform Actions
kd_cli-2.11.0-py3-none-any.whl Python 3 none any Details for kd_cli-2.11.0-py3-none-any.whl

Total release size: 576.8 kB

Release files / kd_cli-2.11.0.tar.gz

Download URL kd_cli-2.11.0.tar.gz
Size 274.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f900fb2d7c018c7a41190a21eda9d4d57092cf918dcb30edd3e5e72b360d4691
BLAKE2b-256 checksum
How to use checksums
a0f19eaa105de54794d79a536b9ded92dbb2a345f476b78afa868493d8607b68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / kd_cli-2.11.0-py3-none-any.whl

Download URL kd_cli-2.11.0-py3-none-any.whl
Size 302.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
edf31d35e4adfa40c008ed9f28a2e9f45b07db3090b94bddfd79c779c830878a
BLAKE2b-256 checksum
How to use checksums
db9673cdbd8a40323e4e3f34162033fab3484b4df70b79c71663924165545f28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for kd-cli 2.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kd_cli-2.11.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.11.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page