knowingdog 0.0.0-stage → 0.2.0
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 +21 -0
- package/README.md +51 -2
- package/knowing-cli.mjs +29 -0
- package/knowing-skills.mjs +1058 -0
- package/knowing.mjs +383 -0
- package/package.json +21 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sarah Simionescu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Knowing CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The npm package is `knowingdog`; its installed command is `knowing`. Requires Node.js 24 or newer.
|
|
4
|
+
|
|
5
|
+
Install a published space in your coding project:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx knowingdog add-skill https://your-knowing-host/s/your-space
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
That installs the full space as one skill. To install one authored skill instead:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npx knowingdog add-skill https://your-knowing-host/s/your-space --skill audit-shopify
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Only root `skills/<name>/SKILL.md` folders are individual skills. Supporting documents and references are bundled, rather than installed as separate skills.
|
|
18
|
+
|
|
19
|
+
Install the source-defined agent or native plugin:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npx knowingdog add-agent https://your-knowing-host/s/your-space --agent codex
|
|
23
|
+
npx knowingdog add-agent https://your-knowing-host/s/your-space --agent claude
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Releases after 0.1.1 also accept `add-plugin` as another name for `add-agent`.
|
|
27
|
+
|
|
28
|
+
Codex and Claude plugin manifests are preserved from the published source commit. Restart your coding agent after native registration.
|
|
29
|
+
|
|
30
|
+
Set up the source-defined GitHub Action:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npx knowingdog init-ci https://your-knowing-host/s/your-space
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The command creates a pinned workflow and prints required secrets. Existing workflows are preserved. Review, commit and push the generated files.
|
|
37
|
+
|
|
38
|
+
Use `--free` for free content or `--premium` for the complete paid projection. When access is needed, the CLI signs in once if it must (approval continues to the release's access page in the same tab), prints and opens the access link, and installs the same release once the server confirms access. `--no-browser` prints the link and still waits. Revoked access and tiers that aren't for sale stop at once. Purchases require the creator's checkout to be enabled; the CLI never grants access itself. CI uses a `KNOWING_INSTALL_TOKEN` secret instead of browser sign-in; create it with `knowing login --site https://your-knowing-host --install-only | gh secret set KNOWING_INSTALL_TOKEN`.
|
|
39
|
+
|
|
40
|
+
Publishing and source-grounded docs are also available through `publish`, `sync`, `docs`, `search`, `ask`, `mcp` and `mcp-config`. Run `--help` for the command overview.
|
|
41
|
+
|
|
42
|
+
## Sign in for docs and MCP
|
|
43
|
+
|
|
44
|
+
`docs`, `search`, `ask` and `mcp` need a customer token for a member of the space or a subscriber to its top tier. Sign in once per Knowing host:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npx knowingdog login --site https://your-knowing-host
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The browser approval stores a customer token locally for 30 days, and the commands send it to that host. On another machine or in CI, set `KNOWING_CUSTOMER_TOKEN` with `KNOWING_SITE` naming the same host. `logout` removes the local token; revoke the terminal under Authorized devices to disable it. Customer-token reading, `knowing token`, `--install-only` and the `KNOWING_SITE` check arrive with the release after 0.1.1.
|
|
51
|
+
|
|
52
|
+
Node.js 24 or newer is required. See [authoring skills and source configuration](https://github.com/BrickspaceLab/knowing/blob/main/docs/knowing/release-source.md).
|
package/knowing-cli.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { main as skills } from "./knowing-skills.mjs";
|
|
3
|
+
import { main as automation } from "./knowing.mjs";
|
|
4
|
+
|
|
5
|
+
const args = process.argv.slice(2);
|
|
6
|
+
const installers = [
|
|
7
|
+
"add-skill",
|
|
8
|
+
"add-plugin",
|
|
9
|
+
"add-agent",
|
|
10
|
+
"init-ci",
|
|
11
|
+
"login",
|
|
12
|
+
"logout",
|
|
13
|
+
"token",
|
|
14
|
+
"add",
|
|
15
|
+
];
|
|
16
|
+
if (!args.length || args.includes("--help")) {
|
|
17
|
+
process.stdout.write(
|
|
18
|
+
"Knowing: add-skill, add-plugin, init-ci SPACE_URL\nOptions: --skill NAME, --agent codex|claude, --version VERSION, --free, --premium\nLogin: knowing login|logout|token --site SITE_ORIGIN\nCI install secret: knowing login --site SITE_ORIGIN --install-only\nPublishing and docs: knowing docs|search|ask|sync|publish|mcp|mcp-config --space SPACE_URL\nCreator publishing setup: knowing init-ci --space SPACE_URL\n",
|
|
19
|
+
);
|
|
20
|
+
} else {
|
|
21
|
+
const publisherSetup = args[0] === "init-ci" && args.includes("--space");
|
|
22
|
+
(installers.includes(args[0]) && !publisherSetup
|
|
23
|
+
? skills(args)
|
|
24
|
+
: automation(args)
|
|
25
|
+
).catch((error) => {
|
|
26
|
+
process.stderr.write(`${error.message}\n`);
|
|
27
|
+
process.exitCode = 1;
|
|
28
|
+
});
|
|
29
|
+
}
|