@noeis/noeis-cli 0.1.1 → 0.1.2
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/README.md +4 -7
- package/package.json +2 -2
- package/src/cli.js +24 -1
- package/src/config.js +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
# @noeis/cli
|
|
1
|
+
# @noeis/noeis-cli
|
|
2
2
|
|
|
3
3
|
Command-line client for scripting a Noeis wiki without an MCP-speaking agent.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
Current internal build:
|
|
8
|
-
|
|
9
7
|
```bash
|
|
10
|
-
|
|
11
|
-
npm i -g ./packages/cli
|
|
8
|
+
npm i -g @noeis/noeis-cli
|
|
12
9
|
```
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
This installs the `noeis` command.
|
|
15
12
|
|
|
16
13
|
## Connect an agent
|
|
17
14
|
|
|
@@ -62,7 +59,7 @@ noeis login --token ntk_at_... --api-url http://localhost:5500
|
|
|
62
59
|
You can also skip stored config and use environment variables:
|
|
63
60
|
|
|
64
61
|
```bash
|
|
65
|
-
NOEIS_TOKEN=ntk_at_... NOEIS_API_URL=https://
|
|
62
|
+
NOEIS_TOKEN=ntk_at_... NOEIS_API_URL=https://note-taker-3-unrg.onrender.com noeis pages list
|
|
66
63
|
```
|
|
67
64
|
|
|
68
65
|
Manual environment variables are useful for scripts. Runtime MCP configs should prefer `noeis mcp` so secrets remain centralized.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noeis/noeis-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Command-line client for scripting a Noeis wiki.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@noeis/wiki-mcp": "^0.1.
|
|
26
|
+
"@noeis/wiki-mcp": "^0.1.1"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=18.17"
|
package/src/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ const HELP = `Noeis CLI
|
|
|
13
13
|
Usage:
|
|
14
14
|
noeis connect [claude-code|codex|hermes|openclaw|opencode] [--label name] [--no-browser]
|
|
15
15
|
noeis mcp [--help]
|
|
16
|
-
noeis login [--token ntk_at_...] [--api-url https://
|
|
16
|
+
noeis login [--token ntk_at_...] [--api-url https://note-taker-3-unrg.onrender.com]
|
|
17
17
|
noeis pages list [--query text] [--status draft|published|archived] [--page-type type] [--limit n] [--json]
|
|
18
18
|
noeis pages get <id> [--json]
|
|
19
19
|
noeis ingest <url|file> [--title title] [--json]
|
|
@@ -27,6 +27,25 @@ Environment:
|
|
|
27
27
|
NOEIS_TOKEN, NOEIS_API_URL, NOEIS_APP_URL, NOEIS_CONFIG_DIR
|
|
28
28
|
`;
|
|
29
29
|
|
|
30
|
+
const CONNECT_HELP = `Noeis agent connect
|
|
31
|
+
|
|
32
|
+
Usage:
|
|
33
|
+
noeis connect [claude-code|codex|hermes|openclaw|opencode] [options]
|
|
34
|
+
|
|
35
|
+
Options:
|
|
36
|
+
--label <name> Label shown on the Noeis browser approval screen
|
|
37
|
+
--api-url <url> API URL, defaults to ${DEFAULT_API_URL}
|
|
38
|
+
--app-url <url> Browser approval app URL, defaults to ${DEFAULT_APP_URL}
|
|
39
|
+
--no-browser Print the approval URL without opening a browser
|
|
40
|
+
--no-config Save Noeis CLI config but do not write runtime MCP config
|
|
41
|
+
--timeout <seconds> Wait time for browser approval, defaults to 300
|
|
42
|
+
|
|
43
|
+
Examples:
|
|
44
|
+
noeis connect openclaw
|
|
45
|
+
noeis connect hermes
|
|
46
|
+
noeis connect codex --no-browser
|
|
47
|
+
`;
|
|
48
|
+
|
|
30
49
|
const optionValue = (args, name, fallback = '') => {
|
|
31
50
|
const index = args.indexOf(name);
|
|
32
51
|
if (index === -1) return fallback;
|
|
@@ -254,6 +273,10 @@ const runLogin = async (args, context) => {
|
|
|
254
273
|
};
|
|
255
274
|
|
|
256
275
|
const runConnect = async (args, context) => {
|
|
276
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
277
|
+
context.io.stdout.write(CONNECT_HELP);
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
257
280
|
const auth = resolveAuth(context);
|
|
258
281
|
const positional = compactArgs(args);
|
|
259
282
|
const runtime = normalizeRuntime(positional[0] || optionValue(args, '--runtime'));
|
package/src/config.js
CHANGED
|
@@ -2,7 +2,7 @@ import fs from 'node:fs';
|
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
|
|
5
|
-
export const DEFAULT_API_URL = 'https://
|
|
5
|
+
export const DEFAULT_API_URL = 'https://note-taker-3-unrg.onrender.com';
|
|
6
6
|
export const DEFAULT_APP_URL = 'https://www.noeis.io';
|
|
7
7
|
|
|
8
8
|
export const resolveConfigDir = ({ env = process.env } = {}) => (
|