@vibeapi/api-helper 0.0.148 → 0.0.149
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/components.json +157 -0
- package/dist/commands/components.d.ts +26 -0
- package/dist/commands/components.js +1 -0
- package/dist/commands/upgrade.d.ts +4 -2
- package/dist/commands/upgrade.js +1 -1
- package/dist/components.json +157 -0
- package/dist/lib/app-update.d.ts +20 -0
- package/dist/lib/app-update.js +1 -1
- package/dist/lib/brand.js +1 -1
- package/dist/lib/components.d.ts +204 -0
- package/dist/lib/components.js +1 -0
- package/dist/lib/dry-run.js +1 -1
- package/dist/lib/program.js +1 -1
- package/dist/lib/runtime-options.d.ts +5 -0
- package/dist/lib/runtime-options.js +1 -1
- package/dist/lib/tool-upgrade.d.ts +2 -0
- package/dist/lib/tool-upgrade.js +1 -1
- package/dist/lib/tools/chatgpt-desktop.d.ts +14 -1
- package/dist/lib/tools/chatgpt-desktop.js +1 -1
- package/dist/lib/tools/claude-desktop.js +1 -1
- package/dist/lib/tools/desktop-process.d.ts +4 -1
- package/dist/lib/tools/desktop-process.js +1 -1
- package/dist/lib/tools/tool-installs.d.ts +8 -0
- package/dist/lib/tools/tool-installs.js +1 -1
- package/dist/lib/tools/types.d.ts +13 -9
- package/dist/locales/en_US.json +124 -5
- package/dist/locales/zh_CN.json +124 -5
- package/package.json +2 -1
|
@@ -13,13 +13,16 @@ export declare const WINDOWS_PACKAGE_FAMILIES: string[];
|
|
|
13
13
|
declare let run: (command: string, args: string[], timeout?: number) => {
|
|
14
14
|
status: number | null;
|
|
15
15
|
stdout: string;
|
|
16
|
+
stderr?: string;
|
|
16
17
|
};
|
|
17
18
|
/** Tests replace the process runner. */
|
|
18
19
|
export declare function setDesktopProcessRunnerForTests(fake: typeof run): void;
|
|
19
20
|
export declare function isDesktopRunning(): boolean;
|
|
20
21
|
/** Whether this platform supports `restartDesktop()`. */
|
|
21
22
|
export declare function canRestartDesktop(): boolean;
|
|
22
|
-
/**
|
|
23
|
+
/** The last `quitDesktop()` was turned down by the app (a confirmation open, work running); it is still running. */
|
|
24
|
+
export declare function desktopQuitRefused(): boolean;
|
|
25
|
+
/** Quit (gracefully, then forcibly); true when no instance is left. A quit the app turns down on macOS is left alone (see `quitChatgpt`). */
|
|
23
26
|
export declare function quitDesktop(): boolean;
|
|
24
27
|
/** Start the installed app; true when it is running afterwards. */
|
|
25
28
|
export declare function launchDesktop(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{spawnSync as e}from"child_process";import{logger as t}from"../../utils/logger.js";import{powerShellEnv as r}from"../powershell-env.js";export const WINDOWS_PACKAGE_FAMILIES=["Claude_pzs8sxrjxfjjc","AnthropicPBC.Claude_fnn82j28hfe8t"];const o="Get-Process -Name claude -ErrorAction SilentlyContinue | Where-Object { $_.Path -and ($_.Path -like '*\\AnthropicClaude\\*' -or $_.Path -like '*\\Programs\\Claude\\*' -or $_.Path -like '*\\WindowsApps\\*Claude*') }";let s=(o,s,n=3e4)=>{const i=e(o,s,{encoding:"utf-8",timeout:n,windowsHide:!0,stdio:["ignore","pipe","pipe"],env:r()});return i.error&&t.logError(`desktop-process: ${o}`,i.error),{status:i.status,stdout:`${i.stdout??""}`}};export function setDesktopProcessRunnerForTests(e){s=e}function n(e,t){return s("powershell.exe",["-NoProfile","-NonInteractive","-Command",e],t)}function i(e){Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e)}export function isDesktopRunning(){return"darwin"===process.platform?0===s("pgrep",["-x","Claude"]).status:"win32"===process.platform&&Number(n(`@(${o}).Count`).stdout.trim())>0}export function canRestartDesktop(){return"darwin"===process.platform||"win32"===process.platform}export function quitDesktop(){if("darwin"===process.platform){s("osascript",["-e",'quit app "Claude"']);for(let e=0;e<30&&isDesktopRunning();e++)i(500);isDesktopRunning()&&s("pkill",["-x","Claude"]),i(1e3)}else{if("win32"!==process.platform)return!1;n([`$p = @(${o})`,"$p | ForEach-Object { [void]$_.CloseMainWindow() }","Start-Sleep -Seconds 3","$p | Where-Object { -not $_.HasExited } | Stop-Process -Force -ErrorAction SilentlyContinue","Start-Sleep -Seconds 1"].join("\n"),6e4)}return!isDesktopRunning()}export function launchDesktop(){if("darwin"===process.platform)s("open",["-a","Claude"]);else{if("win32"!==process.platform)return!1;n(["$squirrel = Join-Path $env:LOCALAPPDATA 'AnthropicClaude\\claude.exe'","$programs = Join-Path $env:LOCALAPPDATA 'Programs\\Claude\\Claude.exe'","if (Test-Path $squirrel) { Start-Process $squirrel }","elseif (Test-Path $programs) { Start-Process $programs }",`else { $pkg = Get-AppxPackage | Where-Object { @(${WINDOWS_PACKAGE_FAMILIES.map(e=>`'${e}'`).join(",")}) -contains $_.PackageFamilyName } | Select-Object -First 1`," if ($pkg) { $id = (Get-AppxPackageManifest $pkg).Package.Applications.Application.Id | Select-Object -First 1",' Start-Process "shell:AppsFolder\\$($pkg.PackageFamilyName)!$id" } }'].join("\n"),6e4)}for(let e=0;e<20;e++){if(isDesktopRunning())return!0;i(500)}return!1}export function restartDesktop(){return!!canRestartDesktop()
|
|
1
|
+
import{spawnSync as e}from"child_process";import{logger as t}from"../../utils/logger.js";import{powerShellEnv as r}from"../powershell-env.js";export const WINDOWS_PACKAGE_FAMILIES=["Claude_pzs8sxrjxfjjc","AnthropicPBC.Claude_fnn82j28hfe8t"];const o="Get-Process -Name claude -ErrorAction SilentlyContinue | Where-Object { $_.Path -and ($_.Path -like '*\\AnthropicClaude\\*' -or $_.Path -like '*\\Programs\\Claude\\*' -or $_.Path -like '*\\WindowsApps\\*Claude*') }";let s=(o,s,n=3e4)=>{const i=e(o,s,{encoding:"utf-8",timeout:n,windowsHide:!0,stdio:["ignore","pipe","pipe"],env:r()});return i.error&&t.logError(`desktop-process: ${o}`,i.error),{status:i.status,stdout:`${i.stdout??""}`,stderr:`${i.stderr??""}`}};export function setDesktopProcessRunnerForTests(e){s=e}function n(e,t){return s("powershell.exe",["-NoProfile","-NonInteractive","-Command",e],t)}function i(e){Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e)}export function isDesktopRunning(){return"darwin"===process.platform?0===s("pgrep",["-x","Claude"]).status:"win32"===process.platform&&Number(n(`@(${o}).Count`).stdout.trim())>0}export function canRestartDesktop(){return"darwin"===process.platform||"win32"===process.platform}let a=!1;export function desktopQuitRefused(){return a}export function quitDesktop(){if(a=!1,"darwin"===process.platform){const e=s("osascript",["-e",'quit app "Claude"']);if((null===e.status||/\(-128\)|-1712/.test(e.stderr??""))&&isDesktopRunning())return a=!0,!1;for(let e=0;e<30&&isDesktopRunning();e++)i(500);isDesktopRunning()&&s("pkill",["-x","Claude"]),i(1e3)}else{if("win32"!==process.platform)return!1;n([`$p = @(${o})`,"$p | ForEach-Object { [void]$_.CloseMainWindow() }","Start-Sleep -Seconds 3","$p | Where-Object { -not $_.HasExited } | Stop-Process -Force -ErrorAction SilentlyContinue","Start-Sleep -Seconds 1"].join("\n"),6e4)}return!isDesktopRunning()}export function launchDesktop(){if("darwin"===process.platform)s("open",["-a","Claude"]);else{if("win32"!==process.platform)return!1;n(["$squirrel = Join-Path $env:LOCALAPPDATA 'AnthropicClaude\\claude.exe'","$programs = Join-Path $env:LOCALAPPDATA 'Programs\\Claude\\Claude.exe'","if (Test-Path $squirrel) { Start-Process $squirrel }","elseif (Test-Path $programs) { Start-Process $programs }",`else { $pkg = Get-AppxPackage | Where-Object { @(${WINDOWS_PACKAGE_FAMILIES.map(e=>`'${e}'`).join(",")}) -contains $_.PackageFamilyName } | Select-Object -First 1`," if ($pkg) { $id = (Get-AppxPackageManifest $pkg).Package.Applications.Application.Id | Select-Object -First 1",' Start-Process "shell:AppsFolder\\$($pkg.PackageFamilyName)!$id" } }'].join("\n"),6e4)}for(let e=0;e<20;e++){if(isDesktopRunning())return!0;i(500)}return!1}export function restartDesktop(){return!!canRestartDesktop()&&!(!quitDesktop()&&a)&&launchDesktop()}
|
|
@@ -77,3 +77,11 @@ export declare function setVersionRunnerForTests(fake: (path: string) => string)
|
|
|
77
77
|
export declare function forgetInstalls(): void;
|
|
78
78
|
/** In PATH order (the first one is what the command starts), one entry per real file. Probed once per run. */
|
|
79
79
|
export declare function findInstalls(spec: ToolInstallSpec): ToolInstall[];
|
|
80
|
+
/**
|
|
81
|
+
* Like `findInstalls`, plus the vendor's native launcher when it exists but isn't on this process's PATH (just
|
|
82
|
+
* installed by the mirror script into ~/.local/bin, which a fresh shell profile only adds in new terminals).
|
|
83
|
+
* Such a copy comes last; `onPath` tells the caller to say "open a new terminal".
|
|
84
|
+
*/
|
|
85
|
+
export declare function findInstallsIncludingNative(spec: ToolInstallSpec): Array<ToolInstall & {
|
|
86
|
+
onPath: boolean;
|
|
87
|
+
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{spawnSync as t}from"child_process";import{existsSync as
|
|
1
|
+
import{spawnSync as t}from"child_process";import{existsSync as n,realpathSync as r,statSync as e}from"fs";import{delimiter as o,dirname as s,isAbsolute as i,join as a}from"path";import{i18n as c}from"../i18n.js";import{toolHome as p}from"./types.js";import{brand as m}from"../brand.js";export const NPM_MIRROR="https://registry.npmmirror.com";export function brandInstallScripts(t){const n=m().installMirror?.scripts;return n?{sh:`${n}/${t}.sh`,ps1:`${n}/${t}.ps1`}:void 0}export function npmMirrorInstallCommand(t,n="latest"){return`npm install -g ${t.npmPackage}@${n} --registry=${NPM_MIRROR}`}const l=/^(\d+)\.(\d+)\.(\d+)$/;function u(t,n){const r=l.exec(t).slice(1).map(Number),e=l.exec(n).slice(1).map(Number);for(let o=0;o<3;o++)if(r[o]!==e[o])return r[o]>e[o]?t:n;return t}async function f(t,n,r){const e=await fetch(t,{signal:AbortSignal.timeout(n),headers:r});if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}export async function npmMirrorVersion(t){if(!t.npmPackage||!t.npmMirrorTagStale)return"latest";let n=d.get(t.npmPackage);return n||d.set(t.npmPackage,n=async function(t){try{const{version:n}=await f(`https://registry.npmjs.org/${t}/latest`,1e4);if("string"==typeof n&&l.test(n))return n}catch{}try{const n=await f(`${NPM_MIRROR}/${t}`,2e4,{accept:"application/vnd.npm.install-v1+json"}),r=Object.keys(n.versions??{}).filter(t=>l.test(t));if(r.length)return r.reduce(u)}catch{}return"latest"}(t.npmPackage)),n}const d=new Map;export function mirrorInstallCommand(t){return t.mirrorScript?"win32"===process.platform?`powershell -NoProfile -ExecutionPolicy Bypass -Command "irm ${t.mirrorScript.ps1} | iex"`:`curl -fsSL ${t.mirrorScript.sh} | sh`:t.npmPackage?npmMirrorInstallCommand(t):""}export function npmUninstallCommand(t){return`npm uninstall -g ${t.npmPackage}`}export function installLabel(t){return c.t("upgrade.install_label",{kind:c.t(`upgrade.kind.${t.kind}`),version:t.version??"?",path:t.path})}let h=n=>{const r={encoding:"utf-8",timeout:1e4,windowsHide:!0,stdio:["ignore","pipe","pipe"]};return`${(/\.cmd$/i.test(n)?t(`"${n}" --version`,{...r,shell:!0}):t(n,["--version"],r)).stdout??""}`};const g=new Map;export function setVersionRunnerForTests(t){h=t,g.clear(),d.clear()}export function forgetInstalls(){g.clear()}function $(t,n){return"win32"===process.platform?t.toLowerCase()===n.toLowerCase():t===n}function w(t){try{return e(t).isFile()}catch{return!1}}function v(t,e){if(t.native&&$(s(e),a(p(),...t.native.binDir)))return"native";const o=t.npmPackage?a("node_modules",...t.npmPackage.split("/")):null;if(o&&n(a(s(e),o)))return"npm";let i=e;try{i=r(e)}catch{return"other"}return o&&i.includes(o)?"npm":/[\\/](Cellar|Caskroom)[\\/]/.test(i)?"brew":"other"}export function findInstalls(t){const n=g.get(t.command);if(n)return n;const e="win32"===process.platform?[`${t.command}.exe`,`${t.command}.cmd`]:[t.command],s=new Set,c=[];for(const n of(process.env.PATH??"").split(o))if(n&&i(n))for(const o of e){const e=a(n,o);if(!w(e))continue;let i=e;try{i=r(e)}catch{}const p="win32"===process.platform?i.toLowerCase():i;if(s.has(p))continue;s.add(p);const m=h(e).match(/(\d+)\.(\d+)\.(\d+)/);c.push({path:e,kind:v(t,e),version:m?m[0]:null})}return g.set(t.command,c),c}export function findInstallsIncludingNative(t){const n=findInstalls(t).map(t=>({...t,onPath:!0}));if(!t.native)return n;const r=a(p(),...t.native.binDir),e="win32"===process.platform?[`${t.command}.exe`]:[t.command];for(const t of e){const e=a(r,t);if(!w(e)||n.some(t=>$(t.path,e)))continue;const o=h(e).match(/(\d+)\.(\d+)\.(\d+)/);n.push({path:e,kind:"native",version:o?o[0]:null,onPath:!1})}return n}
|
|
@@ -108,11 +108,18 @@ export interface CompanionApp {
|
|
|
108
108
|
displayName: string;
|
|
109
109
|
appInstaller: AppInstaller;
|
|
110
110
|
installedVersion(): string | null;
|
|
111
|
-
runningApp?:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
runningApp?: RunningApp;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* A running desktop app vibecli may quit (after the user agreed) and start again. `quitRefused()`: the last
|
|
115
|
+
* `quit()` was turned down by the app itself (macOS: a task running or a confirmation open), so it is still
|
|
116
|
+
* running and the user has to confirm the quit in the app; it is never killed then.
|
|
117
|
+
*/
|
|
118
|
+
export interface RunningApp {
|
|
119
|
+
isRunning(): boolean;
|
|
120
|
+
quit?(): boolean;
|
|
121
|
+
quitRefused?(): boolean;
|
|
122
|
+
launch?(): boolean;
|
|
116
123
|
}
|
|
117
124
|
export interface ToolAdapter {
|
|
118
125
|
/** Stable id used on the CLI and as the config key (e.g. `codex`). */
|
|
@@ -162,11 +169,8 @@ export interface ToolAdapter {
|
|
|
162
169
|
* GUI apps that only read their config at start: setup and the wizard offer
|
|
163
170
|
* to restart a running app after writing it.
|
|
164
171
|
*/
|
|
165
|
-
runningApp?: {
|
|
166
|
-
isRunning(): boolean;
|
|
172
|
+
runningApp?: RunningApp & {
|
|
167
173
|
restart(): boolean;
|
|
168
|
-
quit?(): boolean;
|
|
169
|
-
launch?(): boolean;
|
|
170
174
|
};
|
|
171
175
|
/** The app itself can be installed and upgraded by vibecli; see {@link AppInstaller}. */
|
|
172
176
|
appInstaller?: AppInstaller;
|
package/dist/locales/en_US.json
CHANGED
|
@@ -462,6 +462,83 @@
|
|
|
462
462
|
"native_mirror_failed": "Couldn't replace from the mirror: {{reason}}",
|
|
463
463
|
"install_label": "{{kind}} {{version}} ({{path}})"
|
|
464
464
|
},
|
|
465
|
+
"components": {
|
|
466
|
+
"category": {
|
|
467
|
+
"runtime": "Runtimes",
|
|
468
|
+
"cli": "Command-line tools",
|
|
469
|
+
"app": "Desktop apps"
|
|
470
|
+
},
|
|
471
|
+
"col": {
|
|
472
|
+
"name": "Component",
|
|
473
|
+
"current": "Installed",
|
|
474
|
+
"latest": "Latest",
|
|
475
|
+
"managed": "Installed by",
|
|
476
|
+
"state": "State"
|
|
477
|
+
},
|
|
478
|
+
"by": {
|
|
479
|
+
"fnm": "fnm",
|
|
480
|
+
"brew": "Homebrew",
|
|
481
|
+
"nvm": "nvm",
|
|
482
|
+
"volta": "Volta",
|
|
483
|
+
"scoop": "Scoop",
|
|
484
|
+
"asdf": "asdf",
|
|
485
|
+
"mise": "mise",
|
|
486
|
+
"system": "system",
|
|
487
|
+
"standalone": "standalone",
|
|
488
|
+
"pipx": "pipx",
|
|
489
|
+
"pip": "pip",
|
|
490
|
+
"winget": "winget",
|
|
491
|
+
"git-for-windows-user": "Git for Windows (this user)",
|
|
492
|
+
"git-for-windows": "Git for Windows",
|
|
493
|
+
"xcode": "Apple Command Line Tools",
|
|
494
|
+
"native": "native",
|
|
495
|
+
"npm": "npm",
|
|
496
|
+
"app": "app",
|
|
497
|
+
"other": "other"
|
|
498
|
+
},
|
|
499
|
+
"state": {
|
|
500
|
+
"unsupported": "not available on this system",
|
|
501
|
+
"missing": "not installed: {{command}}",
|
|
502
|
+
"outdated_auto": "upgrade available: {{command}}",
|
|
503
|
+
"outdated_manual": "upgrade available: {{how}}",
|
|
504
|
+
"latest": "up to date",
|
|
505
|
+
"unknown_latest": "installed"
|
|
506
|
+
},
|
|
507
|
+
"source": "Source: {{source}}",
|
|
508
|
+
"latest_unknown": "Couldn't check the latest version of: {{tools}} (try {{cli}} list --refresh later)",
|
|
509
|
+
"unknown": "Unknown component: {{names}}",
|
|
510
|
+
"known": "Components: {{ids}}",
|
|
511
|
+
"unsupported_platform": "{{tool}} isn't available on this system",
|
|
512
|
+
"blocked_sudo": "Don't install {{tool}} with sudo: it would go into root's home directory and belong to root. Run it again without sudo",
|
|
513
|
+
"blocked_system": "This is the SYSTEM account; {{tool}} would go into the system profile. Run it again signed in as the person who uses it",
|
|
514
|
+
"blocked_unsupported_platform": "{{tool}} isn't available on this system",
|
|
515
|
+
"reason_sudo": "not with sudo",
|
|
516
|
+
"reason_system": "SYSTEM account",
|
|
517
|
+
"reason_unsupported_platform": "not available on this system",
|
|
518
|
+
"no_mirror": "Can't install {{tool}}: no install script location is configured",
|
|
519
|
+
"already_installed": "{{tool}} {{current}} is installed",
|
|
520
|
+
"up_to_date": "{{tool}} {{current}} is up to date",
|
|
521
|
+
"force_hint": "To reinstall it, run {{command}}",
|
|
522
|
+
"outdated_auto": "{{tool}} {{current}} can be upgraded to {{latest}}: run {{command}}",
|
|
523
|
+
"outdated_manual": "{{tool}} {{current}} can be upgraded to {{latest}}. It was installed with {{by}}, which {{cli}} leaves alone: run {{how}}; to add a copy {{cli}} manages, run {{command}}",
|
|
524
|
+
"no_latest": "{{tool}} {{current}} is managed by the system, {{cli}} doesn't upgrade it: {{how}}",
|
|
525
|
+
"how_system": "upgrade it the way it was installed (system package manager or the official installer), or add --force for a copy {{cli}} manages",
|
|
526
|
+
"how_xcode": "update the Command Line Tools in System Settings → General → Software Update",
|
|
527
|
+
"how_other": "upgrade it the way it was installed",
|
|
528
|
+
"force_beside": "{{tool}} is already at {{path}} (installed with {{by}}); --force adds a copy {{cli}} manages",
|
|
529
|
+
"installing": "Installing {{tool}} {{latest}} ({{source}})…",
|
|
530
|
+
"upgrading": "Upgrading {{tool}} to {{latest}} ({{source}})…",
|
|
531
|
+
"script_failed": "{{tool}} wasn't installed; see above. Then run {{command}}",
|
|
532
|
+
"installed": "Installed {{tool}} {{version}}",
|
|
533
|
+
"upgraded": "Upgraded {{tool}} from {{from}} to {{to}}",
|
|
534
|
+
"reinstalled": "Reinstalled {{tool}} {{version}}",
|
|
535
|
+
"reinstalling": "Reinstalling {{tool}} (--force; now {{current}})",
|
|
536
|
+
"path_shadowed": "Your terminal finds {{active}} first, not the {{tool}} {{version}} just installed ({{path}}): put the latter's directory earlier on PATH, or remove the former",
|
|
537
|
+
"capped": "{{tool}} {{latest}} doesn't run on this computer; the install script put in the newest one that does ({{version}}). Upgrades are offered again once a newer version is out",
|
|
538
|
+
"new_terminal": "Open a new terminal window to use it",
|
|
539
|
+
"migrating_globals": "The new Node doesn't have the packages installed globally before; installing the same versions: {{packages}}",
|
|
540
|
+
"migrate_failed": "Not all global packages made it to the new Node; run: {{command}}"
|
|
541
|
+
},
|
|
465
542
|
"install": {
|
|
466
543
|
"permission_unix": "npm probably cannot write its global directory. Either ① sudo {{command}}; or ② run npm config set prefix ~/.npm-global, add export PATH=~/.npm-global/bin:$PATH to ~/.zshrc or ~/.bashrc, open a new terminal and run {{command}}",
|
|
467
544
|
"permission_windows": "Probably missing permissions or a file in use: close the tool if it is running, open an elevated terminal and run {{command}}",
|
|
@@ -851,18 +928,58 @@
|
|
|
851
928
|
"doctor": "Check the common problems first"
|
|
852
929
|
}
|
|
853
930
|
},
|
|
931
|
+
"list": {
|
|
932
|
+
"summary": "List the runtimes, command-line tools and desktop apps {{cli}} can install, and which versions are installed",
|
|
933
|
+
"description": "Lists Node.js, Git, uv, Claude Code, Codex, Grok Build, Antigravity CLI, Claude Desktop and ChatGPT: installed or not, the installed and the latest version, how it was installed and where it comes from. Latest versions are cached for an hour; --refresh checks again now.",
|
|
934
|
+
"when": "To see which tools this computer has and which can be upgraded.",
|
|
935
|
+
"alt": {
|
|
936
|
+
"doctor": "Check the API key and each tool's config"
|
|
937
|
+
},
|
|
938
|
+
"opt": {
|
|
939
|
+
"refresh": "Check the latest versions again instead of using the cache"
|
|
940
|
+
},
|
|
941
|
+
"ex": {
|
|
942
|
+
"all": "List every component",
|
|
943
|
+
"refresh": "Check the latest versions again",
|
|
944
|
+
"json": "JSON output for scripts"
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
"install": {
|
|
948
|
+
"summary": "Install runtimes (Node.js, Git, uv), command-line tools or desktop apps",
|
|
949
|
+
"description": "Installs missing components from China-reachable mirrors, checking checksums (and, for desktop apps, the vendor's signature). One that is already installed is left as it is: its version is shown, with the upgrade command when it is behind; --force reinstalls it.\nNode.js, Git and uv are installed into your own user directory by {{brand}}'s install scripts, no administrator needed; don't use sudo. Several components can be given; what they depend on is installed first.",
|
|
950
|
+
"arg": {
|
|
951
|
+
"components": "node, git, uv, claude-code, codex, grok, agy, claude-desktop, chatgpt; several allowed"
|
|
952
|
+
},
|
|
953
|
+
"opt": {
|
|
954
|
+
"force": "Reinstall even when it is already installed"
|
|
955
|
+
},
|
|
956
|
+
"when": "To add a tool to this computer; other apps' install scripts can call it too (npx {{package}} install …).",
|
|
957
|
+
"needs": "Node.js on this computer ({{cli}} itself runs on Node); without Node, use the one-line installer first",
|
|
958
|
+
"alt": {
|
|
959
|
+
"upgrade": "Upgrade components that are installed",
|
|
960
|
+
"setup": "Then save your API key and configure the tools"
|
|
961
|
+
},
|
|
962
|
+
"ex": {
|
|
963
|
+
"runtimes": "Install Node.js and uv",
|
|
964
|
+
"clis": "Install Claude Code and Codex",
|
|
965
|
+
"app": "Install the ChatGPT desktop app (contains Codex)",
|
|
966
|
+
"force": "Reinstall uv",
|
|
967
|
+
"json": "Install from a script, JSON output"
|
|
968
|
+
}
|
|
969
|
+
},
|
|
854
970
|
"upgrade": {
|
|
855
|
-
"summary": "Upgrade
|
|
856
|
-
"description": "Upgrades each copy the way it was installed: native installs use the tool's own updater, npm installs are reinstalled from the China mirror (npmmirror), Homebrew installs use brew upgrade; if a native or Homebrew upgrade doesn't work, {{brand}}'s install script is used (programs from the China mirror). A named tool that is not installed yet is installed with that script.\nClaude Desktop and ChatGPT (with Codex inside; macOS / Windows) older than the download site's build are upgraded from the official installer there, after checking its checksum and the vendor's (Anthropic / OpenAI) signature; their own auto-update stays on, {{cli}} only steps in when they fall behind. A running app is only closed after a yes at a terminal; with --yes or without a terminal it is left running and only a hint is printed. Add --force to reinstall one that is already the latest. ChatGPT for Mac needs Apple silicon.\nWith
|
|
971
|
+
"summary": "Upgrade coding tools, desktop apps and runtimes (Node.js, Git, uv)",
|
|
972
|
+
"description": "Upgrades each copy the way it was installed: native installs use the tool's own updater, npm installs are reinstalled from the China mirror (npmmirror), Homebrew installs use brew upgrade; if a native or Homebrew upgrade doesn't work, {{brand}}'s install script is used (programs from the China mirror). A named tool that is not installed yet is installed with that script.\nClaude Desktop and ChatGPT (with Codex inside; macOS / Windows) older than the download site's build are upgraded from the official installer there, after checking its checksum and the vendor's (Anthropic / OpenAI) signature; their own auto-update stays on, {{cli}} only steps in when they fall behind. A running app is only closed after a yes at a terminal; with --yes or without a terminal it is left running and only a hint is printed. Add --force to reinstall one that is already the latest. ChatGPT for Mac needs Apple silicon.\nNode.js, Git and uv are only upgraded where {{brand}}'s install scripts manage them (Node under fnm, uv in ~/.local/bin, Git for Windows installed for the current user); a copy from Homebrew, nvm, a system package manager … is left alone and the command that upgrades it is shown; --force adds a copy {{cli}} manages. After fnm's Node is upgraded, the npm packages installed globally before are installed into the new one at the same versions.\nWith nothing named, upgrades every installed coding tool and desktop app, and points out runtimes that are behind.\nTo update {{product}} itself, use {{cli}} update.",
|
|
857
973
|
"arg": {
|
|
858
|
-
"tools": "claude-code, codex, grok, agy, claude-desktop, chatgpt; one or more"
|
|
974
|
+
"tools": "claude-code, codex, grok, agy, claude-desktop, chatgpt, node, git, uv; one or more"
|
|
859
975
|
},
|
|
860
976
|
"ex": {
|
|
861
977
|
"all": "Upgrade every installed tool",
|
|
862
978
|
"one": "Upgrade only Claude Code",
|
|
863
979
|
"many": "Upgrade Codex and Antigravity CLI",
|
|
864
980
|
"desktop": "Install Claude Desktop, or upgrade it to the download site's latest build",
|
|
865
|
-
"force": "Reinstall ChatGPT even though it is the latest (when the app is broken)"
|
|
981
|
+
"force": "Reinstall ChatGPT even though it is the latest (when the app is broken)",
|
|
982
|
+
"runtime": "Upgrade Node.js (fnm-managed; otherwise the command that upgrades it)"
|
|
866
983
|
},
|
|
867
984
|
"when": "When {{cli}} doctor reports an old version, or the tool's own updater doesn't finish.",
|
|
868
985
|
"needs": "Without tool names, only installed tools are upgraded",
|
|
@@ -870,7 +987,7 @@
|
|
|
870
987
|
"update": "Update {{product}} itself"
|
|
871
988
|
},
|
|
872
989
|
"opt": {
|
|
873
|
-
"force": "
|
|
990
|
+
"force": "Reinstall desktop apps and runtimes that are already the latest; for a runtime installed another way, add a copy {{cli}} manages"
|
|
874
991
|
}
|
|
875
992
|
},
|
|
876
993
|
"refresh": {
|
|
@@ -1074,6 +1191,8 @@
|
|
|
1074
1191
|
"offer_quit": "Quit {{tool}} and upgrade to {{latest}}?",
|
|
1075
1192
|
"declined_hint": "Not upgraded. Run {{command}} later",
|
|
1076
1193
|
"quit_failed": "Couldn't quit {{tool}}, so it wasn't upgraded: quit it yourself, then run {{command}}",
|
|
1194
|
+
"quit_confirm_in_app": "{{tool}} didn't quit: it may have a task running or be asking you to confirm. Switch to {{tool}} and confirm the quit there (or quit it once the task is done); the upgrade goes on here (waiting up to {{seconds}} s)…",
|
|
1195
|
+
"quit_refused": "{{tool}} didn't quit, so it wasn't upgraded: it has a task running or is waiting for you to confirm. Confirm the quit in {{tool}} (or quit it once the task is done), then run {{command}}",
|
|
1077
1196
|
"upgraded": "Upgraded {{tool}} from {{from}} to {{to}}",
|
|
1078
1197
|
"installed": "Installed {{tool}} {{version}}",
|
|
1079
1198
|
"upgrade_failed": "Couldn't upgrade {{tool}}: {{reason}}. {{current}} still works; fix the cause, then run {{command}}",
|
package/dist/locales/zh_CN.json
CHANGED
|
@@ -462,6 +462,83 @@
|
|
|
462
462
|
"native_mirror_failed": "无法从国内镜像替换:{{reason}}",
|
|
463
463
|
"install_label": "{{kind}} {{version}}({{path}})"
|
|
464
464
|
},
|
|
465
|
+
"components": {
|
|
466
|
+
"category": {
|
|
467
|
+
"runtime": "运行环境",
|
|
468
|
+
"cli": "命令行工具",
|
|
469
|
+
"app": "桌面应用"
|
|
470
|
+
},
|
|
471
|
+
"col": {
|
|
472
|
+
"name": "组件",
|
|
473
|
+
"current": "已装",
|
|
474
|
+
"latest": "最新",
|
|
475
|
+
"managed": "安装方式",
|
|
476
|
+
"state": "状态"
|
|
477
|
+
},
|
|
478
|
+
"by": {
|
|
479
|
+
"fnm": "fnm",
|
|
480
|
+
"brew": "Homebrew",
|
|
481
|
+
"nvm": "nvm",
|
|
482
|
+
"volta": "Volta",
|
|
483
|
+
"scoop": "Scoop",
|
|
484
|
+
"asdf": "asdf",
|
|
485
|
+
"mise": "mise",
|
|
486
|
+
"system": "系统自带",
|
|
487
|
+
"standalone": "独立安装",
|
|
488
|
+
"pipx": "pipx",
|
|
489
|
+
"pip": "pip",
|
|
490
|
+
"winget": "winget",
|
|
491
|
+
"git-for-windows-user": "Git for Windows(当前用户)",
|
|
492
|
+
"git-for-windows": "Git for Windows",
|
|
493
|
+
"xcode": "苹果命令行工具",
|
|
494
|
+
"native": "原生安装",
|
|
495
|
+
"npm": "npm",
|
|
496
|
+
"app": "应用",
|
|
497
|
+
"other": "其他"
|
|
498
|
+
},
|
|
499
|
+
"state": {
|
|
500
|
+
"unsupported": "这个系统不提供",
|
|
501
|
+
"missing": "未安装:{{command}}",
|
|
502
|
+
"outdated_auto": "可升级:{{command}}",
|
|
503
|
+
"outdated_manual": "可升级:{{how}}",
|
|
504
|
+
"latest": "已是最新",
|
|
505
|
+
"unknown_latest": "已安装"
|
|
506
|
+
},
|
|
507
|
+
"source": "来源:{{source}}",
|
|
508
|
+
"latest_unknown": "暂时查不到最新版本:{{tools}}(稍后运行 {{cli}} list --refresh 再查)",
|
|
509
|
+
"unknown": "不认识的组件:{{names}}",
|
|
510
|
+
"known": "可以安装的组件:{{ids}}",
|
|
511
|
+
"unsupported_platform": "这个系统不提供 {{tool}}",
|
|
512
|
+
"blocked_sudo": "不要用 sudo 安装 {{tool}}:会装进 root 的用户目录,归 root 所有。去掉 sudo,用平常的账号再运行一次",
|
|
513
|
+
"blocked_system": "当前是系统账号(SYSTEM),{{tool}} 会装进系统配置目录:登录要用它的账号后再运行",
|
|
514
|
+
"blocked_unsupported_platform": "这个系统不提供 {{tool}}",
|
|
515
|
+
"reason_sudo": "不能用 sudo 安装",
|
|
516
|
+
"reason_system": "当前是系统账号(SYSTEM)",
|
|
517
|
+
"reason_unsupported_platform": "这个系统不提供",
|
|
518
|
+
"no_mirror": "无法安装 {{tool}}:没有配置安装脚本的下载地址",
|
|
519
|
+
"already_installed": "已安装 {{tool}} {{current}}",
|
|
520
|
+
"up_to_date": "{{tool}} {{current}} 已是最新",
|
|
521
|
+
"force_hint": "要重新安装就运行 {{command}}",
|
|
522
|
+
"outdated_auto": "{{tool}} 当前 {{current}},可升到 {{latest}}:运行 {{command}}",
|
|
523
|
+
"outdated_manual": "{{tool}} 当前 {{current}},可升到 {{latest}}。这份是用 {{by}} 安装的,{{cli}} 不改动它:运行 {{how}} 升级;要另装一份由 {{cli}} 管理的,运行 {{command}}",
|
|
524
|
+
"no_latest": "{{tool}} {{current}} 由系统管理,{{cli}} 不升级它:{{how}}",
|
|
525
|
+
"how_system": "用安装它的方式升级(系统包管理器或官方安装包),或加 --force 另装一份由 {{cli}} 管理的",
|
|
526
|
+
"how_xcode": "在「系统设置 → 通用 → 软件更新」里更新苹果命令行工具",
|
|
527
|
+
"how_other": "用安装它的方式升级",
|
|
528
|
+
"force_beside": "{{tool}} 已有一份({{path}},{{by}} 安装),按 --force 另装一份由 {{cli}} 管理的",
|
|
529
|
+
"installing": "正在安装 {{tool}} {{latest}}({{source}})…",
|
|
530
|
+
"upgrading": "正在升级 {{tool}} 到 {{latest}}({{source}})…",
|
|
531
|
+
"script_failed": "{{tool}} 没有装好,原因见上方。排除原因后运行 {{command}}",
|
|
532
|
+
"installed": "已安装 {{tool}} {{version}}",
|
|
533
|
+
"upgraded": "已把 {{tool}} 从 {{from}} 升到 {{to}}",
|
|
534
|
+
"reinstalled": "已重新安装 {{tool}} {{version}}",
|
|
535
|
+
"reinstalling": "按 --force 重新安装 {{tool}}(当前 {{current}})",
|
|
536
|
+
"path_shadowed": "终端里先找到的是 {{active}},不是刚装好的 {{tool}} {{version}}({{path}}):把后者所在目录放到 PATH 前面,或删掉前者",
|
|
537
|
+
"capped": "{{tool}} {{latest}} 不能在这台电脑上运行,安装脚本装的是能运行的最新版 {{version}};有更新的版本时再提示升级",
|
|
538
|
+
"new_terminal": "新开一个终端窗口后可以直接使用",
|
|
539
|
+
"migrating_globals": "新版 Node 里还没有原来全局安装的这些包,正在装上同一版本:{{packages}}",
|
|
540
|
+
"migrate_failed": "原来全局安装的包没有全部装到新版 Node 里,可以手动运行:{{command}}"
|
|
541
|
+
},
|
|
465
542
|
"install": {
|
|
466
543
|
"permission_unix": "多半是 npm 没有权限写入全局目录。可以任选一种:① sudo {{command}};② 运行 npm config set prefix ~/.npm-global,把 export PATH=~/.npm-global/bin:$PATH 加入 ~/.zshrc 或 ~/.bashrc,重新打开终端后再运行 {{command}}",
|
|
467
544
|
"permission_windows": "多半是权限不足或文件被占用:请关闭正在运行的这个工具,以管理员身份打开终端,再运行 {{command}}",
|
|
@@ -851,18 +928,58 @@
|
|
|
851
928
|
"doctor": "先自行检查常见问题"
|
|
852
929
|
}
|
|
853
930
|
},
|
|
931
|
+
"list": {
|
|
932
|
+
"summary": "列出 {{cli}} 能装的运行环境、命令行工具和桌面应用,以及装了哪个版本",
|
|
933
|
+
"description": "列出 Node.js、Git、uv、Claude Code、Codex、Grok Build、Antigravity CLI、Claude Desktop、ChatGPT:装了没有、当前版本、最新版本、用什么方式装的、从哪下载。最新版本缓存一小时,加 --refresh 立即重新查。",
|
|
934
|
+
"when": "想知道这台电脑上装了哪些工具、哪些可以升级时。",
|
|
935
|
+
"alt": {
|
|
936
|
+
"doctor": "检查令牌和各工具的配置"
|
|
937
|
+
},
|
|
938
|
+
"opt": {
|
|
939
|
+
"refresh": "不用缓存,重新查最新版本"
|
|
940
|
+
},
|
|
941
|
+
"ex": {
|
|
942
|
+
"all": "列出全部组件",
|
|
943
|
+
"refresh": "重新查最新版本",
|
|
944
|
+
"json": "输出 JSON,给脚本用"
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
"install": {
|
|
948
|
+
"summary": "安装运行环境(Node.js、Git、uv)、命令行工具或桌面应用",
|
|
949
|
+
"description": "从国内镜像安装缺少的组件,下载后核对校验值(桌面应用还核对厂商签名)。已经装过的不覆盖:只显示当前版本,落后时给出升级命令;加 --force 重新安装。\nNode.js、Git、uv 用 {{brand}} 的安装脚本装进当前用户目录,不需要管理员权限;不要加 sudo。可以写多个组件,有依赖的先装依赖。",
|
|
950
|
+
"arg": {
|
|
951
|
+
"components": "node、git、uv、claude-code、codex、grok、agy、claude-desktop、chatgpt,可以填写多个"
|
|
952
|
+
},
|
|
953
|
+
"opt": {
|
|
954
|
+
"force": "已经装过也重新安装"
|
|
955
|
+
},
|
|
956
|
+
"when": "要在这台电脑上补装某个工具时;别的应用的安装脚本也可以调用它(npx {{package}} install …)。",
|
|
957
|
+
"needs": "这台电脑已有 Node.js({{cli}} 本身要 Node);还没有 Node 时先用一键安装脚本",
|
|
958
|
+
"alt": {
|
|
959
|
+
"upgrade": "升级已经装好的组件",
|
|
960
|
+
"setup": "装好后写入令牌并配置各工具"
|
|
961
|
+
},
|
|
962
|
+
"ex": {
|
|
963
|
+
"runtimes": "安装 Node.js 和 uv",
|
|
964
|
+
"clis": "安装 Claude Code 和 Codex",
|
|
965
|
+
"app": "安装 ChatGPT 桌面版(内含 Codex)",
|
|
966
|
+
"force": "uv 已经装过也重新安装",
|
|
967
|
+
"json": "在脚本里安装,输出 JSON"
|
|
968
|
+
}
|
|
969
|
+
},
|
|
854
970
|
"upgrade": {
|
|
855
|
-
"summary": "
|
|
856
|
-
"description": "按每份工具当初的安装方式升级:原生安装用工具自带的更新,npm 安装从国内镜像(npmmirror)重新安装,Homebrew 安装用 brew upgrade;原生或 Homebrew 方式无法升级时,改用 {{brand}} 一键安装脚本(程序取自国内镜像)。指定了但还没有安装的工具,也用这个脚本安装。\nClaude Desktop 和 ChatGPT(内含 Codex;macOS / Windows)比高速下载站上的版本旧时,从高速下载站下载官方安装包,核对校验值和厂商(Anthropic / OpenAI)的签名后安装;它们自带的自动更新照常开着,{{cli}} 只在没跟上时补上。应用正在运行时,在终端里问过才关掉它升级,带 --yes 或没有终端时只提示、不关。已是最新时加 --force 重新安装。ChatGPT 的 Mac 版只支持 Apple 芯片。\n
|
|
971
|
+
"summary": "升级编码工具、桌面应用和运行环境(Node.js、Git、uv)",
|
|
972
|
+
"description": "按每份工具当初的安装方式升级:原生安装用工具自带的更新,npm 安装从国内镜像(npmmirror)重新安装,Homebrew 安装用 brew upgrade;原生或 Homebrew 方式无法升级时,改用 {{brand}} 一键安装脚本(程序取自国内镜像)。指定了但还没有安装的工具,也用这个脚本安装。\nClaude Desktop 和 ChatGPT(内含 Codex;macOS / Windows)比高速下载站上的版本旧时,从高速下载站下载官方安装包,核对校验值和厂商(Anthropic / OpenAI)的签名后安装;它们自带的自动更新照常开着,{{cli}} 只在没跟上时补上。应用正在运行时,在终端里问过才关掉它升级,带 --yes 或没有终端时只提示、不关。已是最新时加 --force 重新安装。ChatGPT 的 Mac 版只支持 Apple 芯片。\nNode.js、Git、uv 只升级由 {{brand}} 安装脚本管理的那一份(fnm 装的 Node、~/.local/bin 里的 uv、装在当前用户下的 Git for Windows);用 Homebrew、nvm、系统包管理器等装的,给出对应的升级命令、不改动它,加 --force 另装一份由 {{cli}} 管理的。fnm 的 Node 升级后,原来全局安装的 npm 包会按原版本装到新版里。\n不填名字则升级已安装的全部编码工具和桌面应用,并提示可以升级的运行环境。\n升级 {{product}} 本身请用 {{cli}} update。",
|
|
857
973
|
"arg": {
|
|
858
|
-
"tools": "claude-code、codex、grok、agy、claude-desktop、chatgpt,可以填写多个"
|
|
974
|
+
"tools": "claude-code、codex、grok、agy、claude-desktop、chatgpt、node、git、uv,可以填写多个"
|
|
859
975
|
},
|
|
860
976
|
"ex": {
|
|
861
977
|
"all": "升级已安装的全部工具",
|
|
862
978
|
"one": "只升级 Claude Code",
|
|
863
979
|
"many": "升级 Codex 和 Antigravity CLI",
|
|
864
980
|
"desktop": "安装 Claude Desktop,或升到高速下载站上的最新版",
|
|
865
|
-
"force": "ChatGPT 已是最新也重新安装一遍(应用损坏时)"
|
|
981
|
+
"force": "ChatGPT 已是最新也重新安装一遍(应用损坏时)",
|
|
982
|
+
"runtime": "升级 Node.js(fnm 安装的;别的方式装的给出升级命令)"
|
|
866
983
|
},
|
|
867
984
|
"when": "{{cli}} doctor 提示版本过低,或工具自带的更新无法完成时。",
|
|
868
985
|
"needs": "不填工具名时,只升级已经安装的工具",
|
|
@@ -870,7 +987,7 @@
|
|
|
870
987
|
"update": "升级 {{product}} 本身"
|
|
871
988
|
},
|
|
872
989
|
"opt": {
|
|
873
|
-
"force": "
|
|
990
|
+
"force": "桌面应用和运行环境已是最新也重新安装;运行环境由别的方式装的,另装一份由 {{cli}} 管理的"
|
|
874
991
|
}
|
|
875
992
|
},
|
|
876
993
|
"refresh": {
|
|
@@ -1074,6 +1191,8 @@
|
|
|
1074
1191
|
"offer_quit": "关掉 {{tool}} 并升到 {{latest}}?",
|
|
1075
1192
|
"declined_hint": "没有升级。之后可以运行 {{command}}",
|
|
1076
1193
|
"quit_failed": "无法退出 {{tool}},这次没有升级:手动退出后运行 {{command}}",
|
|
1194
|
+
"quit_confirm_in_app": "{{tool}} 没有退出:它可能有任务正在运行,或弹出了确认框。请切到 {{tool}},在它的提示里确认退出(或等任务结束后退出),这里会接着升级(最多等 {{seconds}} 秒)…",
|
|
1195
|
+
"quit_refused": "{{tool}} 没有退出,这次没有升级:它有任务正在运行或在等你确认。在 {{tool}} 里确认退出(或等任务结束后退出),再运行 {{command}}",
|
|
1077
1196
|
"upgraded": "已把 {{tool}} 从 {{from}} 升到 {{to}}",
|
|
1078
1197
|
"installed": "已安装 {{tool}} {{version}}",
|
|
1079
1198
|
"upgrade_failed": "无法升级 {{tool}}:{{reason}}。当前的 {{current}} 照常可用;排除原因后运行 {{command}}",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibeapi/api-helper",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.149",
|
|
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",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
18
18
|
"models.json",
|
|
19
|
+
"components.json",
|
|
19
20
|
"client-config.snapshot.json",
|
|
20
21
|
"settings-template.json",
|
|
21
22
|
"codex-base-instructions.md",
|