@phren/cli
Version:
Knowledge layer for AI agents - CLI, MCP server, and data layer
31 lines (30 loc) • 1.83 kB
TypeScript
/** Entries of the default home every account shares by symlink. */
export declare const SHARED_ENTRIES: string[];
/** Refresh every extra home's mcpServers from the default home. Returns the ids that changed. */
export declare function syncAccountMcpServers(env?: NodeJS.ProcessEnv): Promise<string[]>;
export interface AddedAccount {
id: string;
dir: string;
linked: string[];
created: boolean;
warning?: string;
}
/** A valid account name for `name`, or for the account's email when one is known: its user and the
* first part of its domain (`sam@example.com` is `sam-example`), lowercase, runs of anything else as one dash. */
export declare function suggestAccountSlug(name: string, email?: string): string;
/** Why `slug` is not an account name, with one that is. */
export declare function badAccountSlug(slug: string, email?: string): string;
/** `locked`: an ssh session on a Mac whose login keychain it cannot use (Claude keeps a Mac's login there,
* so a /login made in it is never saved). `unknown`: the check itself failed. A local session is never checked. */
export type KeychainState = "usable" | "locked" | "unknown";
export declare function sshKeychainState(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, exec?: (file: string, args: string[], options: {
timeout: number;
}) => Promise<unknown>): Promise<KeychainState>;
export declare const KEYCHAIN_UNKNOWN_WARNING = "Couldn't check this Mac's login keychain from this ssh session; if /login doesn't stick, run this on the Mac itself.";
export declare function keychainLockedMessage(slug: string, label?: string): string;
export declare function addClaudeAccount(slug: string, opts?: {
label?: string;
email?: string;
env?: NodeJS.ProcessEnv;
keychainState?: () => Promise<KeychainState>;
}): Promise<AddedAccount>;