kd-cli 2.0.4__tar.gz → 2.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kd_cli-2.0.5/PKG-INFO +166 -0
- kd_cli-2.0.5/README.md +132 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/core/namespaces.py +1 -1
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/main.py +2 -2
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/__init__.py +1 -1
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/client.py +2 -2
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/resources/command-synonyms.yaml +1 -1
- kd_cli-2.0.5/kd_cli.egg-info/PKG-INFO +166 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/pyproject.toml +1 -1
- kd_cli-2.0.4/PKG-INFO +0 -149
- kd_cli-2.0.4/README.md +0 -115
- kd_cli-2.0.4/kd_cli.egg-info/PKG-INFO +0 -149
- {kd_cli-2.0.4 → kd_cli-2.0.5}/LICENSE +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/MANIFEST.in +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/api/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/api/articles.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/api/http.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/api/hub.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/api/saved_queries.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/api/tags.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/api/youtrack.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/article_marker.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/auth.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/core/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/core/command_base.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/core/command_parser.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/core/option_registry.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/input.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/alias/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/article/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/init.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/issue/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/primer/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/project/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/query/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/search/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/system/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/tag/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/time/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/namespaces/user/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/output.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/cli/tree.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/config.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/connection.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/debug.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/exceptions.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/history.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/article.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/assist.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/attachment.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/comment.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/common.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/issue.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/project.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/saved_query.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/search.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/tag.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/user.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/models/work_item.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/primer.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/query_parser.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/resources/__init__.py +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/resources/config-template.yaml +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd/resources/error-messages.yaml +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd_cli.egg-info/SOURCES.txt +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd_cli.egg-info/dependency_links.txt +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd_cli.egg-info/entry_points.txt +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd_cli.egg-info/requires.txt +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/kd_cli.egg-info/top_level.txt +0 -0
- {kd_cli-2.0.4 → kd_cli-2.0.5}/setup.cfg +0 -0
kd_cli-2.0.5/PKG-INFO
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kd-cli
|
|
3
|
+
Version: 2.0.5
|
|
4
|
+
Summary: Knowledge dispatcher for live knowledge systems
|
|
5
|
+
Author: Sergiy Gladkyy
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: youtrack,cli,sdk,knowledge-management,knowledge-network
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Operating System :: POSIX
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
+
Classifier: Topic :: Utilities
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: httpx>=0.27
|
|
22
|
+
Requires-Dist: pydantic>=2.0
|
|
23
|
+
Requires-Dist: pyyaml>=6.0
|
|
24
|
+
Requires-Dist: tabulate>=0.9
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-httpx>=0.30; extra == "dev"
|
|
28
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
29
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
30
|
+
Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
31
|
+
Requires-Dist: types-PyYAML; extra == "dev"
|
|
32
|
+
Requires-Dist: types-tabulate; extra == "dev"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# kd
|
|
36
|
+
|
|
37
|
+
**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.
|
|
38
|
+
|
|
39
|
+
Today kd speaks **YouTrack**. On the roadmap: **JIRA**, **GitHub Issues**, **GitLab**, and possibly **Obsidian**. One tool, one set of verbs, many backends.
|
|
40
|
+
|
|
41
|
+
## What kd does
|
|
42
|
+
|
|
43
|
+
- **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.
|
|
44
|
+
- **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.
|
|
45
|
+
- **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.
|
|
46
|
+
- **Cross-entity search** spanning issues and articles in a single query.
|
|
47
|
+
- **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.
|
|
48
|
+
|
|
49
|
+
## The primer — and why it exists
|
|
50
|
+
|
|
51
|
+
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.
|
|
52
|
+
|
|
53
|
+
It exists to solve a problem that has gotten worse as LLMs have become central to real work:
|
|
54
|
+
|
|
55
|
+
- **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.
|
|
56
|
+
- **LLM-portable.** One primer works for any model. Switch from Claude to GPT-5 to the next generation — the primer travels with the project, not with a vendor.
|
|
57
|
+
- **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.
|
|
58
|
+
- **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.
|
|
59
|
+
|
|
60
|
+
## What kd is not
|
|
61
|
+
|
|
62
|
+
- **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.
|
|
63
|
+
- **Not a data warehouse.** Data lives in the upstream tracker; kd sits on top.
|
|
64
|
+
- **Not a faithful replica.** kd reads what a task needs and writes what actually changed. It never claims to be a complete mirror.
|
|
65
|
+
|
|
66
|
+
If you need a migration tool or a comprehensive import/export platform, kd is the wrong tool.
|
|
67
|
+
|
|
68
|
+
## Install
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# pipx (recommended)
|
|
72
|
+
pipx install kd-cli
|
|
73
|
+
|
|
74
|
+
# or uv
|
|
75
|
+
uv tool install kd-cli
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
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`.
|
|
79
|
+
|
|
80
|
+
## Configure
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Scaffold a project-local config in the current directory.
|
|
84
|
+
kd init
|
|
85
|
+
|
|
86
|
+
# Or set via environment (overrides workspace + global config).
|
|
87
|
+
export KD_TOKEN=your_token
|
|
88
|
+
export KD_CONNECTION=main
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Global config lives at `~/.config/kd/config.yaml`; workspace config lives at `.kd/config.yaml`.
|
|
92
|
+
|
|
93
|
+
## Usage
|
|
94
|
+
|
|
95
|
+
### CLI
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Projects
|
|
99
|
+
kd /project list
|
|
100
|
+
kd /project show FB
|
|
101
|
+
|
|
102
|
+
# Issues
|
|
103
|
+
kd /issue list --project FB --query "#Unresolved"
|
|
104
|
+
kd /issue create "Fix router configuration" -p FB --type Task
|
|
105
|
+
kd /issue show FB-1
|
|
106
|
+
|
|
107
|
+
# Time tracking
|
|
108
|
+
kd /time log FB-1 45 --type Development --description "Router reconfiguration"
|
|
109
|
+
|
|
110
|
+
# Articles
|
|
111
|
+
kd /article list --project CMCSA
|
|
112
|
+
kd /article push guide.md --project CMCSA --title "Setup Guide" --tag "type:guide"
|
|
113
|
+
kd /article pull FB-A-42 > setup.md
|
|
114
|
+
|
|
115
|
+
# Tags
|
|
116
|
+
kd /tag list
|
|
117
|
+
kd /tag articles type:case --project CMCSA
|
|
118
|
+
|
|
119
|
+
# Saved queries
|
|
120
|
+
kd /query list
|
|
121
|
+
kd /query issues "Sprint 47" --project FB
|
|
122
|
+
|
|
123
|
+
# Primer (workspace knowledge, LLM context)
|
|
124
|
+
kd /primer/note add "Sprint field is called 'Board'"
|
|
125
|
+
kd /primer/article add FB-A-42 --summary "Architecture Overview"
|
|
126
|
+
kd /primer show
|
|
127
|
+
|
|
128
|
+
# Cross-entity search
|
|
129
|
+
kd /search "router" --types issue,article --project FB
|
|
130
|
+
|
|
131
|
+
# Output formats
|
|
132
|
+
kd /project list --output json | jq '.[].key'
|
|
133
|
+
kd /issue list --output yaml
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Python SDK
|
|
137
|
+
|
|
138
|
+
The CLI is a thin wrapper over a Python library. Same capabilities, programmatic interface:
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
from kd import YouTrackClient
|
|
142
|
+
|
|
143
|
+
client = YouTrackClient(
|
|
144
|
+
url="https://your-instance.youtrack.cloud",
|
|
145
|
+
token="your_token",
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
projects = client.projects.list()
|
|
149
|
+
issue = client.issues.create(project="FB", summary="Fix router config")
|
|
150
|
+
client.time.log(issue_id="FB-1", minutes=45, work_type="Development")
|
|
151
|
+
articles = client.tags.articles(["type:case"], project="CMCSA")
|
|
152
|
+
results = client.search.search("router", types=["issue", "article"])
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Development
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
pytest tests/ -v --tb=short
|
|
159
|
+
|
|
160
|
+
ruff format kd/ tests/
|
|
161
|
+
ruff check --fix kd/ tests/
|
|
162
|
+
mypy kd/
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
Updated: 2026-04-14
|
kd_cli-2.0.5/README.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# kd
|
|
2
|
+
|
|
3
|
+
**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.
|
|
4
|
+
|
|
5
|
+
Today kd speaks **YouTrack**. On the roadmap: **JIRA**, **GitHub Issues**, **GitLab**, and possibly **Obsidian**. One tool, one set of verbs, many backends.
|
|
6
|
+
|
|
7
|
+
## What kd does
|
|
8
|
+
|
|
9
|
+
- **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.
|
|
10
|
+
- **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.
|
|
11
|
+
- **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.
|
|
12
|
+
- **Cross-entity search** spanning issues and articles in a single query.
|
|
13
|
+
- **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.
|
|
14
|
+
|
|
15
|
+
## The primer — and why it exists
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
It exists to solve a problem that has gotten worse as LLMs have become central to real work:
|
|
20
|
+
|
|
21
|
+
- **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.
|
|
22
|
+
- **LLM-portable.** One primer works for any model. Switch from Claude to GPT-5 to the next generation — the primer travels with the project, not with a vendor.
|
|
23
|
+
- **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.
|
|
24
|
+
- **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.
|
|
25
|
+
|
|
26
|
+
## What kd is not
|
|
27
|
+
|
|
28
|
+
- **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.
|
|
29
|
+
- **Not a data warehouse.** Data lives in the upstream tracker; kd sits on top.
|
|
30
|
+
- **Not a faithful replica.** kd reads what a task needs and writes what actually changed. It never claims to be a complete mirror.
|
|
31
|
+
|
|
32
|
+
If you need a migration tool or a comprehensive import/export platform, kd is the wrong tool.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# pipx (recommended)
|
|
38
|
+
pipx install kd-cli
|
|
39
|
+
|
|
40
|
+
# or uv
|
|
41
|
+
uv tool install kd-cli
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
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`.
|
|
45
|
+
|
|
46
|
+
## Configure
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Scaffold a project-local config in the current directory.
|
|
50
|
+
kd init
|
|
51
|
+
|
|
52
|
+
# Or set via environment (overrides workspace + global config).
|
|
53
|
+
export KD_TOKEN=your_token
|
|
54
|
+
export KD_CONNECTION=main
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Global config lives at `~/.config/kd/config.yaml`; workspace config lives at `.kd/config.yaml`.
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
### CLI
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Projects
|
|
65
|
+
kd /project list
|
|
66
|
+
kd /project show FB
|
|
67
|
+
|
|
68
|
+
# Issues
|
|
69
|
+
kd /issue list --project FB --query "#Unresolved"
|
|
70
|
+
kd /issue create "Fix router configuration" -p FB --type Task
|
|
71
|
+
kd /issue show FB-1
|
|
72
|
+
|
|
73
|
+
# Time tracking
|
|
74
|
+
kd /time log FB-1 45 --type Development --description "Router reconfiguration"
|
|
75
|
+
|
|
76
|
+
# Articles
|
|
77
|
+
kd /article list --project CMCSA
|
|
78
|
+
kd /article push guide.md --project CMCSA --title "Setup Guide" --tag "type:guide"
|
|
79
|
+
kd /article pull FB-A-42 > setup.md
|
|
80
|
+
|
|
81
|
+
# Tags
|
|
82
|
+
kd /tag list
|
|
83
|
+
kd /tag articles type:case --project CMCSA
|
|
84
|
+
|
|
85
|
+
# Saved queries
|
|
86
|
+
kd /query list
|
|
87
|
+
kd /query issues "Sprint 47" --project FB
|
|
88
|
+
|
|
89
|
+
# Primer (workspace knowledge, LLM context)
|
|
90
|
+
kd /primer/note add "Sprint field is called 'Board'"
|
|
91
|
+
kd /primer/article add FB-A-42 --summary "Architecture Overview"
|
|
92
|
+
kd /primer show
|
|
93
|
+
|
|
94
|
+
# Cross-entity search
|
|
95
|
+
kd /search "router" --types issue,article --project FB
|
|
96
|
+
|
|
97
|
+
# Output formats
|
|
98
|
+
kd /project list --output json | jq '.[].key'
|
|
99
|
+
kd /issue list --output yaml
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Python SDK
|
|
103
|
+
|
|
104
|
+
The CLI is a thin wrapper over a Python library. Same capabilities, programmatic interface:
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
from kd import YouTrackClient
|
|
108
|
+
|
|
109
|
+
client = YouTrackClient(
|
|
110
|
+
url="https://your-instance.youtrack.cloud",
|
|
111
|
+
token="your_token",
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
projects = client.projects.list()
|
|
115
|
+
issue = client.issues.create(project="FB", summary="Fix router config")
|
|
116
|
+
client.time.log(issue_id="FB-1", minutes=45, work_type="Development")
|
|
117
|
+
articles = client.tags.articles(["type:case"], project="CMCSA")
|
|
118
|
+
results = client.search.search("router", types=["issue", "article"])
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Development
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
pytest tests/ -v --tb=short
|
|
125
|
+
|
|
126
|
+
ruff format kd/ tests/
|
|
127
|
+
ruff check --fix kd/ tests/
|
|
128
|
+
mypy kd/
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
Updated: 2026-04-14
|
|
@@ -66,7 +66,7 @@ class NamespaceRegistry:
|
|
|
66
66
|
"""Root of the namespace tree. Resolves token sequences to commands."""
|
|
67
67
|
|
|
68
68
|
def __init__(self) -> None:
|
|
69
|
-
self.root = Namespace("kd", "
|
|
69
|
+
self.root = Namespace("kd", "Knowledge Dispatcher for issue trackers and knowledge bases")
|
|
70
70
|
|
|
71
71
|
def register_namespace(self, namespace: Namespace) -> None:
|
|
72
72
|
"""Place a namespace in the tree by its path.
|
|
@@ -476,7 +476,7 @@ def _show_reference(
|
|
|
476
476
|
Generated from command metadata — always in sync with the code.
|
|
477
477
|
Designed for LLM consumption: one output, full coverage.
|
|
478
478
|
"""
|
|
479
|
-
print(f"kd {__version__} —
|
|
479
|
+
print(f"kd {__version__} — Knowledge Dispatcher for issue trackers and knowledge bases")
|
|
480
480
|
print()
|
|
481
481
|
|
|
482
482
|
# Global options line — generated from declarations
|
|
@@ -575,7 +575,7 @@ def _show_discovery(namespace: Namespace, *, file: Any = None) -> None:
|
|
|
575
575
|
if namespace.path:
|
|
576
576
|
print(f"kd /{namespace.path}", file=file)
|
|
577
577
|
else:
|
|
578
|
-
print("kd —
|
|
578
|
+
print("kd — Knowledge Dispatcher for issue trackers and knowledge bases", file=file)
|
|
579
579
|
print(file=file)
|
|
580
580
|
|
|
581
581
|
if namespace.sub_namespaces:
|
|
@@ -34,5 +34,5 @@ def register_all_namespaces(registry: NamespaceRegistry) -> None:
|
|
|
34
34
|
registry.register_namespace(create_user_namespace())
|
|
35
35
|
registry.register_namespace(create_time_namespace())
|
|
36
36
|
|
|
37
|
-
# Apply built-in command synonyms (
|
|
37
|
+
# Apply built-in command synonyms (KDCLI-8)
|
|
38
38
|
apply_synonyms(registry.root, load_synonyms())
|
|
@@ -1000,7 +1000,7 @@ class ArticleOperations:
|
|
|
1000
1000
|
"""Fetch an article and return its content with a fresh marker.
|
|
1001
1001
|
|
|
1002
1002
|
The server does not store ``upstream-updated`` inside article
|
|
1003
|
-
content (see
|
|
1003
|
+
content (see KDCLI-6); pull injects it from ``article.updated``
|
|
1004
1004
|
so a pull -> edit -> push round-trip does not trip the conflict
|
|
1005
1005
|
check. Marker-less content passes through verbatim. Malformed
|
|
1006
1006
|
markers pass through verbatim so the user can see and fix them.
|
|
@@ -1246,7 +1246,7 @@ class ArticleOperations:
|
|
|
1246
1246
|
|
|
1247
1247
|
# Step 7: build outgoing content. `upstream-updated` is intentionally
|
|
1248
1248
|
# omitted from the server payload — storing a snapshot of `updated`
|
|
1249
|
-
# inside the content creates an unsolvable chicken-and-egg (
|
|
1249
|
+
# inside the content creates an unsolvable chicken-and-egg (KDCLI-6).
|
|
1250
1250
|
# `pull` injects it from `article.updated` on read.
|
|
1251
1251
|
if existing_remote is not None:
|
|
1252
1252
|
marker.set("upstream-id", existing_remote.id_readable)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# Applied globally to any namespace that has the canonical command
|
|
5
5
|
# but does not already define a command with the synonym name.
|
|
6
6
|
#
|
|
7
|
-
# Keep this set small and curated. See
|
|
7
|
+
# Keep this set small and curated. See KDCLI-8.
|
|
8
8
|
|
|
9
9
|
- synonym: get
|
|
10
10
|
canonical: show
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kd-cli
|
|
3
|
+
Version: 2.0.5
|
|
4
|
+
Summary: Knowledge dispatcher for live knowledge systems
|
|
5
|
+
Author: Sergiy Gladkyy
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: youtrack,cli,sdk,knowledge-management,knowledge-network
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Operating System :: POSIX
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
+
Classifier: Topic :: Utilities
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: httpx>=0.27
|
|
22
|
+
Requires-Dist: pydantic>=2.0
|
|
23
|
+
Requires-Dist: pyyaml>=6.0
|
|
24
|
+
Requires-Dist: tabulate>=0.9
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-httpx>=0.30; extra == "dev"
|
|
28
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
29
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
30
|
+
Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
31
|
+
Requires-Dist: types-PyYAML; extra == "dev"
|
|
32
|
+
Requires-Dist: types-tabulate; extra == "dev"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# kd
|
|
36
|
+
|
|
37
|
+
**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.
|
|
38
|
+
|
|
39
|
+
Today kd speaks **YouTrack**. On the roadmap: **JIRA**, **GitHub Issues**, **GitLab**, and possibly **Obsidian**. One tool, one set of verbs, many backends.
|
|
40
|
+
|
|
41
|
+
## What kd does
|
|
42
|
+
|
|
43
|
+
- **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.
|
|
44
|
+
- **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.
|
|
45
|
+
- **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.
|
|
46
|
+
- **Cross-entity search** spanning issues and articles in a single query.
|
|
47
|
+
- **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.
|
|
48
|
+
|
|
49
|
+
## The primer — and why it exists
|
|
50
|
+
|
|
51
|
+
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.
|
|
52
|
+
|
|
53
|
+
It exists to solve a problem that has gotten worse as LLMs have become central to real work:
|
|
54
|
+
|
|
55
|
+
- **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.
|
|
56
|
+
- **LLM-portable.** One primer works for any model. Switch from Claude to GPT-5 to the next generation — the primer travels with the project, not with a vendor.
|
|
57
|
+
- **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.
|
|
58
|
+
- **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.
|
|
59
|
+
|
|
60
|
+
## What kd is not
|
|
61
|
+
|
|
62
|
+
- **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.
|
|
63
|
+
- **Not a data warehouse.** Data lives in the upstream tracker; kd sits on top.
|
|
64
|
+
- **Not a faithful replica.** kd reads what a task needs and writes what actually changed. It never claims to be a complete mirror.
|
|
65
|
+
|
|
66
|
+
If you need a migration tool or a comprehensive import/export platform, kd is the wrong tool.
|
|
67
|
+
|
|
68
|
+
## Install
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# pipx (recommended)
|
|
72
|
+
pipx install kd-cli
|
|
73
|
+
|
|
74
|
+
# or uv
|
|
75
|
+
uv tool install kd-cli
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
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`.
|
|
79
|
+
|
|
80
|
+
## Configure
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Scaffold a project-local config in the current directory.
|
|
84
|
+
kd init
|
|
85
|
+
|
|
86
|
+
# Or set via environment (overrides workspace + global config).
|
|
87
|
+
export KD_TOKEN=your_token
|
|
88
|
+
export KD_CONNECTION=main
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Global config lives at `~/.config/kd/config.yaml`; workspace config lives at `.kd/config.yaml`.
|
|
92
|
+
|
|
93
|
+
## Usage
|
|
94
|
+
|
|
95
|
+
### CLI
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Projects
|
|
99
|
+
kd /project list
|
|
100
|
+
kd /project show FB
|
|
101
|
+
|
|
102
|
+
# Issues
|
|
103
|
+
kd /issue list --project FB --query "#Unresolved"
|
|
104
|
+
kd /issue create "Fix router configuration" -p FB --type Task
|
|
105
|
+
kd /issue show FB-1
|
|
106
|
+
|
|
107
|
+
# Time tracking
|
|
108
|
+
kd /time log FB-1 45 --type Development --description "Router reconfiguration"
|
|
109
|
+
|
|
110
|
+
# Articles
|
|
111
|
+
kd /article list --project CMCSA
|
|
112
|
+
kd /article push guide.md --project CMCSA --title "Setup Guide" --tag "type:guide"
|
|
113
|
+
kd /article pull FB-A-42 > setup.md
|
|
114
|
+
|
|
115
|
+
# Tags
|
|
116
|
+
kd /tag list
|
|
117
|
+
kd /tag articles type:case --project CMCSA
|
|
118
|
+
|
|
119
|
+
# Saved queries
|
|
120
|
+
kd /query list
|
|
121
|
+
kd /query issues "Sprint 47" --project FB
|
|
122
|
+
|
|
123
|
+
# Primer (workspace knowledge, LLM context)
|
|
124
|
+
kd /primer/note add "Sprint field is called 'Board'"
|
|
125
|
+
kd /primer/article add FB-A-42 --summary "Architecture Overview"
|
|
126
|
+
kd /primer show
|
|
127
|
+
|
|
128
|
+
# Cross-entity search
|
|
129
|
+
kd /search "router" --types issue,article --project FB
|
|
130
|
+
|
|
131
|
+
# Output formats
|
|
132
|
+
kd /project list --output json | jq '.[].key'
|
|
133
|
+
kd /issue list --output yaml
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Python SDK
|
|
137
|
+
|
|
138
|
+
The CLI is a thin wrapper over a Python library. Same capabilities, programmatic interface:
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
from kd import YouTrackClient
|
|
142
|
+
|
|
143
|
+
client = YouTrackClient(
|
|
144
|
+
url="https://your-instance.youtrack.cloud",
|
|
145
|
+
token="your_token",
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
projects = client.projects.list()
|
|
149
|
+
issue = client.issues.create(project="FB", summary="Fix router config")
|
|
150
|
+
client.time.log(issue_id="FB-1", minutes=45, work_type="Development")
|
|
151
|
+
articles = client.tags.articles(["type:case"], project="CMCSA")
|
|
152
|
+
results = client.search.search("router", types=["issue", "article"])
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Development
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
pytest tests/ -v --tb=short
|
|
159
|
+
|
|
160
|
+
ruff format kd/ tests/
|
|
161
|
+
ruff check --fix kd/ tests/
|
|
162
|
+
mypy kd/
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
Updated: 2026-04-14
|
kd_cli-2.0.4/PKG-INFO
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: kd-cli
|
|
3
|
-
Version: 2.0.4
|
|
4
|
-
Summary: Knowledge dispatcher for live knowledge systems
|
|
5
|
-
Author: Sergiy Gladkyy
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Keywords: youtrack,cli,sdk,knowledge-management,knowledge-network
|
|
8
|
-
Classifier: Development Status :: 4 - Beta
|
|
9
|
-
Classifier: Environment :: Console
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Operating System :: POSIX
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
-
Classifier: Topic :: Utilities
|
|
18
|
-
Requires-Python: >=3.11
|
|
19
|
-
Description-Content-Type: text/markdown
|
|
20
|
-
License-File: LICENSE
|
|
21
|
-
Requires-Dist: httpx>=0.27
|
|
22
|
-
Requires-Dist: pydantic>=2.0
|
|
23
|
-
Requires-Dist: pyyaml>=6.0
|
|
24
|
-
Requires-Dist: tabulate>=0.9
|
|
25
|
-
Provides-Extra: dev
|
|
26
|
-
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
27
|
-
Requires-Dist: pytest-httpx>=0.30; extra == "dev"
|
|
28
|
-
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
29
|
-
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
30
|
-
Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
31
|
-
Requires-Dist: types-PyYAML; extra == "dev"
|
|
32
|
-
Requires-Dist: types-tabulate; extra == "dev"
|
|
33
|
-
Dynamic: license-file
|
|
34
|
-
|
|
35
|
-
# kd
|
|
36
|
-
|
|
37
|
-
A knowledge dispatcher for live knowledge systems — pull what you need to reason, push your updates back, and stay on top of a live system rather than copying it.
|
|
38
|
-
|
|
39
|
-
## Purpose
|
|
40
|
-
|
|
41
|
-
**kd is a knowledge-network tool, not a data-exchange tool.** It is built around a small, primer-shaped idea: the operator reasons *on top of* live trackers, not alongside copies of them. The primary loop is **pull → reason → push updates back**. Integrating multiple sources happens in the operator's head — not in kd's data model. Occasional cross-system moves exist, but they are deliberately thin: at the limit, a stub with a similar title and a backref to the original, not a faithful reproduction. kd is not a migration tool or a comprehensive import-export platform; it is a network-of-knowledge dispatcher that speaks YouTrack fluently and will, over time, speak other trackers through narrow domain protocols.
|
|
42
|
-
|
|
43
|
-
The **primer** (`kd /primer`) is the working illustration: a small set of pinned references plus curated notes, living in the workspace, sitting on top of live systems without replacing them. The rest of the tool extends that shape.
|
|
44
|
-
|
|
45
|
-
**SDK-first**: the Python library (`kd.client`) is the primary interface; CLI commands are thin wrappers over it. LLMs constructing commands programmatically are the primary consumer, so syntax clarity and structured output matter more than keystroke economy.
|
|
46
|
-
|
|
47
|
-
## Install
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
# pipx (recommended)
|
|
51
|
-
pipx install kd
|
|
52
|
-
|
|
53
|
-
# or uv
|
|
54
|
-
uv tool install kd
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Configure
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
# Scaffold a project-local config in the current directory.
|
|
61
|
-
kd init
|
|
62
|
-
|
|
63
|
-
# Or set via environment (overrides workspace + global config).
|
|
64
|
-
export KD_TOKEN=your_token
|
|
65
|
-
export KD_CONNECTION=main
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Global config lives at `~/.config/kd/config.yaml`; workspace config lives at `.kd/config.yaml`.
|
|
69
|
-
|
|
70
|
-
## Usage
|
|
71
|
-
|
|
72
|
-
### CLI
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
# Projects
|
|
76
|
-
kd /project list
|
|
77
|
-
kd /project show FB
|
|
78
|
-
|
|
79
|
-
# Issues
|
|
80
|
-
kd /issue list --project FB --query "#Unresolved"
|
|
81
|
-
kd /issue create "Fix router configuration" -p FB --type Task
|
|
82
|
-
kd /issue show FB-1
|
|
83
|
-
|
|
84
|
-
# Time tracking
|
|
85
|
-
kd /time log FB-1 45 --type Development --description "Router reconfiguration"
|
|
86
|
-
|
|
87
|
-
# Articles
|
|
88
|
-
kd /article list --project CMCSA
|
|
89
|
-
kd /article push guide.md --project CMCSA --title "Setup Guide" --tag "type:guide"
|
|
90
|
-
kd /article pull FB-A-42 > setup.md
|
|
91
|
-
|
|
92
|
-
# Tags
|
|
93
|
-
kd /tag list
|
|
94
|
-
kd /tag articles type:case --project CMCSA
|
|
95
|
-
|
|
96
|
-
# Saved queries
|
|
97
|
-
kd /query list
|
|
98
|
-
kd /query issues "Sprint 47" --project FB
|
|
99
|
-
|
|
100
|
-
# Primer (local knowledge, LLM context)
|
|
101
|
-
kd /primer/note add "Sprint field is called 'Board'"
|
|
102
|
-
kd /primer/article add FB-A-42 --summary "Architecture Overview"
|
|
103
|
-
kd /primer show
|
|
104
|
-
|
|
105
|
-
# Cross-entity search
|
|
106
|
-
kd /search "router" --types issue,article --project FB
|
|
107
|
-
|
|
108
|
-
# Output formats
|
|
109
|
-
kd /project list --output json | jq '.[].key'
|
|
110
|
-
kd /issue list --output yaml
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Python SDK
|
|
114
|
-
|
|
115
|
-
```python
|
|
116
|
-
from kd import YouTrackClient
|
|
117
|
-
|
|
118
|
-
client = YouTrackClient(
|
|
119
|
-
url="https://your-instance.youtrack.cloud",
|
|
120
|
-
token="your_token",
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
projects = client.projects.list()
|
|
124
|
-
issue = client.issues.create(project="FB", summary="Fix router config")
|
|
125
|
-
client.time.log(issue_id="FB-1", minutes=45, work_type="Development")
|
|
126
|
-
articles = client.tags.articles(["type:case"], project="CMCSA")
|
|
127
|
-
results = client.search.search("router", types=["issue", "article"])
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## What kd is not
|
|
131
|
-
|
|
132
|
-
- **Not a migration platform.** Cross-system moves are lossy cherry-picks: a stub on the target side with a backref to the source, nothing more.
|
|
133
|
-
- **Not a faithful mirror.** kd never claims to be a complete copy of upstream state; it reads what it needs and writes what changed.
|
|
134
|
-
- **Not a data warehouse.** Data lives in the upstream tracker; kd sits on top.
|
|
135
|
-
|
|
136
|
-
If you need a migration tool or an import-export platform, kd is the wrong tool.
|
|
137
|
-
|
|
138
|
-
## Development
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
pytest tests/ -v --tb=short
|
|
142
|
-
|
|
143
|
-
ruff format kd/ tests/
|
|
144
|
-
ruff check --fix kd/ tests/
|
|
145
|
-
mypy kd/
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
Updated: 2026-04-13
|
kd_cli-2.0.4/README.md
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# kd
|
|
2
|
-
|
|
3
|
-
A knowledge dispatcher for live knowledge systems — pull what you need to reason, push your updates back, and stay on top of a live system rather than copying it.
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
**kd is a knowledge-network tool, not a data-exchange tool.** It is built around a small, primer-shaped idea: the operator reasons *on top of* live trackers, not alongside copies of them. The primary loop is **pull → reason → push updates back**. Integrating multiple sources happens in the operator's head — not in kd's data model. Occasional cross-system moves exist, but they are deliberately thin: at the limit, a stub with a similar title and a backref to the original, not a faithful reproduction. kd is not a migration tool or a comprehensive import-export platform; it is a network-of-knowledge dispatcher that speaks YouTrack fluently and will, over time, speak other trackers through narrow domain protocols.
|
|
8
|
-
|
|
9
|
-
The **primer** (`kd /primer`) is the working illustration: a small set of pinned references plus curated notes, living in the workspace, sitting on top of live systems without replacing them. The rest of the tool extends that shape.
|
|
10
|
-
|
|
11
|
-
**SDK-first**: the Python library (`kd.client`) is the primary interface; CLI commands are thin wrappers over it. LLMs constructing commands programmatically are the primary consumer, so syntax clarity and structured output matter more than keystroke economy.
|
|
12
|
-
|
|
13
|
-
## Install
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
# pipx (recommended)
|
|
17
|
-
pipx install kd
|
|
18
|
-
|
|
19
|
-
# or uv
|
|
20
|
-
uv tool install kd
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Configure
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
# Scaffold a project-local config in the current directory.
|
|
27
|
-
kd init
|
|
28
|
-
|
|
29
|
-
# Or set via environment (overrides workspace + global config).
|
|
30
|
-
export KD_TOKEN=your_token
|
|
31
|
-
export KD_CONNECTION=main
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Global config lives at `~/.config/kd/config.yaml`; workspace config lives at `.kd/config.yaml`.
|
|
35
|
-
|
|
36
|
-
## Usage
|
|
37
|
-
|
|
38
|
-
### CLI
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
# Projects
|
|
42
|
-
kd /project list
|
|
43
|
-
kd /project show FB
|
|
44
|
-
|
|
45
|
-
# Issues
|
|
46
|
-
kd /issue list --project FB --query "#Unresolved"
|
|
47
|
-
kd /issue create "Fix router configuration" -p FB --type Task
|
|
48
|
-
kd /issue show FB-1
|
|
49
|
-
|
|
50
|
-
# Time tracking
|
|
51
|
-
kd /time log FB-1 45 --type Development --description "Router reconfiguration"
|
|
52
|
-
|
|
53
|
-
# Articles
|
|
54
|
-
kd /article list --project CMCSA
|
|
55
|
-
kd /article push guide.md --project CMCSA --title "Setup Guide" --tag "type:guide"
|
|
56
|
-
kd /article pull FB-A-42 > setup.md
|
|
57
|
-
|
|
58
|
-
# Tags
|
|
59
|
-
kd /tag list
|
|
60
|
-
kd /tag articles type:case --project CMCSA
|
|
61
|
-
|
|
62
|
-
# Saved queries
|
|
63
|
-
kd /query list
|
|
64
|
-
kd /query issues "Sprint 47" --project FB
|
|
65
|
-
|
|
66
|
-
# Primer (local knowledge, LLM context)
|
|
67
|
-
kd /primer/note add "Sprint field is called 'Board'"
|
|
68
|
-
kd /primer/article add FB-A-42 --summary "Architecture Overview"
|
|
69
|
-
kd /primer show
|
|
70
|
-
|
|
71
|
-
# Cross-entity search
|
|
72
|
-
kd /search "router" --types issue,article --project FB
|
|
73
|
-
|
|
74
|
-
# Output formats
|
|
75
|
-
kd /project list --output json | jq '.[].key'
|
|
76
|
-
kd /issue list --output yaml
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Python SDK
|
|
80
|
-
|
|
81
|
-
```python
|
|
82
|
-
from kd import YouTrackClient
|
|
83
|
-
|
|
84
|
-
client = YouTrackClient(
|
|
85
|
-
url="https://your-instance.youtrack.cloud",
|
|
86
|
-
token="your_token",
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
projects = client.projects.list()
|
|
90
|
-
issue = client.issues.create(project="FB", summary="Fix router config")
|
|
91
|
-
client.time.log(issue_id="FB-1", minutes=45, work_type="Development")
|
|
92
|
-
articles = client.tags.articles(["type:case"], project="CMCSA")
|
|
93
|
-
results = client.search.search("router", types=["issue", "article"])
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## What kd is not
|
|
97
|
-
|
|
98
|
-
- **Not a migration platform.** Cross-system moves are lossy cherry-picks: a stub on the target side with a backref to the source, nothing more.
|
|
99
|
-
- **Not a faithful mirror.** kd never claims to be a complete copy of upstream state; it reads what it needs and writes what changed.
|
|
100
|
-
- **Not a data warehouse.** Data lives in the upstream tracker; kd sits on top.
|
|
101
|
-
|
|
102
|
-
If you need a migration tool or an import-export platform, kd is the wrong tool.
|
|
103
|
-
|
|
104
|
-
## Development
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
pytest tests/ -v --tb=short
|
|
108
|
-
|
|
109
|
-
ruff format kd/ tests/
|
|
110
|
-
ruff check --fix kd/ tests/
|
|
111
|
-
mypy kd/
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
Updated: 2026-04-13
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: kd-cli
|
|
3
|
-
Version: 2.0.4
|
|
4
|
-
Summary: Knowledge dispatcher for live knowledge systems
|
|
5
|
-
Author: Sergiy Gladkyy
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Keywords: youtrack,cli,sdk,knowledge-management,knowledge-network
|
|
8
|
-
Classifier: Development Status :: 4 - Beta
|
|
9
|
-
Classifier: Environment :: Console
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Operating System :: POSIX
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
-
Classifier: Topic :: Utilities
|
|
18
|
-
Requires-Python: >=3.11
|
|
19
|
-
Description-Content-Type: text/markdown
|
|
20
|
-
License-File: LICENSE
|
|
21
|
-
Requires-Dist: httpx>=0.27
|
|
22
|
-
Requires-Dist: pydantic>=2.0
|
|
23
|
-
Requires-Dist: pyyaml>=6.0
|
|
24
|
-
Requires-Dist: tabulate>=0.9
|
|
25
|
-
Provides-Extra: dev
|
|
26
|
-
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
27
|
-
Requires-Dist: pytest-httpx>=0.30; extra == "dev"
|
|
28
|
-
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
29
|
-
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
30
|
-
Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
31
|
-
Requires-Dist: types-PyYAML; extra == "dev"
|
|
32
|
-
Requires-Dist: types-tabulate; extra == "dev"
|
|
33
|
-
Dynamic: license-file
|
|
34
|
-
|
|
35
|
-
# kd
|
|
36
|
-
|
|
37
|
-
A knowledge dispatcher for live knowledge systems — pull what you need to reason, push your updates back, and stay on top of a live system rather than copying it.
|
|
38
|
-
|
|
39
|
-
## Purpose
|
|
40
|
-
|
|
41
|
-
**kd is a knowledge-network tool, not a data-exchange tool.** It is built around a small, primer-shaped idea: the operator reasons *on top of* live trackers, not alongside copies of them. The primary loop is **pull → reason → push updates back**. Integrating multiple sources happens in the operator's head — not in kd's data model. Occasional cross-system moves exist, but they are deliberately thin: at the limit, a stub with a similar title and a backref to the original, not a faithful reproduction. kd is not a migration tool or a comprehensive import-export platform; it is a network-of-knowledge dispatcher that speaks YouTrack fluently and will, over time, speak other trackers through narrow domain protocols.
|
|
42
|
-
|
|
43
|
-
The **primer** (`kd /primer`) is the working illustration: a small set of pinned references plus curated notes, living in the workspace, sitting on top of live systems without replacing them. The rest of the tool extends that shape.
|
|
44
|
-
|
|
45
|
-
**SDK-first**: the Python library (`kd.client`) is the primary interface; CLI commands are thin wrappers over it. LLMs constructing commands programmatically are the primary consumer, so syntax clarity and structured output matter more than keystroke economy.
|
|
46
|
-
|
|
47
|
-
## Install
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
# pipx (recommended)
|
|
51
|
-
pipx install kd
|
|
52
|
-
|
|
53
|
-
# or uv
|
|
54
|
-
uv tool install kd
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Configure
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
# Scaffold a project-local config in the current directory.
|
|
61
|
-
kd init
|
|
62
|
-
|
|
63
|
-
# Or set via environment (overrides workspace + global config).
|
|
64
|
-
export KD_TOKEN=your_token
|
|
65
|
-
export KD_CONNECTION=main
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Global config lives at `~/.config/kd/config.yaml`; workspace config lives at `.kd/config.yaml`.
|
|
69
|
-
|
|
70
|
-
## Usage
|
|
71
|
-
|
|
72
|
-
### CLI
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
# Projects
|
|
76
|
-
kd /project list
|
|
77
|
-
kd /project show FB
|
|
78
|
-
|
|
79
|
-
# Issues
|
|
80
|
-
kd /issue list --project FB --query "#Unresolved"
|
|
81
|
-
kd /issue create "Fix router configuration" -p FB --type Task
|
|
82
|
-
kd /issue show FB-1
|
|
83
|
-
|
|
84
|
-
# Time tracking
|
|
85
|
-
kd /time log FB-1 45 --type Development --description "Router reconfiguration"
|
|
86
|
-
|
|
87
|
-
# Articles
|
|
88
|
-
kd /article list --project CMCSA
|
|
89
|
-
kd /article push guide.md --project CMCSA --title "Setup Guide" --tag "type:guide"
|
|
90
|
-
kd /article pull FB-A-42 > setup.md
|
|
91
|
-
|
|
92
|
-
# Tags
|
|
93
|
-
kd /tag list
|
|
94
|
-
kd /tag articles type:case --project CMCSA
|
|
95
|
-
|
|
96
|
-
# Saved queries
|
|
97
|
-
kd /query list
|
|
98
|
-
kd /query issues "Sprint 47" --project FB
|
|
99
|
-
|
|
100
|
-
# Primer (local knowledge, LLM context)
|
|
101
|
-
kd /primer/note add "Sprint field is called 'Board'"
|
|
102
|
-
kd /primer/article add FB-A-42 --summary "Architecture Overview"
|
|
103
|
-
kd /primer show
|
|
104
|
-
|
|
105
|
-
# Cross-entity search
|
|
106
|
-
kd /search "router" --types issue,article --project FB
|
|
107
|
-
|
|
108
|
-
# Output formats
|
|
109
|
-
kd /project list --output json | jq '.[].key'
|
|
110
|
-
kd /issue list --output yaml
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Python SDK
|
|
114
|
-
|
|
115
|
-
```python
|
|
116
|
-
from kd import YouTrackClient
|
|
117
|
-
|
|
118
|
-
client = YouTrackClient(
|
|
119
|
-
url="https://your-instance.youtrack.cloud",
|
|
120
|
-
token="your_token",
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
projects = client.projects.list()
|
|
124
|
-
issue = client.issues.create(project="FB", summary="Fix router config")
|
|
125
|
-
client.time.log(issue_id="FB-1", minutes=45, work_type="Development")
|
|
126
|
-
articles = client.tags.articles(["type:case"], project="CMCSA")
|
|
127
|
-
results = client.search.search("router", types=["issue", "article"])
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## What kd is not
|
|
131
|
-
|
|
132
|
-
- **Not a migration platform.** Cross-system moves are lossy cherry-picks: a stub on the target side with a backref to the source, nothing more.
|
|
133
|
-
- **Not a faithful mirror.** kd never claims to be a complete copy of upstream state; it reads what it needs and writes what changed.
|
|
134
|
-
- **Not a data warehouse.** Data lives in the upstream tracker; kd sits on top.
|
|
135
|
-
|
|
136
|
-
If you need a migration tool or an import-export platform, kd is the wrong tool.
|
|
137
|
-
|
|
138
|
-
## Development
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
pytest tests/ -v --tb=short
|
|
142
|
-
|
|
143
|
-
ruff format kd/ tests/
|
|
144
|
-
ruff check --fix kd/ tests/
|
|
145
|
-
mypy kd/
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
Updated: 2026-04-13
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|