knowingfyi 0.0.0-stage → 0.3.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 +67 -2
- package/knowing-cli.mjs +31 -0
- package/knowing-skills.mjs +1074 -0
- package/knowing.mjs +389 -0
- package/package.json +23 -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,68 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Knowing CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The npm package is `knowingfyi`; its installed commands are `knowingfyi` and `knowing`. Requires Node.js 24 or newer.
|
|
4
|
+
|
|
5
|
+
The planned platform command is:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx knowingfyi add-skill 'brickspacelab/store-skills'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Bare owner/repository targets default to https://knowing.fyi on first use. An explicit --site, KNOWING_SITE, or saved login site overrides that default. Domain-qualified targets select their own HTTPS origin and resolve the owner/repository release. Explicit `/s/<project>` URLs and self-hosted origins remain supported. This package must be published and the domain configured before the platform example is usable.
|
|
12
|
+
|
|
13
|
+
Install a published project in your codebase:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx knowingfyi add-skill https://your-knowing-host/s/your-project
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
That installs the full project as one skill. To install one authored skill instead:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npx knowingfyi add-skill https://your-knowing-host/s/your-project --skill audit-shopify
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Only root `skills/<name>/SKILL.md` folders are individual skills. Supporting documents and references are bundled, rather than installed as separate skills.
|
|
26
|
+
|
|
27
|
+
Install the source-defined agent or native plugin:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npx knowingfyi add-agent https://your-knowing-host/s/your-project --agent codex
|
|
31
|
+
npx knowingfyi add-agent https://your-knowing-host/s/your-project --agent claude
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Releases after 0.1.1 also accept `add-plugin` as another name for `add-agent`.
|
|
35
|
+
|
|
36
|
+
Codex and Claude plugin manifests are preserved from the published source commit. Restart your coding agent after native registration.
|
|
37
|
+
|
|
38
|
+
Set up the source-defined GitHub Action:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
npx knowingfyi init-ci https://your-knowing-host/s/your-project
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The command creates a pinned workflow and prints required secrets. Existing workflows are preserved. Review, commit and push the generated files.
|
|
45
|
+
|
|
46
|
+
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`.
|
|
47
|
+
|
|
48
|
+
Publishing and source-grounded docs are also available through `publish`, `sync`, `docs`, `search`, `ask`, `mcp` and `mcp-config`. Run `--help` for the command overview.
|
|
49
|
+
|
|
50
|
+
## Sign in for docs and MCP
|
|
51
|
+
|
|
52
|
+
`docs`, `search`, `ask` and `mcp` need a customer token for a member of the project or a subscriber to its top tier. Sign in once per Knowing host:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
npx knowingfyi login --site https://your-knowing-host
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
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.
|
|
59
|
+
|
|
60
|
+
## When your Knowing host changes
|
|
61
|
+
|
|
62
|
+
Sign in again with `knowing login --site https://your-new-knowing-host`, then use that origin in project URLs and `--site` arguments. Saved customer logins belong to their original origin; do not copy credential files or expect a redirect to transfer the login.
|
|
63
|
+
|
|
64
|
+
Update `KNOWING_SITE`, MCP server URLs and any vendored workflow project URLs deliberately. Published 0.2.0 uses `--space` / `KNOWING_SPACE` for docs, publishing and MCP; the current source adds `--project` / `KNOWING_PROJECT` for the next release while retaining the old aliases. Check the installed version's `--help` before changing those arguments.
|
|
65
|
+
|
|
66
|
+
The CLI rejects API redirects, and publishing/install secrets have different capabilities from customer logins. Existing self-hosted and local origins remain supported. Operators can use the [platform domain cutover runbook](https://github.com/BrickspaceLab/knowing/blob/main/docs/knowing/platform-domain-cutover.md) to plan compatibility and rollback.
|
|
67
|
+
|
|
68
|
+
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,31 @@
|
|
|
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 PROJECT_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 --project PROJECT_URL\nCreator publishing setup: knowing init-ci --project PROJECT_URL\n",
|
|
19
|
+
);
|
|
20
|
+
} else {
|
|
21
|
+
const publisherSetup =
|
|
22
|
+
args[0] === "init-ci" &&
|
|
23
|
+
(args.includes("--project") || args.includes("--space"));
|
|
24
|
+
(installers.includes(args[0]) && !publisherSetup
|
|
25
|
+
? skills(args)
|
|
26
|
+
: automation(args)
|
|
27
|
+
).catch((error) => {
|
|
28
|
+
process.stderr.write(`${error.message}\n`);
|
|
29
|
+
process.exitCode = 1;
|
|
30
|
+
});
|
|
31
|
+
}
|