okf-cli 0.5.4__tar.gz → 0.6.0__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.
- {okf_cli-0.5.4 → okf_cli-0.6.0}/.github/workflows/test.yml +2 -0
- okf_cli-0.6.0/.last-update.json +1 -0
- okf_cli-0.6.0/AGENTS.md +58 -0
- okf_cli-0.6.0/PKG-INFO +75 -0
- okf_cli-0.6.0/README.md +43 -0
- okf_cli-0.6.0/SPEC/OKF_SPEC_V0_2.md +1003 -0
- okf_cli-0.6.0/example/computations/revenue.md +38 -0
- okf_cli-0.6.0/example/metrics/income-statement.md +21 -0
- okf_cli-0.6.0/example/references/revenue-recognition.md +12 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/openwiki/architecture.md +27 -14
- {okf_cli-0.5.4 → okf_cli-0.6.0}/openwiki/domain-model.md +36 -3
- {okf_cli-0.5.4 → okf_cli-0.6.0}/openwiki/operations.md +2 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/openwiki/testing.md +9 -7
- {okf_cli-0.5.4 → okf_cli-0.6.0}/openwiki/workflows.md +27 -4
- {okf_cli-0.5.4 → okf_cli-0.6.0}/pyproject.toml +1 -1
- {okf_cli-0.5.4 → okf_cli-0.6.0}/src/okf/api.py +117 -28
- {okf_cli-0.5.4 → okf_cli-0.6.0}/src/okf/commands/bundle.py +2 -2
- {okf_cli-0.5.4 → okf_cli-0.6.0}/src/okf/commands/list.py +3 -3
- {okf_cli-0.5.4 → okf_cli-0.6.0}/src/okf/commands/validate.py +8 -5
- {okf_cli-0.5.4 → okf_cli-0.6.0}/src/okf/core.py +93 -23
- {okf_cli-0.5.4 → okf_cli-0.6.0}/tests/test_api.py +363 -40
- {okf_cli-0.5.4 → okf_cli-0.6.0}/tests/test_cli.py +1 -6
- okf_cli-0.6.0/tests/test_core.py +378 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/uv.lock +1 -1
- okf_cli-0.5.4/.last-update.json +0 -4
- okf_cli-0.5.4/AGENTS.md +0 -82
- okf_cli-0.5.4/PKG-INFO +0 -184
- okf_cli-0.5.4/README.md +0 -152
- okf_cli-0.5.4/tests/test_core.py +0 -216
- {okf_cli-0.5.4 → okf_cli-0.6.0}/.gitignore +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/LICENSE +0 -0
- /okf_cli-0.5.4/OKF_SPEC.md → /okf_cli-0.6.0/SPEC/OKF_SPEC_V0_1.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/.okfignore +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/README.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/blank-line/no-blank.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/blank-line/with-blank.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/datasets/sales.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/domain.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/loose/deep/no-heading.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/loose/no-desc.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/loose/no-title.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/playbooks/incident-response.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/playbooks/oncall-guide.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/smoke-ignore.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/tables/customers.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/tables/orders.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/tables/partitions/2026/q1/jan/january.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/example/tables/partitions/daily.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/openwiki/quickstart.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/skills/okf-cli/SKILL.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/skills/writing-knowledge-base/SKILL.md +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/src/okf/__init__.py +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/src/okf/cli.py +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/src/okf/commands/__init__.py +0 -0
- {okf_cli-0.5.4 → okf_cli-0.6.0}/src/okf/commands/read.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"head": "edbf961cebc0111bc42c88cff27f3ab83194f360", "timestamp": "2026-07-29T09:18:45Z"}
|
okf_cli-0.6.0/AGENTS.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# AGENTS.md — okf-cli contributor context
|
|
2
|
+
|
|
3
|
+
## OpenWiki
|
|
4
|
+
|
|
5
|
+
This repository has documentation located in the /openwiki directory.
|
|
6
|
+
|
|
7
|
+
Start here:
|
|
8
|
+
|
|
9
|
+
- [OpenWiki quickstart](openwiki/quickstart.md)
|
|
10
|
+
|
|
11
|
+
OpenWiki includes repository overview, architecture notes, workflows, domain concepts, operations, integrations, testing guidance, and source maps.
|
|
12
|
+
|
|
13
|
+
When working in this repository, read the OpenWiki quickstart first, then follow its links to the relevant architecture, workflow, domain, operation, and testing notes.
|
|
14
|
+
|
|
15
|
+
## Tech stack
|
|
16
|
+
|
|
17
|
+
Python 3.11+, **uv**, **typer**, **pyyaml**, **rich**, **pytest**, **ruff**, **hatchling** (build backend).
|
|
18
|
+
|
|
19
|
+
## Project layout
|
|
20
|
+
|
|
21
|
+
- `src/okf/cli.py` — Typer entrypoint and command registration
|
|
22
|
+
- `src/okf/api.py` — programmatic API; all business logic lives here
|
|
23
|
+
- `src/okf/core.py` — shared parsing, formatting, and conformance helpers
|
|
24
|
+
- `src/okf/commands/` — thin CLI wrappers (`bundle`, `list`, `read`, `validate`)
|
|
25
|
+
- `tests/` — `test_api.py`, `test_cli.py`, `test_core.py`
|
|
26
|
+
- `openwiki/` — architecture, workflows, domain model, operations, testing notes
|
|
27
|
+
- `.github/workflows/test.yml` — CI (pytest + ruff on Python 3.11)
|
|
28
|
+
|
|
29
|
+
## Common tasks
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
uv sync
|
|
33
|
+
uv run pytest -q
|
|
34
|
+
uvx ruff check .
|
|
35
|
+
uvx ruff format .
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Regenerate the example bundle:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
uv run okf bundle example bundled --default-type reference --force
|
|
42
|
+
uv run okf validate bundled
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Add a CLI command:
|
|
46
|
+
|
|
47
|
+
1. Create `src/okf/commands/<name>.py`.
|
|
48
|
+
1. Register it in `src/okf/cli.py` with `app.command()(fn)`.
|
|
49
|
+
1. Add tests in `tests/test_cli.py`.
|
|
50
|
+
|
|
51
|
+
Modify conformance behavior: edit `src/okf/core.py::check_conformance`, then ensure `validate`, `list`, and `read` behave consistently.
|
|
52
|
+
|
|
53
|
+
## Style guidelines
|
|
54
|
+
|
|
55
|
+
- Keep changes minimal; prefer stdlib/installed dependencies over new ones.
|
|
56
|
+
- Do not add abstractions "for later".
|
|
57
|
+
- Use `Path` from `pathlib`, not string path manipulation.
|
|
58
|
+
- Use `uv` for all package/runtime commands.
|
okf_cli-0.6.0/PKG-INFO
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: okf-cli
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: Open Knowledge Format tooling
|
|
5
|
+
License: MIT License
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2026 Dheerapat Tookkane
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Python: >=3.11
|
|
28
|
+
Requires-Dist: pyyaml>=6
|
|
29
|
+
Requires-Dist: rich>=15.0.0
|
|
30
|
+
Requires-Dist: typer>=0.15
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# okf-cli — Open Knowledge Format tooling
|
|
34
|
+
|
|
35
|
+
Convert plain markdown directories into [OKF](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md)-conformant knowledge bundles. `okf bundle` generates YAML frontmatter, concept types, provenance, and per-directory `index.md` files; `okf validate`, `okf list`, and `okf read` consume the resulting bundle.
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
uv tool install okf-cli
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Dev quickstart
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
uv sync
|
|
47
|
+
uv run okf --help
|
|
48
|
+
uv run okf --version
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Commands
|
|
52
|
+
|
|
53
|
+
| Command | Purpose |
|
|
54
|
+
| ------------------------------------- | -------------------------------------------- |
|
|
55
|
+
| `okf bundle <input-dir> [output-dir]` | Convert markdown into an OKF bundle |
|
|
56
|
+
| `okf validate <directory>` | Check OKF v0.2 §11 conformance |
|
|
57
|
+
| `okf list <directory>` | List concepts (ID, type, title, description) |
|
|
58
|
+
| `okf read <directory> <concept-id>` | Print a concept by ID |
|
|
59
|
+
|
|
60
|
+
Run `okf <command> --help` for options such as `--default-type`, `--force`, `--strict`, and `--dry-run`.
|
|
61
|
+
|
|
62
|
+
## Quick example
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
uv run okf bundle example --default-type reference --force
|
|
66
|
+
uv run okf validate example_knowledge_base
|
|
67
|
+
uv run okf list example_knowledge_base
|
|
68
|
+
uv run okf read example_knowledge_base tables/customers
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Documentation
|
|
72
|
+
|
|
73
|
+
- Detailed user and contributor docs: [openwiki/quickstart.md](openwiki/quickstart.md)
|
|
74
|
+
- Agent contributor context: [AGENTS.md](AGENTS.md)
|
|
75
|
+
- OKF v0.2 specification: [SPEC/OKF_SPEC_V0_2.md](SPEC/OKF_SPEC_V0_2.md)
|
okf_cli-0.6.0/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# okf-cli — Open Knowledge Format tooling
|
|
2
|
+
|
|
3
|
+
Convert plain markdown directories into [OKF](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md)-conformant knowledge bundles. `okf bundle` generates YAML frontmatter, concept types, provenance, and per-directory `index.md` files; `okf validate`, `okf list`, and `okf read` consume the resulting bundle.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
uv tool install okf-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Dev quickstart
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
uv sync
|
|
15
|
+
uv run okf --help
|
|
16
|
+
uv run okf --version
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Commands
|
|
20
|
+
|
|
21
|
+
| Command | Purpose |
|
|
22
|
+
| ------------------------------------- | -------------------------------------------- |
|
|
23
|
+
| `okf bundle <input-dir> [output-dir]` | Convert markdown into an OKF bundle |
|
|
24
|
+
| `okf validate <directory>` | Check OKF v0.2 §11 conformance |
|
|
25
|
+
| `okf list <directory>` | List concepts (ID, type, title, description) |
|
|
26
|
+
| `okf read <directory> <concept-id>` | Print a concept by ID |
|
|
27
|
+
|
|
28
|
+
Run `okf <command> --help` for options such as `--default-type`, `--force`, `--strict`, and `--dry-run`.
|
|
29
|
+
|
|
30
|
+
## Quick example
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
uv run okf bundle example --default-type reference --force
|
|
34
|
+
uv run okf validate example_knowledge_base
|
|
35
|
+
uv run okf list example_knowledge_base
|
|
36
|
+
uv run okf read example_knowledge_base tables/customers
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Documentation
|
|
40
|
+
|
|
41
|
+
- Detailed user and contributor docs: [openwiki/quickstart.md](openwiki/quickstart.md)
|
|
42
|
+
- Agent contributor context: [AGENTS.md](AGENTS.md)
|
|
43
|
+
- OKF v0.2 specification: [SPEC/OKF_SPEC_V0_2.md](SPEC/OKF_SPEC_V0_2.md)
|