okf-cli 0.1.0__tar.gz → 0.1.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: okf-cli
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Open Knowledge Format tooling
5
5
  License: MIT License
6
6
 
@@ -30,17 +30,29 @@ Description-Content-Type: text/markdown
30
30
 
31
31
  # okf-cli — Open Knowledge Format tooling
32
32
 
33
- Converts plain markdown into [OKF](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md)-conformant knowledge bundles. Domain experts write `# Title` then `> description` — `okf enrich` generates frontmatter, type, timestamps, and index files.
33
+ Converts plain markdown into [OKF](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md)-conformant knowledge bundles. Domain experts write `# Title` then `> description` — `okf bundle` generates frontmatter, type, timestamps, and index files.
34
34
 
35
- ## Quickstart
35
+ ## Install
36
36
 
37
37
  ```bash
38
- uv sync
39
- uv run okf example # output → bundled/
38
+ uv tool install okf-cli
39
+ ```
40
+
41
+ Then run:
42
+
43
+ ```bash
44
+ okf bundle example # output → bundled/
40
45
  cat bundled/index.md
41
46
  cat bundled/tables/orders.md
42
47
  ```
43
48
 
49
+ ### Dev quickstart
50
+
51
+ ```bash
52
+ uv sync
53
+ uv run okf example
54
+ ```
55
+
44
56
  ## Usage
45
57
 
46
58
  ```
@@ -1,16 +1,28 @@
1
1
  # okf-cli — Open Knowledge Format tooling
2
2
 
3
- Converts plain markdown into [OKF](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md)-conformant knowledge bundles. Domain experts write `# Title` then `> description` — `okf enrich` generates frontmatter, type, timestamps, and index files.
3
+ Converts plain markdown into [OKF](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md)-conformant knowledge bundles. Domain experts write `# Title` then `> description` — `okf bundle` generates frontmatter, type, timestamps, and index files.
4
4
 
5
- ## Quickstart
5
+ ## Install
6
6
 
7
7
  ```bash
8
- uv sync
9
- uv run okf example # output → bundled/
8
+ uv tool install okf-cli
9
+ ```
10
+
11
+ Then run:
12
+
13
+ ```bash
14
+ okf bundle example # output → bundled/
10
15
  cat bundled/index.md
11
16
  cat bundled/tables/orders.md
12
17
  ```
13
18
 
19
+ ### Dev quickstart
20
+
21
+ ```bash
22
+ uv sync
23
+ uv run okf example
24
+ ```
25
+
14
26
  ## Usage
15
27
 
16
28
  ```
@@ -1,7 +1,7 @@
1
1
  # OKF Example
2
2
 
3
3
  This directory contains plain markdown files written by domain experts.
4
- Run `okf enrich` to convert them into an OKF-conformant knowledge bundle.
4
+ Run `okf bundle` to convert them into an OKF-conformant knowledge bundle.
5
5
 
6
6
  ```bash
7
7
  # From repo root:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "okf-cli"
3
- version = "0.1.0"
3
+ version = "0.1.1"
4
4
  description = "Open Knowledge Format tooling"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -1,4 +1,4 @@
1
- """okf enrich — Plain markdown to OKF bundle converter."""
1
+ """okf bundle — Plain markdown to OKF bundle converter."""
2
2
 
3
3
  import json
4
4
  import os
@@ -78,7 +78,7 @@ def _parse_md(text: str) -> tuple[str, str, str]:
78
78
 
79
79
 
80
80
  @app.command()
81
- def enrich(
81
+ def bundle(
82
82
  input_dir: str = typer.Argument(
83
83
  ..., help="Source directory of plain markdown files"
84
84
  ),
@@ -1,4 +1,4 @@
1
- """Tests for okf enrich CLI."""
1
+ """Tests for okf bundle CLI."""
2
2
 
3
3
  import json
4
4
  from pathlib import Path
@@ -113,7 +113,7 @@ def _write_fixture(dir: Path, files: dict[str, str]):
113
113
  p.write_text(content)
114
114
 
115
115
 
116
- def test_enrich_basic(tmp_path: Path):
116
+ def test_bundle_basic(tmp_path: Path):
117
117
  src = tmp_path / "notes"
118
118
  dst = tmp_path / "bundle"
119
119
  src.mkdir()
@@ -150,7 +150,7 @@ def test_enrich_basic(tmp_path: Path):
150
150
  assert "[tables](tables/)" in root_idx
151
151
 
152
152
 
153
- def test_enrich_root_file_with_default_type(tmp_path: Path):
153
+ def test_bundle_root_file_with_default_type(tmp_path: Path):
154
154
  src = tmp_path / "notes"
155
155
  dst = tmp_path / "bundle"
156
156
  src.mkdir()
@@ -177,7 +177,7 @@ def test_enrich_root_file_with_default_type(tmp_path: Path):
177
177
  assert "[Standalone](standalone.md)" in root_idx
178
178
 
179
179
 
180
- def test_enrich_skip_root_file_without_default(tmp_path: Path, capsys):
180
+ def test_bundle_skip_root_file_without_default(tmp_path: Path, capsys):
181
181
  src = tmp_path / "notes"
182
182
  dst = tmp_path / "bundle"
183
183
  src.mkdir()
@@ -202,7 +202,7 @@ def test_enrich_skip_root_file_without_default(tmp_path: Path, capsys):
202
202
  assert "[Standalone" not in root_idx
203
203
 
204
204
 
205
- def test_enrich_validation_error(tmp_path: Path):
205
+ def test_bundle_validation_error(tmp_path: Path):
206
206
  src = tmp_path / "notes"
207
207
  dst = tmp_path / "bundle"
208
208
  src.mkdir()
@@ -218,7 +218,7 @@ def test_enrich_validation_error(tmp_path: Path):
218
218
  assert "Line 1 must be" in result.output
219
219
 
220
220
 
221
- def test_enrich_replaces_existing_output(tmp_path: Path):
221
+ def test_bundle_replaces_existing_output(tmp_path: Path):
222
222
  src = tmp_path / "notes"
223
223
  dst = tmp_path / "bundle"
224
224
  src.mkdir()
@@ -233,7 +233,7 @@ def test_enrich_replaces_existing_output(tmp_path: Path):
233
233
  assert not (dst / "leftover.txt").exists()
234
234
 
235
235
 
236
- def test_enrich_no_md_files(tmp_path: Path):
236
+ def test_bundle_no_md_files(tmp_path: Path):
237
237
  src = tmp_path / "notes"
238
238
  dst = tmp_path / "bundle"
239
239
  src.mkdir()
@@ -245,7 +245,7 @@ def test_enrich_no_md_files(tmp_path: Path):
245
245
  assert "No markdown files" in result.output
246
246
 
247
247
 
248
- def test_enrich_logmd_warning(tmp_path: Path):
248
+ def test_bundle_logmd_warning(tmp_path: Path):
249
249
  src = tmp_path / "notes"
250
250
  dst = tmp_path / "bundle"
251
251
  src.mkdir()
@@ -261,7 +261,7 @@ def test_enrich_logmd_warning(tmp_path: Path):
261
261
  assert (dst / "tables" / "orders.md").exists()
262
262
 
263
263
 
264
- def test_enrich_readme_is_reserved(tmp_path: Path):
264
+ def test_bundle_readme_is_reserved(tmp_path: Path):
265
265
  """README.md is reserved and skipped."""
266
266
  src = tmp_path / "notes"
267
267
  dst = tmp_path / "bundle"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes