#!/usr/bin/env node import { ThingD, type ThingDDriver } from "@thingd/sdk"; type CliEnv = Record; type WritableLike = { write(chunk: string): void; }; type ReadableLike = NodeJS.ReadableStream; export type RunCliOptions = { env?: CliEnv; stdout?: WritableLike; stderr?: WritableLike; stdin?: ReadableLike; }; export type ParsedArgs = { tokens: string[]; flags: Map; booleans: Set; }; export type CliContext = { parsed: ParsedArgs; env: CliEnv; stdout: WritableLike; stderr: WritableLike; stdin: ReadableLike; pretty: boolean; }; export type ConnectionOptions = { path: string; driver?: ThingDDriver; authToken?: string; cloud: boolean; /** Cloud instance slug for multi-instance routing. */ instanceSlug?: string; }; export declare function runCli(args?: string[], options?: RunCliOptions): Promise; export declare function withDb(context: CliContext, callback: (db: ThingD) => Promise): Promise; export declare function resolveConnection(context: CliContext): ConnectionOptions; export declare function hasFlag(parsed: ParsedArgs, name: string): boolean; export declare function stringFlag(parsed: ParsedArgs, name: string): string | undefined; export declare function stringFlags(parsed: ParsedArgs, name: string): string[] | undefined; export declare function requiredFlag(parsed: ParsedArgs, name: string): string; export declare function optionalToken(parsed: ParsedArgs, index: number): string | undefined; export declare function requiredToken(parsed: ParsedArgs, index: number, name: string): string; export declare function writeJson(target: WritableLike, data: unknown, pretty: boolean): void; export declare function writeText(target: WritableLike, text: string): void; export {}; //# sourceMappingURL=index.d.ts.map