@phren/cli
Version:
Knowledge layer for AI agents - CLI, MCP server, and data layer
35 lines (34 loc) • 1.23 kB
TypeScript
export declare const ENROLL_DEVICE_USAGE = "enroll-device [--device ios|android] [--name <device name>] < public-key";
export type EnrollDeviceReply = {
v: 1;
ok: true;
added: boolean;
user: string;
computer: {
id: string | null;
name: string;
};
hook: string;
} | {
v: 1;
ok: false;
code: "bad-key" | "key-conflict" | "enroll-busy" | "ssh-directory" | "usage" | "internal";
error: string;
};
/**
* Adds one phone's restricted key, the same line `phren pair` writes. The
* phone runs this once over an SSH session it signed into with the user's
* password, then connects with the key. An identical line already present is
* success (`added: false`); the same key with other options is a conflict.
*/
export declare function enrollDevice(input: string, options: {
device: "ios" | "android";
version: string;
sshDirectory?: string;
root?: string;
}): Promise<EnrollDeviceReply>;
/** `bridge-hook.mjs enroll-device`: the key on stdin, one JSON line out. */
export declare function runEnrollDevice(args: string[], version: string, stdin?: AsyncIterable<Buffer | string>, options?: {
sshDirectory?: string;
root?: string;
}): Promise<number>;