okf-cli 0.5.5__tar.gz → 0.6.1__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.
Files changed (55) hide show
  1. okf_cli-0.6.1/.last-update.json +1 -0
  2. okf_cli-0.6.1/AGENTS.md +58 -0
  3. okf_cli-0.6.1/PKG-INFO +75 -0
  4. okf_cli-0.6.1/README.md +43 -0
  5. okf_cli-0.6.1/SPEC/OKF_SPEC_V0_2.md +1003 -0
  6. okf_cli-0.6.1/example/computations/revenue.md +38 -0
  7. okf_cli-0.6.1/example/metrics/income-statement.md +21 -0
  8. okf_cli-0.6.1/example/references/revenue-recognition.md +12 -0
  9. {okf_cli-0.5.5 → okf_cli-0.6.1}/pyproject.toml +1 -1
  10. {okf_cli-0.5.5 → okf_cli-0.6.1}/src/okf/api.py +117 -24
  11. {okf_cli-0.5.5 → okf_cli-0.6.1}/src/okf/commands/validate.py +4 -2
  12. {okf_cli-0.5.5 → okf_cli-0.6.1}/src/okf/core.py +93 -23
  13. {okf_cli-0.5.5 → okf_cli-0.6.1}/tests/test_api.py +357 -40
  14. okf_cli-0.6.1/tests/test_core.py +378 -0
  15. {okf_cli-0.5.5 → okf_cli-0.6.1}/uv.lock +1 -1
  16. {okf_cli-0.5.5/openwiki → okf_cli-0.6.1/wiki}/architecture.md +18 -6
  17. {okf_cli-0.5.5/openwiki → okf_cli-0.6.1/wiki}/domain-model.md +36 -3
  18. {okf_cli-0.5.5/openwiki → okf_cli-0.6.1/wiki}/operations.md +2 -0
  19. {okf_cli-0.5.5/openwiki → okf_cli-0.6.1/wiki}/quickstart.md +3 -3
  20. {okf_cli-0.5.5/openwiki → okf_cli-0.6.1/wiki}/testing.md +6 -5
  21. {okf_cli-0.5.5/openwiki → okf_cli-0.6.1/wiki}/workflows.md +23 -1
  22. okf_cli-0.5.5/.last-update.json +0 -1
  23. okf_cli-0.5.5/AGENTS.md +0 -82
  24. okf_cli-0.5.5/PKG-INFO +0 -184
  25. okf_cli-0.5.5/README.md +0 -152
  26. okf_cli-0.5.5/tests/test_core.py +0 -216
  27. {okf_cli-0.5.5 → okf_cli-0.6.1}/.github/workflows/test.yml +0 -0
  28. {okf_cli-0.5.5 → okf_cli-0.6.1}/.gitignore +0 -0
  29. {okf_cli-0.5.5 → okf_cli-0.6.1}/LICENSE +0 -0
  30. /okf_cli-0.5.5/OKF_SPEC.md → /okf_cli-0.6.1/SPEC/OKF_SPEC_V0_1.md +0 -0
  31. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/.okfignore +0 -0
  32. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/README.md +0 -0
  33. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/blank-line/no-blank.md +0 -0
  34. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/blank-line/with-blank.md +0 -0
  35. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/datasets/sales.md +0 -0
  36. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/domain.md +0 -0
  37. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/loose/deep/no-heading.md +0 -0
  38. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/loose/no-desc.md +0 -0
  39. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/loose/no-title.md +0 -0
  40. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/playbooks/incident-response.md +0 -0
  41. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/playbooks/oncall-guide.md +0 -0
  42. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/smoke-ignore.md +0 -0
  43. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/tables/customers.md +0 -0
  44. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/tables/orders.md +0 -0
  45. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/tables/partitions/2026/q1/jan/january.md +0 -0
  46. {okf_cli-0.5.5 → okf_cli-0.6.1}/example/tables/partitions/daily.md +0 -0
  47. {okf_cli-0.5.5 → okf_cli-0.6.1}/skills/okf-cli/SKILL.md +0 -0
  48. {okf_cli-0.5.5 → okf_cli-0.6.1}/skills/writing-knowledge-base/SKILL.md +0 -0
  49. {okf_cli-0.5.5 → okf_cli-0.6.1}/src/okf/__init__.py +0 -0
  50. {okf_cli-0.5.5 → okf_cli-0.6.1}/src/okf/cli.py +0 -0
  51. {okf_cli-0.5.5 → okf_cli-0.6.1}/src/okf/commands/__init__.py +0 -0
  52. {okf_cli-0.5.5 → okf_cli-0.6.1}/src/okf/commands/bundle.py +0 -0
  53. {okf_cli-0.5.5 → okf_cli-0.6.1}/src/okf/commands/list.py +0 -0
  54. {okf_cli-0.5.5 → okf_cli-0.6.1}/src/okf/commands/read.py +0 -0
  55. {okf_cli-0.5.5 → okf_cli-0.6.1}/tests/test_cli.py +0 -0
@@ -0,0 +1 @@
1
+ {"head": "c5781415bec2d85faf741ccf92f5ab5d56448879", "timestamp": "2026-08-13T06:01:33Z"}
@@ -0,0 +1,58 @@
1
+ # AGENTS.md — okf-cli contributor context
2
+
3
+ ## Wiki
4
+
5
+ This repository has documentation located in the /wiki directory.
6
+
7
+ Start here:
8
+
9
+ - [Wiki quickstart](wiki/quickstart.md)
10
+
11
+ Wiki includes repository overview, architecture notes, workflows, domain concepts, operations, integrations, testing guidance, and source maps.
12
+
13
+ When working in this repository, read the Wiki 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
+ - `wiki/` — 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.1/PKG-INFO ADDED
@@ -0,0 +1,75 @@
1
+ Metadata-Version: 2.5
2
+ Name: okf-cli
3
+ Version: 0.6.1
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: [wiki/quickstart.md](wiki/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)
@@ -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: [wiki/quickstart.md](wiki/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)