filecoin-pin
Version:
Bridge IPFS content to Filecoin Onchain Cloud using familiar tools
47 lines • 1.47 kB
TypeScript
/**
* Shared CLI helper utilities for consistent command-line experience
*/
/**
* Spinner interface for progress indication
* Works in both TTY and non-TTY environments
*/
export type Spinner = {
start: (msg: string) => void;
message: (msg: string) => void;
stop: (msg?: string) => void;
};
/**
* Creates a spinner that works in both TTY and non-TTY environments
*
* In TTY mode: Uses @clack/prompts spinner for nice visual feedback
* In non-TTY mode: Prints simple status messages without ANSI codes
*/
export declare function createSpinner(): Spinner;
/**
* Show intro message with proper TTY handling
*/
export declare function intro(message: string): void;
/**
* Display a cancellation/error message
* In TTY mode, uses clack's cancel for nice formatting
* In non-TTY mode, prints to stderr
*/
export declare function cancel(message: string): void;
/**
* Display a success/completion message
* In TTY mode, uses clack's outro for nice formatting
* In non-TTY mode, prints to stdout
*/
export declare function outro(message: string): void;
/**
* Format file size for human-readable display
*/
export declare function formatFileSize(bytes: number | bigint): string;
/**
* Check if we can perform interactive prompts.
*
* TTY is not enough, we also need to be in an interactive environment.
* CI/CD environments are not interactive.
*/
export declare function isInteractive(): boolean;
//# sourceMappingURL=cli-helpers.d.ts.map