@inferhub/helper 0.2.0 → 0.2.1
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/dist/cli.js +42 -42
- package/dist/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/package.json +61 -61
package/dist/cli.js
CHANGED
|
@@ -4,49 +4,49 @@ import { applyToAgents, installUsagePlugins, listAdapters, resetAgents, statusAl
|
|
|
4
4
|
import { validateApiKey } from "./validate.js";
|
|
5
5
|
import { normalizeBaseUrl } from "./fsutil.js";
|
|
6
6
|
import { canRunInteractive, runInteractiveWizard } from "./interactive.js";
|
|
7
|
-
const VERSION = "0.2.
|
|
7
|
+
const VERSION = "0.2.1";
|
|
8
8
|
function printHelp() {
|
|
9
|
-
console.log(`
|
|
10
|
-
${PROVIDER_NAME} Helper v${VERSION}
|
|
11
|
-
Point coding agents at ${DEFAULT_BASE_URL}
|
|
12
|
-
|
|
13
|
-
Usage:
|
|
14
|
-
inferhub-helper Interactive wizard (default)
|
|
15
|
-
inferhub-helper setup Same as interactive wizard
|
|
16
|
-
inferhub-helper apply [opts] Non-interactive apply
|
|
17
|
-
inferhub-helper plugins [opts] Install usage plugins (statusline / hooks)
|
|
18
|
-
inferhub-helper status Show agent config status
|
|
19
|
-
inferhub-helper reset [opts] Remove InferHub settings
|
|
20
|
-
inferhub-helper validate --key K Check key via GET /v1/models
|
|
21
|
-
inferhub-helper list List supported agents
|
|
22
|
-
inferhub-helper help This help
|
|
23
|
-
|
|
24
|
-
Interactive flow:
|
|
25
|
-
1. Enter API key → validated against /v1/models
|
|
26
|
-
2. Select agents → multi-select (space to toggle)
|
|
27
|
-
3. Search models → type to filter, enter to pick
|
|
28
|
-
4. Confirm → write configs
|
|
29
|
-
5. Usage plugins → optional Claude/Codex/OpenCode usage statusline
|
|
30
|
-
|
|
31
|
-
Options:
|
|
32
|
-
--key, -k <key> InferHub API key (sk-airo-…)
|
|
33
|
-
--base-url <url> Default: ${DEFAULT_BASE_URL}
|
|
34
|
-
--model, -m <id> Primary model id from /v1/models
|
|
35
|
-
--subagent-model <id> Secondary model (Codex/OpenCode subagent)
|
|
36
|
-
--agents <list> Comma list or "all" / "installed"
|
|
37
|
-
--models <list> Extra model ids (OpenCode/OpenClaw)
|
|
38
|
-
--plugins [list] Install usage plugins: claude,codex,opencode (or "all")
|
|
39
|
-
--no-plugins Skip usage-plugin install in apply/wizard
|
|
40
|
-
--dry-run Print actions without writing
|
|
41
|
-
--yes, -y Skip confirmation (non-interactive apply)
|
|
42
|
-
--json Machine-readable output
|
|
43
|
-
|
|
44
|
-
Examples:
|
|
45
|
-
npx @inferhub/helper
|
|
46
|
-
inferhub-helper setup
|
|
47
|
-
inferhub-helper apply -k sk-airo-… -m grok-4.5 --agents claude,codex -y --plugins all
|
|
48
|
-
inferhub-helper plugins --plugins claude,opencode
|
|
49
|
-
inferhub-helper status
|
|
9
|
+
console.log(`
|
|
10
|
+
${PROVIDER_NAME} Helper v${VERSION}
|
|
11
|
+
Point coding agents at ${DEFAULT_BASE_URL}
|
|
12
|
+
|
|
13
|
+
Usage:
|
|
14
|
+
inferhub-helper Interactive wizard (default)
|
|
15
|
+
inferhub-helper setup Same as interactive wizard
|
|
16
|
+
inferhub-helper apply [opts] Non-interactive apply
|
|
17
|
+
inferhub-helper plugins [opts] Install usage plugins (statusline / hooks)
|
|
18
|
+
inferhub-helper status Show agent config status
|
|
19
|
+
inferhub-helper reset [opts] Remove InferHub settings
|
|
20
|
+
inferhub-helper validate --key K Check key via GET /v1/models
|
|
21
|
+
inferhub-helper list List supported agents
|
|
22
|
+
inferhub-helper help This help
|
|
23
|
+
|
|
24
|
+
Interactive flow:
|
|
25
|
+
1. Enter API key → validated against /v1/models
|
|
26
|
+
2. Select agents → multi-select (space to toggle)
|
|
27
|
+
3. Search models → type to filter, enter to pick
|
|
28
|
+
4. Confirm → write configs
|
|
29
|
+
5. Usage plugins → optional Claude/Codex/OpenCode usage statusline
|
|
30
|
+
|
|
31
|
+
Options:
|
|
32
|
+
--key, -k <key> InferHub API key (sk-airo-…)
|
|
33
|
+
--base-url <url> Default: ${DEFAULT_BASE_URL}
|
|
34
|
+
--model, -m <id> Primary model id from /v1/models
|
|
35
|
+
--subagent-model <id> Secondary model (Codex/OpenCode subagent)
|
|
36
|
+
--agents <list> Comma list or "all" / "installed"
|
|
37
|
+
--models <list> Extra model ids (OpenCode/OpenClaw)
|
|
38
|
+
--plugins [list] Install usage plugins: claude,codex,opencode (or "all")
|
|
39
|
+
--no-plugins Skip usage-plugin install in apply/wizard
|
|
40
|
+
--dry-run Print actions without writing
|
|
41
|
+
--yes, -y Skip confirmation (non-interactive apply)
|
|
42
|
+
--json Machine-readable output
|
|
43
|
+
|
|
44
|
+
Examples:
|
|
45
|
+
npx @inferhub/helper
|
|
46
|
+
inferhub-helper setup
|
|
47
|
+
inferhub-helper apply -k sk-airo-… -m grok-4.5 --agents claude,codex -y --plugins all
|
|
48
|
+
inferhub-helper plugins --plugins claude,opencode
|
|
49
|
+
inferhub-helper status
|
|
50
50
|
`.trim());
|
|
51
51
|
}
|
|
52
52
|
function parseArgs(argv) {
|
package/dist/constants.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ export declare const CLAUDE_ENV_KEYS: readonly ["ANTHROPIC_BASE_URL", "ANTHROPIC
|
|
|
13
13
|
export declare const DEFAULT_API_TIMEOUT_MS = "600000";
|
|
14
14
|
/** Published packages that power usage plugins / statusline. */
|
|
15
15
|
export declare const USAGE_CLIENT_PKG = "@inferhub/usage-client";
|
|
16
|
-
export declare const USAGE_OPENCODE_PKG = "opencode-
|
|
16
|
+
export declare const USAGE_OPENCODE_PKG = "@inferhub/opencode-usage";
|
|
17
17
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,gCAAgC,CAAC;AAE9D,8CAA8C;AAC9C,eAAO,MAAM,WAAW,aAAa,CAAC;AAEtC,uDAAuD;AACvD,eAAO,MAAM,aAAa,aAAa,CAAC;AAExC,yDAAyD;AACzD,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AAEnD,sCAAsC;AACtC,eAAO,MAAM,eAAe,uPAUlB,CAAC;AAEX,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAE/C,gEAAgE;AAChE,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AACzD,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,gCAAgC,CAAC;AAE9D,8CAA8C;AAC9C,eAAO,MAAM,WAAW,aAAa,CAAC;AAEtC,uDAAuD;AACvD,eAAO,MAAM,aAAa,aAAa,CAAC;AAExC,yDAAyD;AACzD,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AAEnD,sCAAsC;AACtC,eAAO,MAAM,eAAe,uPAUlB,CAAC;AAEX,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAE/C,gEAAgE;AAChE,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AACzD,eAAO,MAAM,kBAAkB,6BAA6B,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -23,5 +23,5 @@ export const CLAUDE_ENV_KEYS = [
|
|
|
23
23
|
export const DEFAULT_API_TIMEOUT_MS = "600000";
|
|
24
24
|
/** Published packages that power usage plugins / statusline. */
|
|
25
25
|
export const USAGE_CLIENT_PKG = "@inferhub/usage-client";
|
|
26
|
-
export const USAGE_OPENCODE_PKG = "opencode-
|
|
26
|
+
export const USAGE_OPENCODE_PKG = "@inferhub/opencode-usage";
|
|
27
27
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AAE9D,8CAA8C;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;AAEtC,uDAAuD;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;AAExC,yDAAyD;AACzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAEpD,qDAAqD;AACrD,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAEnD,sCAAsC;AACtC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,oBAAoB;IACpB,sBAAsB;IACtB,mBAAmB;IACnB,8BAA8B;IAC9B,gCAAgC;IAChC,+BAA+B;IAC/B,+BAA+B;IAC/B,iBAAiB;IACjB,gBAAgB;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AAE/C,gEAAgE;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AAE9D,8CAA8C;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;AAEtC,uDAAuD;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;AAExC,yDAAyD;AACzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAEpD,qDAAqD;AACrD,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAEnD,sCAAsC;AACtC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,oBAAoB;IACpB,sBAAsB;IACtB,mBAAmB;IACnB,8BAA8B;IAC9B,gCAAgC;IAChC,+BAA+B;IAC/B,+BAA+B;IAC/B,iBAAiB;IACjB,gBAAgB;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AAE/C,gEAAgE;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,0BAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@inferhub/helper",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Point coding agents and IDEs at InferHub
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"bin": {
|
|
15
|
-
"inferhub-helper": "dist/cli.js",
|
|
16
|
-
"ih-helper": "dist/cli.js"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"dist",
|
|
20
|
-
"README.md",
|
|
21
|
-
"LICENSE"
|
|
22
|
-
],
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "tsc -p tsconfig.json",
|
|
25
|
-
"dev": "tsc -p tsconfig.json --watch",
|
|
26
|
-
"test": "node --import tsx --test tests/**/*.test.ts",
|
|
27
|
-
"prepublishOnly": "npm run build",
|
|
28
|
-
"start": "node dist/cli.js"
|
|
29
|
-
},
|
|
30
|
-
"engines": {
|
|
31
|
-
"node": ">=18.0.0"
|
|
32
|
-
},
|
|
33
|
-
"keywords": [
|
|
34
|
-
"inferhub",
|
|
35
|
-
"ai",
|
|
36
|
-
"claude",
|
|
37
|
-
"codex",
|
|
38
|
-
"opencode",
|
|
39
|
-
"hermes",
|
|
40
|
-
"openclaw",
|
|
41
|
-
"openai-compatible",
|
|
42
|
-
"cli"
|
|
43
|
-
],
|
|
44
|
-
"license": "MIT",
|
|
45
|
-
"repository": {
|
|
46
|
-
"type": "git",
|
|
47
|
-
"url": "git+https://github.com/inferhub/helper.git"
|
|
48
|
-
},
|
|
49
|
-
"homepage": "https://inferhub.dev",
|
|
50
|
-
"publishConfig": {
|
|
51
|
-
"access": "public"
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@types/node": "^22.15.0",
|
|
55
|
-
"tsx": "^4.19.0",
|
|
56
|
-
"typescript": "^5.8.0"
|
|
57
|
-
},
|
|
58
|
-
"dependencies": {
|
|
59
|
-
"@inquirer/prompts": "^7.10.1"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@inferhub/helper",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Point coding agents and IDEs at InferHub \u2014 Claude Code, Codex, OpenCode, Hermes, OpenClaw, and more. Optionally install usage statusline plugins.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"inferhub-helper": "dist/cli.js",
|
|
16
|
+
"ih-helper": "dist/cli.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc -p tsconfig.json",
|
|
25
|
+
"dev": "tsc -p tsconfig.json --watch",
|
|
26
|
+
"test": "node --import tsx --test tests/**/*.test.ts",
|
|
27
|
+
"prepublishOnly": "npm run build",
|
|
28
|
+
"start": "node dist/cli.js"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18.0.0"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"inferhub",
|
|
35
|
+
"ai",
|
|
36
|
+
"claude",
|
|
37
|
+
"codex",
|
|
38
|
+
"opencode",
|
|
39
|
+
"hermes",
|
|
40
|
+
"openclaw",
|
|
41
|
+
"openai-compatible",
|
|
42
|
+
"cli"
|
|
43
|
+
],
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git+https://github.com/inferhub/helper.git"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://inferhub.dev",
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": "^22.15.0",
|
|
55
|
+
"tsx": "^4.19.0",
|
|
56
|
+
"typescript": "^5.8.0"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@inquirer/prompts": "^7.10.1"
|
|
60
|
+
}
|
|
61
|
+
}
|