@vibeapi/cli 0.0.86 → 0.0.88
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 +3 -1
- package/dist/commands/setup.d.ts +40 -5
- package/dist/commands/setup.js +1 -1
- package/dist/lib/program.js +1 -1
- package/dist/locales/en_US.json +11 -6
- package/dist/locales/zh_CN.json +11 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,12 +46,14 @@ npx --yes --registry https://npm.cnb.cool/vibeapi/npm/-/packages/ @vibeapi/cli@l
|
|
|
46
46
|
vibecli setup --key sk-xxx
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
`--key` 会按令牌能访问的模型分组自动配置:有 Claude 模型配 Claude Code(机器上装了 Claude Desktop 也一并配好)、有 GPT 模型配 Codex、有 Grok 模型配 Grok Build
|
|
49
|
+
`--key` 会按令牌能访问的模型分组自动配置:有 Claude 模型配 Claude Code(机器上装了 Claude Desktop 也一并配好)、有 GPT 模型配 Codex、有 Grok 模型配 Grok Build、有 Gemini 模型配 Antigravity CLI(`agy`)。没装的工具也会先写好配置,并给出安装命令(Claude Desktop 除外,要先装好)。拿到的是多个分组的令牌(如 Claude 分组 + GPT 分组 + Grok 分组),就各配各的:
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
52
|
vibecli setup --claudekey sk-a --codexkey sk-b --grokkey sk-c --desktopkey sk-d
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
每个工具都能单独给 Key:`--claudekey`、`--codexkey`、`--grokkey`、`--desktopkey`、`--agykey`、`--openclawkey`、`--hermeskey`、`--atomcodekey`。
|
|
56
|
+
|
|
55
57
|
Codex 同时开启 1M 上下文时,末尾加最短参数 `--1m`;已经配置过的用户无需再次输入 Key。单独执行 `--1m` 只重新生成模型目录里的上下文设置,不改写 Codex 凭据:
|
|
56
58
|
|
|
57
59
|
```bash
|
package/dist/commands/setup.d.ts
CHANGED
|
@@ -28,12 +28,47 @@
|
|
|
28
28
|
*
|
|
29
29
|
* 重复执行即换令牌(幂等)。模型一律用默认组合,之后可在向导 / tool-model 里改。
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Per-tool keys: `--<option>` stores a key used by that tool only. `need` is the model family
|
|
33
|
+
* the key must reach (checked against its /v1/models); `any` = just a valid key (single-model
|
|
34
|
+
* tools that can run GPT or Claude models). The CLI options and their help come from this table.
|
|
35
|
+
*/
|
|
36
|
+
export declare const DEDICATED_KEYS: readonly [{
|
|
37
|
+
readonly option: "claudekey";
|
|
38
|
+
readonly tool: "claude-code";
|
|
39
|
+
readonly need: "claude";
|
|
40
|
+
}, {
|
|
41
|
+
readonly option: "codexkey";
|
|
42
|
+
readonly tool: "codex";
|
|
43
|
+
readonly need: "gpt";
|
|
44
|
+
}, {
|
|
45
|
+
readonly option: "grokkey";
|
|
46
|
+
readonly tool: "grok";
|
|
47
|
+
readonly need: "grok";
|
|
48
|
+
}, {
|
|
49
|
+
readonly option: "desktopkey";
|
|
50
|
+
readonly tool: "claude-desktop";
|
|
51
|
+
readonly need: "claude";
|
|
52
|
+
}, {
|
|
53
|
+
readonly option: "agykey";
|
|
54
|
+
readonly tool: "agy";
|
|
55
|
+
readonly need: "gemini";
|
|
56
|
+
}, {
|
|
57
|
+
readonly option: "openclawkey";
|
|
58
|
+
readonly tool: "openclaw";
|
|
59
|
+
readonly need: "any";
|
|
60
|
+
}, {
|
|
61
|
+
readonly option: "hermeskey";
|
|
62
|
+
readonly tool: "hermes";
|
|
63
|
+
readonly need: "any";
|
|
64
|
+
}, {
|
|
65
|
+
readonly option: "atomcodekey";
|
|
66
|
+
readonly tool: "atomcode";
|
|
67
|
+
readonly need: "any";
|
|
68
|
+
}];
|
|
69
|
+
export type DedicatedKeyOption = (typeof DEDICATED_KEYS)[number]['option'];
|
|
70
|
+
export interface SetupCommandOptions extends Partial<Record<DedicatedKeyOption, string>> {
|
|
32
71
|
key?: string;
|
|
33
|
-
claudekey?: string;
|
|
34
|
-
codexkey?: string;
|
|
35
|
-
grokkey?: string;
|
|
36
|
-
desktopkey?: string;
|
|
37
72
|
all?: boolean;
|
|
38
73
|
oneMillion?: boolean;
|
|
39
74
|
/** `on` = keep the Claude.ai sign-in entry visible in Claude Desktop; `off` = hide it. */
|
package/dist/commands/setup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"chalk";import{getAdapter as o}from"../lib/tools/registry.js";import{postApplyPrompts as t}from"../lib/post-apply.js";import{ensureReachableGatewayAddress as
|
|
1
|
+
import e from"chalk";import{getAdapter as o}from"../lib/tools/registry.js";import{postApplyPrompts as t}from"../lib/post-apply.js";import{ensureReachableGatewayAddress as i}from"./base.js";import{i18n as s}from"../lib/i18n.js";import{configManager as a}from"../lib/config.js";import{toolManager as l,SUPPORTED_TOOLS as n}from"../lib/tool-manager.js";import{validateApiKey as r,fetchModels as d}from"../lib/api-validator.js";import{CODEX_ONE_MILLION_CONTEXT_SETTING as p,setCodexOneMillionContext as c}from"../lib/tools/codex.js";import{resolveModelCatalog as u}from"../lib/model-catalog.js";import{CLAUDE_DESKTOP_FORCE_REGISTRY_SETTING as f,CLAUDE_DESKTOP_HIDE_OFFICIAL_LOGIN_SETTING as m}from"../lib/tools/claude-desktop.js";export const DEDICATED_KEYS=[{option:"claudekey",tool:"claude-code",need:"claude"},{option:"codexkey",tool:"codex",need:"gpt"},{option:"grokkey",tool:"grok",need:"grok"},{option:"desktopkey",tool:"claude-desktop",need:"claude"},{option:"agykey",tool:"agy",need:"gemini"},{option:"openclawkey",tool:"openclaw",need:"any"},{option:"hermeskey",tool:"hermes",need:"any"},{option:"atomcodekey",tool:"atomcode",need:"any"}];async function g(e){const o=await d(e);if(!o.ok)return{hasClaude:!0,hasGpt:!0,hasGrok:!0,hasGemini:!0,probed:!1};const t=o.models.map(e=>e.toLowerCase());return{hasClaude:t.some(e=>e.includes("claude")),hasGpt:t.some(e=>e.startsWith("gpt")||e.includes("gpt-")||/^o\d/.test(e)),hasGrok:t.some(e=>e.includes("grok")),hasGemini:t.some(e=>e.startsWith("gemini")),probed:!0}}function y(e,o){switch(o){case"claude":return e.hasClaude;case"gpt":return e.hasGpt;case"grok":return e.hasGrok;case"gemini":return e.hasGemini;default:return!0}}export function parseOnOff(e){const o=(e??"").trim().toLowerCase();return!!["on","true","show","1","yes","y"].includes(o)||!["off","false","hide","0","no","n"].includes(o)&&void 0}function k(o){console.log(e.green(o))}function _(o){console.log(e.yellow(o))}function b(o){console.error(e.red(o))}async function h(o,t){console.log(e.gray(s.t("setup.validating",{label:o})));const i=await r(t);return!!i.valid||(b(s.t("setup.invalid_key",{label:o,reason:i.message||i.error||"invalid"})),"network_error"===i.error&&_(s.t("base.network_hint")),!1)}async function x(o,t,i={}){const{oneMillion:r,officialLogin:d,desktopRegistry:c,force:u}=i,g=n[o];try{"claude-desktop"===o&&void 0!==c&&a.setToolSetting("claude-desktop",f,c),"codex"===o&&void 0!==r&&a.setToolSetting("codex",p,r),"claude-desktop"===o&&void 0!==d&&a.setToolSetting("claude-desktop",m,!d),await l.applyPrivateConfig(o,t,a.getModelsForTool(o),{force:u})}catch(e){const o=(e instanceof Error?e.message:String(e)).replace(/\s+/g," ").trim();return b("× "+s.t("setup.apply_failed",{tool:g.displayName,reason:o})),!1}return l.printApplied(o),u&&console.log(e.gray(" "+s.t("config.force_done",{tool:g.displayName}))),"codex"===o&&void 0!==r&&console.log(e.gray(" "+s.t(r?"setup.codex_1m_enabled":"setup.codex_1m_disabled"))),l.isToolInstalled(o)||console.log(e.yellow(" ! "+s.t("setup.install_hint",{tool:g.displayName,install:g.installCommand}))),!0}export async function setupCommand(e){const r=e.key?.trim(),d=DEDICATED_KEYS.map(o=>({...o,apiKey:e[o.option]?.trim()})).filter(e=>Boolean(e.apiKey)),f=void 0!==e.oneMillion,m=void 0!==e.claudeOfficial;let v;if(m&&(v=parseOnOff(e.claudeOfficial),void 0===v))return b(s.t("setup.claude_official_invalid",{value:String(e.claudeOfficial)})),void(process.exitCode=1);const w=void 0!==e.desktopRegistry;let C;if(w&&(C=parseOnOff(e.desktopRegistry),void 0===C))return b(s.t("setup.desktop_registry_invalid",{value:String(e.desktopRegistry)})),void(process.exitCode=1);const G=m||w,K=Boolean(r||d.length>0),M={oneMillion:e.oneMillion,officialLogin:v,desktopRegistry:C,force:e.force};if(!K&&(f||G)){if(f){const o=a.getApiKeyForTool("codex");if(o)try{const t=!0===e.oneMillion;a.setToolSetting("codex",p,t);const i=await u(o);c(t,i??void 0),k(s.t(t?"setup.codex_1m_enabled":"setup.codex_1m_disabled"))}catch(e){b(s.t("setup.apply_failed",{tool:n.codex.displayName,reason:e instanceof Error?e.message:String(e)})),process.exitCode=1}else b(s.t("setup.codex_1m_missing_key")),process.exitCode=1}if(G){const e=a.getApiKeyForTool("claude-desktop");e?await x("claude-desktop",e,{...M,oneMillion:void 0})?await t(["claude-desktop"]):process.exitCode=1:(b(s.t("setup.desktop_official_login_missing_key")),process.exitCode=1)}return}if(!K)return b(s.t("setup.usage")),void(process.exitCode=1);await i(r||d[0].apiKey);let S=0,T=0;const j=new Set,O=d.map(e=>({tool:e.tool,label:`--${e.option}`,apiKey:e.apiKey,need:e.need}));for(const e of O){if(!await h(e.label,e.apiKey)){T+=1;continue}const o=await g(e.apiKey);!o.probed||y(o,e.need)?(o.probed||_(s.t("setup.probe_failed",{label:e.label})),a.setToolApiKey(e.tool,e.apiKey),await x(e.tool,e.apiKey,M)?(S+=1,j.add(e.tool)):T+=1):(b(s.t(`setup.key_no_${e.need}`,{label:e.label,tool:n[e.tool].displayName})),T+=1)}if(r){if(!await h("--key",r))return void(process.exitCode=1);a.setApiKey(r);const e=await g(r);if(e.probed||_(s.t("setup.probe_failed",{label:"--key"})),e.probed&&!e.hasClaude&&!e.hasGpt&&!e.hasGrok&&!e.hasGemini)return b(s.t("setup.key_no_family")),void(process.exitCode=1);const o=[{tool:"claude-code",capable:e.hasClaude,skipMsg:s.t("setup.skip_no_claude")},{tool:"codex",capable:e.hasGpt,skipMsg:s.t("setup.skip_no_gpt")},{tool:"grok",capable:e.hasGrok,skipMsg:s.t("setup.skip_no_grok")},{tool:"claude-desktop",capable:e.hasClaude&&l.isToolInstalled("claude-desktop"),skipMsg:s.t("setup.skip_desktop_not_installed"),quiet:!e.hasClaude},{tool:"agy",capable:e.hasGemini,skipMsg:s.t("setup.skip_no_gemini")}];for(const e of o)j.has(e.tool)||(e.capable?await x(e.tool,r,M)?(S+=1,j.add(e.tool)):T+=1:e.quiet||_(e.skipMsg))}if(S>0){const e=[...j].filter(e=>!o(e)?.isInstalled).map(e=>n[e]?.command).filter(Boolean).join(" / "),t=s.t("setup.done",{count:String(S)});k("\n"+(e?`${t}${s.t("setup.done_commands",{commands:e})}`:t))}T>0&&b(s.t("setup.failed_summary",{count:String(T)})),await t([...j]),(T>0||0===S)&&(process.exitCode=1)}
|
package/dist/lib/program.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Command as e}from"commander";import{readFileSync as o}from"fs";import{join as t,dirname as i}from"path";import{fileURLToPath as s}from"url";import{i18n as a}from"./i18n.js";import{wizard as n}from"./wizard.js";import{SUPPORTED_TOOLS as c}from"./tool-manager.js";import{DEFAULT_BASE_URL as l}from"./config.js";import{attachCommandHelp as r,helpConfiguration as p}from"./cli-help.js";import{langCommand as m,authCommand as u,doctorCommand as d,configCommand as b,statusCommand as g}from"../commands/index.js";import{logsCommand as f}from"../commands/logs.js";import{completionCommand as x}from"../commands/completion.js";import{benchCommand as v}from"../commands/bench.js";import{updateCommand as y}from"../commands/update.js";import{upgradeCommand as k}from"../commands/upgrade.js";import{codexSessionsCommand as h}from"../commands/codex-sessions.js";import{setupCommand as _}from"../commands/setup.js";import{baseCommand as w}from"../commands/base.js";function j(e,o){return a.t(`help.${e}`,o)}function G(e,o){return{command:e,note:j(o)}}function O(e){const o=j(e);return o===`help.${e}`?"":o}function z(e,o=[]){return{when:O(`${e}.when`),prerequisites:O(`${e}.needs`).split("\n").filter(Boolean),alternatives:o.map(([e,o])=>G(e,o))}}function C(e){return e.helpCommand("help [command]",j("help_command"))}export function buildProgram(){const a=new e;a.name("vibecli").summary(j("root.summary")).description(j("root.description")).configureHelp(p()).allowExcessArguments(!0).optionsGroup(j("group.global_options")).helpOption("-h, --help",j("global.help")).version(function(){try{const e=i(s(import.meta.url));return JSON.parse(o(t(e,"../../package.json"),"utf-8")).version}catch{return"1.0.0"}}(),"-v, --version",j("global.version")).option("--base <url>",j("global.base")).option("--non-interactive",j("global.non_interactive")).option("--json",j("global.json")).option("-y, --yes",j("global.yes")).option("--dry-run",j("global.dry_run")).option("--no-color",j("global.no_color")),a.commandsGroup(j("group.configure"));const O=a.command("setup").summary(j("setup.summary")).description(j("setup.description")).option("--key <key>",j("setup.opt.key")).option("--claudekey <key>",j("setup.opt.claudekey")).option("--codexkey <key>",j("setup.opt.codexkey")).option("--grokkey <key>",j("setup.opt.grokkey")).option("--desktopkey <key>",j("setup.opt.desktopkey")).option("--1m",j("setup.opt.one_m")).option("--no-1m",j("setup.opt.no_one_m")).option("--claude-official <on|off>",j("setup.opt.claude_official")).option("--desktop-registry <on|off>",j("setup.opt.desktop_registry")).option("--force",j("setup.opt.force")).option("--all",j("setup.opt.all")).action(async e=>{await _({key:e.key,claudekey:e.claudekey,codexkey:e.codexkey,grokkey:e.grokkey,desktopkey:e.desktopkey,all:e.all,oneMillion:e["1m"],claudeOfficial:e.claudeOfficial,desktopRegistry:e.desktopRegistry,force:e.force})});r(O,{...z("setup",[["vibecli init","setup.alt.init"],["vibecli config <tool>","setup.alt.config"],["vibecli auth <key>","setup.alt.auth"]]),sections:[{title:j("setup.autodetect_title"),rows:[["Claude",j("setup.autodetect.claude")],["GPT",j("setup.autodetect.gpt")],["Grok",j("setup.autodetect.grok")],["Gemini",j("setup.autodetect.gemini")]]}],examples:[G("vibecli setup --key sk-xxx","setup.ex.key"),G("vibecli setup --claudekey sk-a --codexkey sk-b","setup.ex.split"),G("vibecli setup --desktopkey sk-d --claude-official off","setup.ex.desktop"),G("vibecli setup --key sk-xxx --force","setup.ex.force"),G("vibecli setup --key sk-xxx --base https://www.vibeapi.si","setup.ex.base")]});const $=a.command("init").summary(j("init.summary")).description(j("init.description")).action(async()=>{await n.runFirstTimeSetup()});r($,{...z("init",[["vibecli setup --key <key>","init.alt.setup"],["vibecli","init.alt.menu"]]),examples:[G("vibecli init","init.ex.run"),G("vibecli init --base https://www.vibeapi.si","init.ex.base"),G("vibecli","init.ex.menu")]});const N=a.command("auth").summary(j("auth.summary")).description(j("auth.description")).argument("[token]",j("auth.arg.token")).action(async e=>{const o=[];e&&o.push(e),await u(o)});C(N);const S=N.command("revoke").description(j("auth.revoke")).action(async()=>{await u(["revoke"])});r(S,{examples:[G("vibecli auth revoke","auth.ex.revoke_ask"),G("vibecli auth revoke --yes","auth.ex.revoke")]});const A=N.command("reload <tool>").description(j("auth.reload")).action(async e=>{await u(["reload",e])});r(A,{examples:[G("vibecli auth reload claude-code","auth.ex.reload"),G("vibecli auth reload claude-code --json","auth.ex.reload_json")]}),r(N,{...z("auth",[["vibecli setup --key <key>","auth.alt.setup"]]),examples:[G("vibecli auth","auth.ex.prompt"),G("vibecli auth sk-xxx --non-interactive","auth.ex.save"),G("vibecli auth revoke --yes","auth.ex.revoke"),G("vibecli auth reload claude-code","auth.ex.reload")]});const M=a.command("config").summary(j("config.summary")).description(j("config.description")).argument("[args...]",j("config.arg.args")).option("-f, --force",j("config.opt.force")).allowUnknownOption(!0).action(async(e=[],o={})=>{await b(o.force?[...e,"--force"]:e)});r(M,{...z("config",[["vibecli setup --key <key> --force","config.alt.setup"],["vibecli status","config.alt.status"]]),sections:[{title:j("config.subcommands_title"),rows:[["<tool>",j("config.sub.tool")],["<tool> --force",j("config.sub.tool_force")],["<tool> --non-interactive",j("config.sub.tool_non_interactive")],["<tool> restore",j("config.sub.tool_restore")],["<tool> backups",j("config.sub.tool_backups")],["<tool> clear-model",j("config.sub.tool_clear_model")],["tool-model list",j("config.sub.tool_model_list")],["tool-model set <tool> [slot] <model>",j("config.sub.tool_model_set")],["tool-model clear <tool>",j("config.sub.tool_model_clear")],["profile list",j("config.sub.profile_list")],["profile create <name>",j("config.sub.profile_create")],["profile use <name>",j("config.sub.profile_use")],["profile delete <name>",j("config.sub.profile_delete")],["preset list",j("config.sub.preset_list")],["preset save <name>",j("config.sub.preset_save")],["preset use <name>",j("config.sub.preset_use")],["preset delete <name>",j("config.sub.preset_delete")],["backup list",j("config.sub.backup_list")],["backup create [label]",j("config.sub.backup_create")],["backup restore <name>",j("config.sub.backup_restore")]]},{title:j("config.tools_title"),rows:Object.values(c).filter(e=>!e.hidden).map(e=>[e.name,e.displayName])}],examples:[G("vibecli config codex","config.ex.menu"),G("vibecli config claude-code --force","config.ex.force"),G("vibecli config tool-model set codex gpt-6-astra","config.ex.tool_model"),G("vibecli config profile create work","config.ex.profile"),G("vibecli config backup create before-upgrade","config.ex.backup")]});const P=a.command("base").summary(j("base.summary")).description(j("base.description")).argument("[target]",j("base.arg.target")).action(async e=>{await w(e)});r(P,{...z("base",[["vibecli doctor","base.alt.doctor"],["vibecli bench","base.alt.bench"]]),sections:[{title:j("base.targets_title"),rows:[[j("base.target.none_term"),j("base.target.none")],[j("base.target.index_term"),j("base.target.index")],[j("base.target.url_term"),j("base.target.url")],["auto",j("base.target.auto")],["default",j("base.target.default",{url:l})]]}],examples:[G("vibecli base","base.ex.list"),G("vibecli base auto","base.ex.auto"),G("vibecli base 2","base.ex.index"),G("vibecli base https://www.vibeapi.si","base.ex.url"),G("vibecli base default","base.ex.default")]}),a.commandsGroup(j("group.diagnose"));const R=a.command("status").summary(j("status.summary")).description(j("status.description")).action(async()=>{await g()});r(R,{...z("status",[["vibecli doctor","status.alt.doctor"]]),examples:[G("vibecli status","status.ex.show"),G("vibecli status --json","status.ex.json")]});const T=a.command("doctor").summary(j("doctor.summary")).description(j("doctor.description")).option("--deep",j("doctor.opt.deep")).action(async e=>{await d({deep:e.deep})});r(T,{...z("doctor",[["vibecli base auto","doctor.alt.base"],["vibecli logs tail","doctor.alt.logs"]]),examples:[G("vibecli doctor","doctor.ex.run"),G("vibecli doctor --deep","doctor.ex.deep")]});const U=a.command("bench").summary(j("bench.summary")).description(j("bench.description")).option("--samples <n>",j("bench.opt.samples"),"5").action(async e=>{const o=[];e.samples&&o.push("--samples",e.samples),await v(o)});r(U,{...z("bench",[["vibecli base","bench.alt.base"]]),examples:[G("vibecli bench","bench.ex.run"),G("vibecli bench --samples 3","bench.ex.samples"),G("vibecli bench --json","bench.ex.json")]});const q=a.command("logs").summary(j("logs.summary")).description(j("logs.description")).argument("[action]",j("logs.arg.action")).argument("[file]",j("logs.arg.file")).action(async(e,o)=>{const t=[];e&&t.push(e),o&&t.push(o),await f(t)});r(q,{...z("logs",[["vibecli doctor","logs.alt.doctor"]]),sections:[{title:j("logs.actions_title"),rows:[["list",j("logs.action.list")],["tail [file]",j("logs.action.tail")],["path",j("logs.action.path")]]}],examples:[G("vibecli logs","logs.ex.list"),G("vibecli logs tail","logs.ex.tail"),G("vibecli logs path","logs.ex.path")]}),a.commandsGroup(j("group.maintain"));const B=a.command("upgrade").summary(j("upgrade.summary")).description(j("upgrade.description")).argument("[tools...]",j("upgrade.arg.tools")).action(async(e=[])=>{await k(e)});r(B,{...z("upgrade",[["vibecli update","upgrade.alt.update"]]),examples:[G("vibecli upgrade","upgrade.ex.all"),G("vibecli upgrade claude-code","upgrade.ex.one"),G("vibecli upgrade codex agy","upgrade.ex.many")]});const E=a.command("update").summary(j("update.summary")).description(j("update.description")).action(async()=>{await y()});r(E,{...z("update",[["vibecli upgrade","update.alt.upgrade"]]),examples:[G("vibecli update","update.ex.check"),G("vibecli update --json","update.ex.json")]});const F=a.command("codex").summary(j("codex.summary")).description(j("codex.description"));C(F);const H=F.command("sessions").summary(j("codex_sessions.summary")).description(j("codex_sessions.description")).option("--to <provider>",j("codex_sessions.opt.to")).option("--undo <dir>",j("codex_sessions.opt.undo")).action(async e=>{await h(e)});r(F,{...z("codex"),examples:[G("vibecli codex sessions","codex_sessions.ex.move"),G("vibecli codex sessions --undo <dir>","codex_sessions.ex.undo")]}),r(H,{...z("codex_sessions",[["vibecli codex sessions --undo <dir>","codex_sessions.alt.undo"]]),examples:[G("vibecli codex sessions","codex_sessions.ex.move"),G("vibecli codex sessions --to custom","codex_sessions.ex.to"),G("vibecli codex sessions --undo <dir>","codex_sessions.ex.undo")]});const J=a.command("lang").summary(j("lang.summary")).description(j("lang.description"));C(J);const K=J.command("show").description(j("lang.show")).action(async()=>{await m(["show"])}),L=J.command("set <locale>").description(j("lang.set")).action(async e=>{await m(["set",e])}),D=[G("vibecli lang show","lang.ex.show"),G("vibecli lang set en_US","lang.ex.set_en"),G("vibecli lang set zh_CN","lang.ex.set_zh")];r(J,{...z("lang",[["vibecli enter lang","lang.alt.enter"]]),examples:D}),r(K,{examples:[D[0],G("vibecli lang show --json","lang.ex.show_json")]}),r(L,{examples:D.slice(1)});const I=a.command("completion").summary(j("completion.summary")).description(j("completion.description")).argument("<shell>",j("completion.arg.shell")).action(async e=>{await x([e])});r(I,{...z("completion"),examples:[G("vibecli completion bash > ~/.vibecli-completion.bash","completion.ex.bash"),G("vibecli completion zsh > ~/.vibecli-completion.zsh","completion.ex.zsh"),G("vibecli completion fish > ~/.config/fish/completions/vibecli.fish","completion.ex.fish")]});const Q=a.command("enter").summary(j("enter.summary")).description(j("enter.description")).argument("[option]",j("enter.arg.option")).action(async e=>{if(e)switch(e){case"lang":case"language":await n.configLanguage();break;case"apikey":case"api-key":await n.configApiKey();break;case"models":await n.configModels();break;default:await b([e])}else await n.run()});r(Q,{...z("enter",[["vibecli","enter.alt.menu"],["vibecli config <tool>","enter.alt.config"]]),sections:[{title:j("enter.options_title"),rows:[[j("enter.option.none_term"),j("enter.option.none")],["lang",j("enter.option.lang")],["apikey",j("enter.option.apikey")],["models",j("enter.option.models")],["<tool>",j("enter.option.tool")]]}],examples:[G("vibecli enter","enter.ex.menu"),G("vibecli enter models","enter.ex.models"),G("vibecli enter codex","enter.ex.tool")]}),C(a),a.action(async()=>{await n.run()}),r(a,{examples:[G("vibecli","root.ex.menu"),G("vibecli setup --key sk-xxx","root.ex.setup"),G("vibecli doctor","root.ex.doctor"),G("vibecli base auto","root.ex.base"),G("vibecli config codex","root.ex.config")]});const V=e=>{for(const o of e.commands)o.helpOption("-h, --help",j("global.help")),V(o)};return V(a),a}
|
|
1
|
+
import{Command as e}from"commander";import{readFileSync as o}from"fs";import{join as t,dirname as i}from"path";import{fileURLToPath as s}from"url";import{i18n as a}from"./i18n.js";import{wizard as n}from"./wizard.js";import{SUPPORTED_TOOLS as c}from"./tool-manager.js";import{DEFAULT_BASE_URL as l}from"./config.js";import{attachCommandHelp as r,helpConfiguration as p}from"./cli-help.js";import{langCommand as m,authCommand as u,doctorCommand as d,configCommand as b,statusCommand as g}from"../commands/index.js";import{logsCommand as f}from"../commands/logs.js";import{completionCommand as x}from"../commands/completion.js";import{benchCommand as v}from"../commands/bench.js";import{updateCommand as y}from"../commands/update.js";import{upgradeCommand as h}from"../commands/upgrade.js";import{codexSessionsCommand as k}from"../commands/codex-sessions.js";import{setupCommand as _,DEDICATED_KEYS as w}from"../commands/setup.js";import{baseCommand as j}from"../commands/base.js";function O(e,o){return a.t(`help.${e}`,o)}function G(e,o){return{command:e,note:O(o)}}function z(e){const o=O(e);return o===`help.${e}`?"":o}function $(e,o=[]){return{when:z(`${e}.when`),prerequisites:z(`${e}.needs`).split("\n").filter(Boolean),alternatives:o.map(([e,o])=>G(e,o))}}function C(e){return e.helpCommand("help [command]",O("help_command"))}export function buildProgram(){const a=new e;a.name("vibecli").summary(O("root.summary")).description(O("root.description")).configureHelp(p()).allowExcessArguments(!0).optionsGroup(O("group.global_options")).helpOption("-h, --help",O("global.help")).version(function(){try{const e=i(s(import.meta.url));return JSON.parse(o(t(e,"../../package.json"),"utf-8")).version}catch{return"1.0.0"}}(),"-v, --version",O("global.version")).option("--base <url>",O("global.base")).option("--non-interactive",O("global.non_interactive")).option("--json",O("global.json")).option("-y, --yes",O("global.yes")).option("--dry-run",O("global.dry_run")).option("--no-color",O("global.no_color")),a.commandsGroup(O("group.configure"));const z=a.command("setup").summary(O("setup.summary")).description(O("setup.description")).option("--key <key>",O("setup.opt.key"));for(const e of w)z.option(`--${e.option} <key>`,O(`setup.opt.${e.option}`));z.option("--1m",O("setup.opt.one_m")).option("--no-1m",O("setup.opt.no_one_m")).option("--claude-official <on|off>",O("setup.opt.claude_official")).option("--desktop-registry <on|off>",O("setup.opt.desktop_registry")).option("--force",O("setup.opt.force")).option("--all",O("setup.opt.all")).action(async e=>{await _({key:e.key,...Object.fromEntries(w.map(o=>[o.option,e[o.option]])),all:e.all,oneMillion:e["1m"],claudeOfficial:e.claudeOfficial,desktopRegistry:e.desktopRegistry,force:e.force})}),r(z,{...$("setup",[["vibecli init","setup.alt.init"],["vibecli config <tool>","setup.alt.config"],["vibecli auth <key>","setup.alt.auth"]]),sections:[{title:O("setup.autodetect_title"),rows:[["Claude",O("setup.autodetect.claude")],["GPT",O("setup.autodetect.gpt")],["Grok",O("setup.autodetect.grok")],["Gemini",O("setup.autodetect.gemini")]]}],examples:[G("vibecli setup --key sk-xxx","setup.ex.key"),G("vibecli setup --claudekey sk-a --codexkey sk-b --agykey sk-g","setup.ex.split"),G("vibecli setup --desktopkey sk-d --claude-official off","setup.ex.desktop"),G("vibecli setup --key sk-xxx --force","setup.ex.force"),G("vibecli setup --key sk-xxx --base https://www.vibeapi.si","setup.ex.base")]});const N=a.command("init").summary(O("init.summary")).description(O("init.description")).action(async()=>{await n.runFirstTimeSetup()});r(N,{...$("init",[["vibecli setup --key <key>","init.alt.setup"],["vibecli","init.alt.menu"]]),examples:[G("vibecli init","init.ex.run"),G("vibecli init --base https://www.vibeapi.si","init.ex.base"),G("vibecli","init.ex.menu")]});const S=a.command("auth").summary(O("auth.summary")).description(O("auth.description")).argument("[token]",O("auth.arg.token")).action(async e=>{const o=[];e&&o.push(e),await u(o)});C(S);const A=S.command("revoke").description(O("auth.revoke")).action(async()=>{await u(["revoke"])});r(A,{examples:[G("vibecli auth revoke","auth.ex.revoke_ask"),G("vibecli auth revoke --yes","auth.ex.revoke")]});const E=S.command("reload <tool>").description(O("auth.reload")).action(async e=>{await u(["reload",e])});r(E,{examples:[G("vibecli auth reload claude-code","auth.ex.reload"),G("vibecli auth reload claude-code --json","auth.ex.reload_json")]}),r(S,{...$("auth",[["vibecli setup --key <key>","auth.alt.setup"]]),examples:[G("vibecli auth","auth.ex.prompt"),G("vibecli auth sk-xxx --non-interactive","auth.ex.save"),G("vibecli auth revoke --yes","auth.ex.revoke"),G("vibecli auth reload claude-code","auth.ex.reload")]});const M=a.command("config").summary(O("config.summary")).description(O("config.description")).argument("[args...]",O("config.arg.args")).option("-f, --force",O("config.opt.force")).allowUnknownOption(!0).action(async(e=[],o={})=>{await b(o.force?[...e,"--force"]:e)});r(M,{...$("config",[["vibecli setup --key <key> --force","config.alt.setup"],["vibecli status","config.alt.status"]]),sections:[{title:O("config.subcommands_title"),rows:[["<tool>",O("config.sub.tool")],["<tool> --force",O("config.sub.tool_force")],["<tool> --non-interactive",O("config.sub.tool_non_interactive")],["<tool> restore",O("config.sub.tool_restore")],["<tool> backups",O("config.sub.tool_backups")],["<tool> clear-model",O("config.sub.tool_clear_model")],["tool-model list",O("config.sub.tool_model_list")],["tool-model set <tool> [slot] <model>",O("config.sub.tool_model_set")],["tool-model clear <tool>",O("config.sub.tool_model_clear")],["profile list",O("config.sub.profile_list")],["profile create <name>",O("config.sub.profile_create")],["profile use <name>",O("config.sub.profile_use")],["profile delete <name>",O("config.sub.profile_delete")],["preset list",O("config.sub.preset_list")],["preset save <name>",O("config.sub.preset_save")],["preset use <name>",O("config.sub.preset_use")],["preset delete <name>",O("config.sub.preset_delete")],["backup list",O("config.sub.backup_list")],["backup create [label]",O("config.sub.backup_create")],["backup restore <name>",O("config.sub.backup_restore")]]},{title:O("config.tools_title"),rows:Object.values(c).filter(e=>!e.hidden).map(e=>[e.name,e.displayName])}],examples:[G("vibecli config codex","config.ex.menu"),G("vibecli config claude-code --force","config.ex.force"),G("vibecli config tool-model set codex gpt-6-astra","config.ex.tool_model"),G("vibecli config profile create work","config.ex.profile"),G("vibecli config backup create before-upgrade","config.ex.backup")]});const P=a.command("base").summary(O("base.summary")).description(O("base.description")).argument("[target]",O("base.arg.target")).action(async e=>{await j(e)});r(P,{...$("base",[["vibecli doctor","base.alt.doctor"],["vibecli bench","base.alt.bench"]]),sections:[{title:O("base.targets_title"),rows:[[O("base.target.none_term"),O("base.target.none")],[O("base.target.index_term"),O("base.target.index")],[O("base.target.url_term"),O("base.target.url")],["auto",O("base.target.auto")],["default",O("base.target.default",{url:l})]]}],examples:[G("vibecli base","base.ex.list"),G("vibecli base auto","base.ex.auto"),G("vibecli base 2","base.ex.index"),G("vibecli base https://www.vibeapi.si","base.ex.url"),G("vibecli base default","base.ex.default")]}),a.commandsGroup(O("group.diagnose"));const R=a.command("status").summary(O("status.summary")).description(O("status.description")).action(async()=>{await g()});r(R,{...$("status",[["vibecli doctor","status.alt.doctor"]]),examples:[G("vibecli status","status.ex.show"),G("vibecli status --json","status.ex.json")]});const T=a.command("doctor").summary(O("doctor.summary")).description(O("doctor.description")).option("--deep",O("doctor.opt.deep")).action(async e=>{await d({deep:e.deep})});r(T,{...$("doctor",[["vibecli base auto","doctor.alt.base"],["vibecli logs tail","doctor.alt.logs"]]),examples:[G("vibecli doctor","doctor.ex.run"),G("vibecli doctor --deep","doctor.ex.deep")]});const U=a.command("bench").summary(O("bench.summary")).description(O("bench.description")).option("--samples <n>",O("bench.opt.samples"),"5").action(async e=>{const o=[];e.samples&&o.push("--samples",e.samples),await v(o)});r(U,{...$("bench",[["vibecli base","bench.alt.base"]]),examples:[G("vibecli bench","bench.ex.run"),G("vibecli bench --samples 3","bench.ex.samples"),G("vibecli bench --json","bench.ex.json")]});const q=a.command("logs").summary(O("logs.summary")).description(O("logs.description")).argument("[action]",O("logs.arg.action")).argument("[file]",O("logs.arg.file")).action(async(e,o)=>{const t=[];e&&t.push(e),o&&t.push(o),await f(t)});r(q,{...$("logs",[["vibecli doctor","logs.alt.doctor"]]),sections:[{title:O("logs.actions_title"),rows:[["list",O("logs.action.list")],["tail [file]",O("logs.action.tail")],["path",O("logs.action.path")]]}],examples:[G("vibecli logs","logs.ex.list"),G("vibecli logs tail","logs.ex.tail"),G("vibecli logs path","logs.ex.path")]}),a.commandsGroup(O("group.maintain"));const B=a.command("upgrade").summary(O("upgrade.summary")).description(O("upgrade.description")).argument("[tools...]",O("upgrade.arg.tools")).action(async(e=[])=>{await h(e)});r(B,{...$("upgrade",[["vibecli update","upgrade.alt.update"]]),examples:[G("vibecli upgrade","upgrade.ex.all"),G("vibecli upgrade claude-code","upgrade.ex.one"),G("vibecli upgrade codex agy","upgrade.ex.many")]});const F=a.command("update").summary(O("update.summary")).description(O("update.description")).action(async()=>{await y()});r(F,{...$("update",[["vibecli upgrade","update.alt.upgrade"]]),examples:[G("vibecli update","update.ex.check"),G("vibecli update --json","update.ex.json")]});const H=a.command("codex").summary(O("codex.summary")).description(O("codex.description"));C(H);const J=H.command("sessions").summary(O("codex_sessions.summary")).description(O("codex_sessions.description")).option("--to <provider>",O("codex_sessions.opt.to")).option("--undo <dir>",O("codex_sessions.opt.undo")).action(async e=>{await k(e)});r(H,{...$("codex"),examples:[G("vibecli codex sessions","codex_sessions.ex.move"),G("vibecli codex sessions --undo <dir>","codex_sessions.ex.undo")]}),r(J,{...$("codex_sessions",[["vibecli codex sessions --undo <dir>","codex_sessions.alt.undo"]]),examples:[G("vibecli codex sessions","codex_sessions.ex.move"),G("vibecli codex sessions --to custom","codex_sessions.ex.to"),G("vibecli codex sessions --undo <dir>","codex_sessions.ex.undo")]});const K=a.command("lang").summary(O("lang.summary")).description(O("lang.description"));C(K);const L=K.command("show").description(O("lang.show")).action(async()=>{await m(["show"])}),D=K.command("set <locale>").description(O("lang.set")).action(async e=>{await m(["set",e])}),I=[G("vibecli lang show","lang.ex.show"),G("vibecli lang set en_US","lang.ex.set_en"),G("vibecli lang set zh_CN","lang.ex.set_zh")];r(K,{...$("lang",[["vibecli enter lang","lang.alt.enter"]]),examples:I}),r(L,{examples:[I[0],G("vibecli lang show --json","lang.ex.show_json")]}),r(D,{examples:I.slice(1)});const Q=a.command("completion").summary(O("completion.summary")).description(O("completion.description")).argument("<shell>",O("completion.arg.shell")).action(async e=>{await x([e])});r(Q,{...$("completion"),examples:[G("vibecli completion bash > ~/.vibecli-completion.bash","completion.ex.bash"),G("vibecli completion zsh > ~/.vibecli-completion.zsh","completion.ex.zsh"),G("vibecli completion fish > ~/.config/fish/completions/vibecli.fish","completion.ex.fish")]});const V=a.command("enter").summary(O("enter.summary")).description(O("enter.description")).argument("[option]",O("enter.arg.option")).action(async e=>{if(e)switch(e){case"lang":case"language":await n.configLanguage();break;case"apikey":case"api-key":await n.configApiKey();break;case"models":await n.configModels();break;default:await b([e])}else await n.run()});r(V,{...$("enter",[["vibecli","enter.alt.menu"],["vibecli config <tool>","enter.alt.config"]]),sections:[{title:O("enter.options_title"),rows:[[O("enter.option.none_term"),O("enter.option.none")],["lang",O("enter.option.lang")],["apikey",O("enter.option.apikey")],["models",O("enter.option.models")],["<tool>",O("enter.option.tool")]]}],examples:[G("vibecli enter","enter.ex.menu"),G("vibecli enter models","enter.ex.models"),G("vibecli enter codex","enter.ex.tool")]}),C(a),a.action(async()=>{await n.run()}),r(a,{examples:[G("vibecli","root.ex.menu"),G("vibecli setup --key sk-xxx","root.ex.setup"),G("vibecli doctor","root.ex.doctor"),G("vibecli base auto","root.ex.base"),G("vibecli config codex","root.ex.config")]});const W=e=>{for(const o of e.commands)o.helpOption("-h, --help",O("global.help")),W(o)};return W(a),a}
|
package/dist/locales/en_US.json
CHANGED
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
"non_interactive_aborted": "Aborted - missing required input"
|
|
324
324
|
},
|
|
325
325
|
"setup": {
|
|
326
|
-
"usage": "Usage: vibecli setup --key sk-xxx or vibecli setup --claudekey sk-a --codexkey sk-b
|
|
326
|
+
"usage": "Usage: vibecli setup --key sk-xxx or vibecli setup --claudekey sk-a --codexkey sk-b … (per-tool keys: see vibecli setup --help) or vibecli setup --1m|--no-1m or vibecli setup --claude-official on|off",
|
|
327
327
|
"codex_1m_enabled": "Codex 1M context is enabled",
|
|
328
328
|
"codex_1m_disabled": "Codex 1M context is disabled",
|
|
329
329
|
"codex_1m_missing_key": "No saved Codex API key was found; run vibecli setup --codexkey <your key> (or --key) first",
|
|
@@ -333,7 +333,8 @@
|
|
|
333
333
|
"key_no_claude": "{{label}} cannot access Claude models (token group excludes Claude); skipped {{tool}}",
|
|
334
334
|
"key_no_gpt": "{{label}} cannot access GPT models (token group excludes GPT); skipped {{tool}}",
|
|
335
335
|
"key_no_grok": "{{label}} cannot access Grok models (token group excludes Grok); skipped {{tool}}",
|
|
336
|
-
"
|
|
336
|
+
"key_no_gemini": "{{label}} cannot access Gemini models (token group excludes Gemini); skipped {{tool}}",
|
|
337
|
+
"key_no_family": "This key exposes no Claude, GPT, Grok or Gemini models; check the token group and retry",
|
|
337
338
|
"skip_no_claude": "This key has no Claude model group; skipped Claude Code",
|
|
338
339
|
"skip_no_gpt": "This key has no GPT model group; skipped Codex",
|
|
339
340
|
"skip_no_grok": "This key has no Grok model group; skipped Grok Build",
|
|
@@ -537,13 +538,17 @@
|
|
|
537
538
|
},
|
|
538
539
|
"setup": {
|
|
539
540
|
"summary": "Configure tools in one command (picked by the models your key can use)",
|
|
540
|
-
"description": "Write the configs in one command, without the wizard.\n--key configures the tools that match the models the key can use (see below).\nSeparate keys: --claudekey / --codexkey / --grokkey / --desktopkey.\nRun it again to change the key; your other settings stay.",
|
|
541
|
+
"description": "Write the configs in one command, without the wizard.\n--key configures the tools that match the models the key can use (see below).\nSeparate keys: --claudekey / --codexkey / --grokkey / --desktopkey / --agykey / --openclawkey / --hermeskey / --atomcodekey.\nRun it again to change the key; your other settings stay.",
|
|
541
542
|
"opt": {
|
|
542
543
|
"key": "One key; configures every tool its models can serve",
|
|
543
544
|
"claudekey": "Key just for Claude Code",
|
|
544
545
|
"codexkey": "Key just for Codex",
|
|
545
546
|
"grokkey": "Key just for Grok Build",
|
|
546
547
|
"desktopkey": "Key just for Claude Desktop",
|
|
548
|
+
"agykey": "Dedicated key for Antigravity CLI (must reach Gemini models)",
|
|
549
|
+
"openclawkey": "Dedicated key for OpenClaw",
|
|
550
|
+
"hermeskey": "Dedicated key for Hermes",
|
|
551
|
+
"atomcodekey": "Dedicated key for AtomCode",
|
|
547
552
|
"one_m": "Turn on the 1M context window in Codex",
|
|
548
553
|
"no_one_m": "Turn off the 1M context window in Codex",
|
|
549
554
|
"claude_official": "Show the Claude.ai sign-in in Claude Desktop (default off)",
|
|
@@ -556,17 +561,17 @@
|
|
|
556
561
|
"claude": "Claude Code (plus Claude Desktop if installed)",
|
|
557
562
|
"gpt": "Codex",
|
|
558
563
|
"grok": "Grok Build",
|
|
559
|
-
"gemini": "Antigravity CLI
|
|
564
|
+
"gemini": "Antigravity CLI"
|
|
560
565
|
},
|
|
561
566
|
"ex": {
|
|
562
567
|
"key": "Configure every tool one key can serve",
|
|
563
|
-
"split": "Separate keys for the Claude and
|
|
568
|
+
"split": "Separate keys for the Claude, GPT and Gemini groups",
|
|
564
569
|
"desktop": "Configure Claude Desktop and hide the Claude.ai sign-in",
|
|
565
570
|
"force": "Rewrite broken configs (backed up first)",
|
|
566
571
|
"base": "Configure on a backup address"
|
|
567
572
|
},
|
|
568
573
|
"when": "First setup after you get a key, or to change the key or repair broken configs.",
|
|
569
|
-
"needs": "A VibeAPI API key (create one on the Tokens page of the console)\nClaude Code, Codex
|
|
574
|
+
"needs": "A VibeAPI API key (create one on the Tokens page of the console)\nClaude Code, Codex, Grok Build and Antigravity CLI can be installed later: they still get their config, plus the install command; Claude Desktop is configured only once installed (or forced with --desktopkey)",
|
|
570
575
|
"alt": {
|
|
571
576
|
"init": "Choose tools and models step by step",
|
|
572
577
|
"config": "Change one tool only",
|
package/dist/locales/zh_CN.json
CHANGED
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
"non_interactive_aborted": "已中止 - 缺少必要输入"
|
|
324
324
|
},
|
|
325
325
|
"setup": {
|
|
326
|
-
"usage": "用法: vibecli setup --key sk-xxx 或 vibecli setup --claudekey sk-a --codexkey sk-b
|
|
326
|
+
"usage": "用法: vibecli setup --key sk-xxx 或 vibecli setup --claudekey sk-a --codexkey sk-b …(各工具的专属 Key 见 vibecli setup --help) 或 vibecli setup --1m|--no-1m 或 vibecli setup --claude-official on|off",
|
|
327
327
|
"codex_1m_enabled": "Codex 1M 上下文已开启",
|
|
328
328
|
"codex_1m_disabled": "Codex 1M 上下文已关闭",
|
|
329
329
|
"codex_1m_missing_key": "未找到已保存的 Codex API Key;先运行 vibecli setup --codexkey <你的 Key>(或 --key)",
|
|
@@ -333,7 +333,8 @@
|
|
|
333
333
|
"key_no_claude": "{{label}} 无法访问 Claude 模型(令牌分组不含 Claude),已跳过 {{tool}}",
|
|
334
334
|
"key_no_gpt": "{{label}} 无法访问 GPT 模型(令牌分组不含 GPT),已跳过 {{tool}}",
|
|
335
335
|
"key_no_grok": "{{label}} 无法访问 Grok 模型(令牌分组不含 Grok),已跳过 {{tool}}",
|
|
336
|
-
"
|
|
336
|
+
"key_no_gemini": "{{label}} 无法访问 Gemini 模型(令牌分组不含 Gemini),已跳过 {{tool}}",
|
|
337
|
+
"key_no_family": "该 Key 探测不到 Claude / GPT / Grok / Gemini 模型,请确认令牌分组后重试",
|
|
337
338
|
"skip_no_claude": "该 Key 未开通 Claude 模型分组,已跳过 Claude Code",
|
|
338
339
|
"skip_no_gpt": "该 Key 未开通 GPT 模型分组,已跳过 Codex",
|
|
339
340
|
"skip_no_grok": "该 Key 未开通 Grok 模型分组,已跳过 Grok Build",
|
|
@@ -537,13 +538,17 @@
|
|
|
537
538
|
},
|
|
538
539
|
"setup": {
|
|
539
540
|
"summary": "一条命令配好工具(按 Key 能用的模型自动选)",
|
|
540
|
-
"description": "不进向导,一条命令写好配置。\n--key 先用 Key 拉模型列表,按能用的模型配置对应工具(见下表)。\n不同分组的 Key 用 --claudekey / --codexkey / --grokkey / --desktopkey 分开给。\n重复执行就是换 Key,其他配置保留。",
|
|
541
|
+
"description": "不进向导,一条命令写好配置。\n--key 先用 Key 拉模型列表,按能用的模型配置对应工具(见下表)。\n不同分组的 Key 用 --claudekey / --codexkey / --grokkey / --desktopkey / --agykey / --openclawkey / --hermeskey / --atomcodekey 分开给。\n重复执行就是换 Key,其他配置保留。",
|
|
541
542
|
"opt": {
|
|
542
543
|
"key": "一把 Key,按它能用的模型自动配置工具",
|
|
543
544
|
"claudekey": "单独给 Claude Code 的 Key",
|
|
544
545
|
"codexkey": "单独给 Codex 的 Key",
|
|
545
546
|
"grokkey": "单独给 Grok Build 的 Key",
|
|
546
547
|
"desktopkey": "单独给 Claude Desktop 的 Key",
|
|
548
|
+
"agykey": "单独给 Antigravity CLI 的 Key(要能用 Gemini 模型)",
|
|
549
|
+
"openclawkey": "单独给 OpenClaw 的 Key",
|
|
550
|
+
"hermeskey": "单独给 Hermes 的 Key",
|
|
551
|
+
"atomcodekey": "单独给 AtomCode 的 Key",
|
|
547
552
|
"one_m": "Codex 打开 1M 上下文",
|
|
548
553
|
"no_one_m": "Codex 关闭 1M 上下文",
|
|
549
554
|
"claude_official": "Claude Desktop 是否显示 Claude.ai 登录入口(默认 off)",
|
|
@@ -556,17 +561,17 @@
|
|
|
556
561
|
"claude": "Claude Code(装了 Claude Desktop 也一起配)",
|
|
557
562
|
"gpt": "Codex",
|
|
558
563
|
"grok": "Grok Build",
|
|
559
|
-
"gemini": "Antigravity CLI
|
|
564
|
+
"gemini": "Antigravity CLI"
|
|
560
565
|
},
|
|
561
566
|
"ex": {
|
|
562
567
|
"key": "用一把 Key 配好它能用的所有工具",
|
|
563
|
-
"split": "Claude
|
|
568
|
+
"split": "Claude、GPT、Gemini 分组的 Key 分开配",
|
|
564
569
|
"desktop": "配 Claude Desktop,隐藏 Claude.ai 登录入口",
|
|
565
570
|
"force": "配置被改坏时整份重写(会先备份)",
|
|
566
571
|
"base": "在备用地址上配置"
|
|
567
572
|
},
|
|
568
573
|
"when": "拿到 Key 后第一次配置,或者换 Key、修复被改坏的配置时。",
|
|
569
|
-
"needs": "一把 VibeAPI 的 API Key(在控制台的「令牌」页创建)\nClaude Code、Codex、Grok Build 可以之后再装:没装也会先写好配置,并给出安装命令;Claude Desktop
|
|
574
|
+
"needs": "一把 VibeAPI 的 API Key(在控制台的「令牌」页创建)\nClaude Code、Codex、Grok Build、Antigravity CLI 可以之后再装:没装也会先写好配置,并给出安装命令;Claude Desktop 要先装好才会配置(或用 --desktopkey 强制写入)",
|
|
570
575
|
"alt": {
|
|
571
576
|
"init": "想一步步选工具和模型",
|
|
572
577
|
"config": "只改一个工具",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibeapi/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.88",
|
|
4
4
|
"description": "CLI tool for managing AI coding assistants (Claude Code, Codex, OpenClaw, Hermes, AtomCode, Grok Build) with one unified config",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|