intent-cli
Version:
A fully functional CLI built with TypeScript and modern tools
45 lines • 1.17 kB
TypeScript
export interface CliOptions {
verbose?: boolean;
config?: string;
output?: string;
}
export interface CommandResult {
success: boolean;
message?: string;
data?: any;
error?: Error;
}
export interface Config {
apiEndpoint?: string;
timeout?: number;
retries?: number;
theme?: 'light' | 'dark' | 'auto';
[key: string]: unknown;
}
export interface ApiError extends Error {
statusCode?: number;
code?: string;
details?: unknown;
}
export interface ProgressInfo {
current: number;
total: number;
message?: string;
}
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
export interface Logger {
debug(message: string, ...args: unknown[]): void;
info(message: string, ...args: unknown[]): void;
warn(message: string, ...args: unknown[]): void;
error(message: string, error?: Error | unknown, ...args: unknown[]): void;
}
export interface Spinner {
start(text?: string): void;
succeed(text?: string): void;
fail(text?: string): void;
warn(text?: string): void;
info(text?: string): void;
stop(): void;
text: string;
}
//# sourceMappingURL=index.d.ts.map