cngkit 1.1.2 → 1.1.3
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.
- package/LICENSE +1 -1
- package/README.md +23 -10
- package/dist/cli.cjs +9 -2
- package/dist/cli.cjs.map +1 -1
- package/package.json +17 -16
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -13,15 +13,15 @@ the Cloudflare-backed Harness knowledges catalog:
|
|
|
13
13
|
- `cngkit coderoom share [room-code]` starts a live shared code room from the current directory.
|
|
14
14
|
- `cngkit coderoom join <room-code>` joins another developer's shared code room.
|
|
15
15
|
- `cngkit scrub [path]` scans a file or directory with TruffleHog and prints a redacted report.
|
|
16
|
-
- `cngkit scrub [path] --yes` rewrites detected secret values inline with `CNGKIT_SECRET` placeholders.
|
|
16
|
+
- `cngkit scrub [path] --yes` rewrites detected secret values inline with `[CNGKIT_SECRET:<detector>:<verified|unverified>]` placeholders.
|
|
17
17
|
- `cngkit knowledges status` prints the remote catalog state.
|
|
18
18
|
- `cngkit knowledges audiences` lists available audience filters.
|
|
19
|
-
- `cngkit knowledges search <query
|
|
20
|
-
- `cngkit knowledges list [query]` lists known subskills.
|
|
21
|
-
- `cngkit knowledges files [query]` lists uploaded catalog files.
|
|
22
|
-
- `cngkit knowledges read <file-path
|
|
23
|
-
- `cngkit knowledges grep <pattern
|
|
24
|
-
- `cngkit knowledges glob [pattern]` lists catalog files by supported glob pattern.
|
|
19
|
+
- `cngkit knowledges search <query> [--limit n]` runs semantic search against Cloudflare Vectorize (default limit 5).
|
|
20
|
+
- `cngkit knowledges list [query] [--limit n]` lists known subskills (default limit 25).
|
|
21
|
+
- `cngkit knowledges files [query] [--audience id] [--limit n]` lists uploaded catalog files (default limit 25).
|
|
22
|
+
- `cngkit knowledges read <file-path> [--offset n] [--limit n]` reads a catalog file excerpt (default limit 200).
|
|
23
|
+
- `cngkit knowledges grep <pattern> [--path path] [--include glob] [--output-mode content|files_with_matches|count] [--context n] [--case-insensitive]` searches catalog file contents (default mode `content`, default path `/`).
|
|
24
|
+
- `cngkit knowledges glob [pattern] [--path path]` lists catalog files by supported glob pattern (default pattern `**/*.md`, default path `/`).
|
|
25
25
|
- `.git/` and files ignored by the repo's `.gitignore` are not synced.
|
|
26
26
|
- Later changes override earlier changes for the MVP conflict rule.
|
|
27
27
|
|
|
@@ -36,6 +36,12 @@ cngkit knowledges grep --help
|
|
|
36
36
|
cngkit knowledges glob --help
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
Global options accepted by every command:
|
|
40
|
+
|
|
41
|
+
- `--api-base-url <url>` overrides the Curly backend URL (default: `CNGKIT_API_BASE_URL` or `https://curly.ng`).
|
|
42
|
+
- `--version` prints the installed `cngkit` version.
|
|
43
|
+
- `--help` / `-h` prints the progressive help for the current command.
|
|
44
|
+
|
|
39
45
|
The canonical CLI spec lives at `docs/superpowers/specs/2026-06-25-cngkit-cli-spec.md`
|
|
40
46
|
in the repository. The baked help source lives in `src/help-specs.ts`; keep both
|
|
41
47
|
aligned when changing command behavior.
|
|
@@ -80,12 +86,19 @@ cngkit knowledges glob "**/*.md" --path /libraries/lib-cloudflare
|
|
|
80
86
|
```
|
|
81
87
|
|
|
82
88
|
Add `--json` to any `knowledges` command when another tool should consume the
|
|
83
|
-
raw API response. `grep` also accepts `--output-mode <content|files_with_matches|count
|
|
84
|
-
`--include <glob
|
|
89
|
+
raw API response. `grep` also accepts `--output-mode <content|files_with_matches|count>`
|
|
90
|
+
(default `content`), `--include <glob>` (default `*`), `--context <n>` (default `0`), and
|
|
91
|
+
`--case-insensitive`. Result limits default to `5` for `search` and `25` for `list` and
|
|
92
|
+
`files`; `read` defaults to `200` lines with a backend cap of `2000`, and accepts `--offset`
|
|
93
|
+
for paging.
|
|
94
|
+
|
|
95
|
+
`read` and `grep` accept shorthand catalog paths: `/libraries/lib-cloudflare/SUBSKILL.md`
|
|
96
|
+
expands to `skills/knowledges/subskills/libraries/lib-cloudflare/SUBSKILL.md`, mirroring the
|
|
97
|
+
Claude `read`/`grep` tool convention.
|
|
85
98
|
|
|
86
99
|
This package is mostly personal tooling for Curly.ng. It is intentionally opinionated,
|
|
87
100
|
small, and practical rather than a general synchronization platform.
|
|
88
101
|
|
|
89
102
|
## License
|
|
90
103
|
|
|
91
|
-
Beerware. If this helps you, support the workshop: https://curly.ng/
|
|
104
|
+
Beerware. If this helps you, support the workshop: https://curly.ng/support
|
package/dist/cli.cjs
CHANGED
|
@@ -7443,7 +7443,7 @@ var logging;
|
|
|
7443
7443
|
// src/config.ts
|
|
7444
7444
|
var import_node_crypto = require("crypto");
|
|
7445
7445
|
var import_node_process = __toESM(require("process"), 1);
|
|
7446
|
-
var packageVersion = "1.1.
|
|
7446
|
+
var packageVersion = "1.1.3";
|
|
7447
7447
|
var defaultApiBaseUrl = "https://curly.ng";
|
|
7448
7448
|
function resolveApiBaseUrl(options) {
|
|
7449
7449
|
return options.apiBaseUrl ?? import_node_process.default.env.CNGKIT_API_BASE_URL ?? defaultApiBaseUrl;
|
|
@@ -8131,8 +8131,15 @@ function parseJsonRecord(line) {
|
|
|
8131
8131
|
return void 0;
|
|
8132
8132
|
}
|
|
8133
8133
|
}
|
|
8134
|
+
function isJsonRecord(value) {
|
|
8135
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
8136
|
+
return false;
|
|
8137
|
+
}
|
|
8138
|
+
const prototype = Object.getPrototypeOf(value);
|
|
8139
|
+
return prototype === Object.prototype || prototype === null;
|
|
8140
|
+
}
|
|
8134
8141
|
function readRecord(value) {
|
|
8135
|
-
return
|
|
8142
|
+
return isJsonRecord(value) ? value : void 0;
|
|
8136
8143
|
}
|
|
8137
8144
|
function readString(value) {
|
|
8138
8145
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|