gigabuddy 0.3.2 → 0.4.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/README.md +23 -2
- package/bin/cli.js +37 -20
- package/index.js +20 -19
- package/package.json +1 -1
- package/src/lib/commands.d.ts +42 -6
package/package.json
CHANGED
package/src/lib/commands.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type UserCredentials } from '@gigabuddy/client-core';
|
|
1
|
+
import { type ResolvedAccount, type UserCredentials } from '@gigabuddy/client-core';
|
|
2
2
|
export declare const PRODUCTION_AUTH_URL = "https://auth.gigabuddy.com";
|
|
3
3
|
export declare const PRODUCTION_API_URL = "https://api.gigabuddy.com";
|
|
4
4
|
export declare const STAGING_AUTH_URL = "https://auth.staging.gigabuddy.com";
|
|
@@ -13,7 +13,12 @@ export declare function resolveEnv(options: {
|
|
|
13
13
|
authUrl?: string;
|
|
14
14
|
apiUrl?: string;
|
|
15
15
|
}): Env;
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Which account a command acts on: an explicit `--account` wins, otherwise the
|
|
18
|
+
* resolved one (env var → repo pin → configured default → 'default').
|
|
19
|
+
*/
|
|
20
|
+
export declare function activeAccount(explicit?: string): ResolvedAccount;
|
|
21
|
+
export declare function signIn(env: Env, account?: string): Promise<UserCredentials>;
|
|
17
22
|
/**
|
|
18
23
|
* `gigabuddy login` — sign in AND set npm up, because for this client they are
|
|
19
24
|
* one act. Installing `@gigabuddy` packages is what the CLI is for: nothing
|
|
@@ -30,6 +35,7 @@ export declare function signIn(env: Env): Promise<UserCredentials>;
|
|
|
30
35
|
*/
|
|
31
36
|
export declare function loginCommand(env: Env, options?: {
|
|
32
37
|
npm?: boolean;
|
|
38
|
+
account?: string;
|
|
33
39
|
}): Promise<void>;
|
|
34
40
|
/**
|
|
35
41
|
* `gigabuddy login --npm` — make `npm install @gigabuddy/…` work as you.
|
|
@@ -39,9 +45,9 @@ export declare function loginCommand(env: Env, options?: {
|
|
|
39
45
|
* can install is still decided per install, against your own access; this only
|
|
40
46
|
* proves who you are.
|
|
41
47
|
*/
|
|
42
|
-
export declare function npmLoginCommand(env: Env): Promise<void>;
|
|
43
|
-
export declare function npmLogoutCommand(env: Env): void;
|
|
44
|
-
export declare function logoutCommand(env: Env): Promise<void>;
|
|
48
|
+
export declare function npmLoginCommand(env: Env, account?: string): Promise<void>;
|
|
49
|
+
export declare function npmLogoutCommand(env: Env, account?: string): void;
|
|
50
|
+
export declare function logoutCommand(env: Env, account?: string): Promise<void>;
|
|
45
51
|
/**
|
|
46
52
|
* `gigabuddy doctor [package]` — why isn't this working?
|
|
47
53
|
*
|
|
@@ -65,4 +71,34 @@ export interface SetupRunner {
|
|
|
65
71
|
* custodies its own credential; our sign-in is neither needed nor offered here.
|
|
66
72
|
*/
|
|
67
73
|
export declare function setupCommand(runner?: SetupRunner): void;
|
|
68
|
-
export
|
|
74
|
+
export interface UpdateRunner {
|
|
75
|
+
/** The latest published version on npm, or null when it can't be read. */
|
|
76
|
+
latestVersion(): string | null;
|
|
77
|
+
/** Run `npm i -g gigabuddy@latest` with output flowing to the user. Returns exit code. */
|
|
78
|
+
installLatest(): number;
|
|
79
|
+
/** Re-run the idempotent plugin refresh. Returns exit code, or 'missing' with no claude binary. */
|
|
80
|
+
refreshPlugin(): number | 'missing';
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* `gigabuddy update` — bring everything gigabuddy on this machine current.
|
|
84
|
+
* Doctor DIAGNOSES and never mutates; this is the verb that acts. There are
|
|
85
|
+
* only two things to act on: this CLI (npm global) and the Claude Code plugin
|
|
86
|
+
* shell (idempotent marketplace refresh). The agent server needs nothing —
|
|
87
|
+
* the plugin launches `@gigabuddy/agent@latest` via npx, so it updates itself.
|
|
88
|
+
*/
|
|
89
|
+
export declare function updateCommand(current: string, runner?: UpdateRunner): Promise<void>;
|
|
90
|
+
export declare function statusCommand(account?: string): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* `gigabuddy accounts` — every account on this machine, who each is signed in
|
|
93
|
+
* as, and which one is active right here (and why).
|
|
94
|
+
*/
|
|
95
|
+
export declare function accountsCommand(): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* `gigabuddy use <name>` — pin the enclosing repository to an account, so every
|
|
98
|
+
* client of client-core resolves it there from now on. `--default` sets the
|
|
99
|
+
* machine-wide fallback instead; `--unpin` removes this repo's pin.
|
|
100
|
+
*/
|
|
101
|
+
export declare function useCommand(name: string | undefined, options?: {
|
|
102
|
+
default?: boolean;
|
|
103
|
+
unpin?: boolean;
|
|
104
|
+
}, cwd?: string): void;
|