@juspay/neurolink
Version:
The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002
53 lines (52 loc) • 1.5 kB
JavaScript
/**
* CLI Helpers for File Processors
*
* Utilities for CLI integration of the file processor system.
* Provides file loading, processing, and output formatting for CLI commands.
*
* @module processors/cli
*
* @example
* ```typescript
* import {
* loadFileFromPath,
* processFileFromPath,
* listSupportedFileTypes,
* getCliUsage,
* type CliFileProcessingOptions,
* } from "./processors/cli/index.js";
*
* // Process a file with verbose output
* const result = await processFileFromPath("./document.pdf", {
* verbose: true,
* outputFormat: "json",
* });
*
* if (result.success) {
* console.log(`Processed with: ${result.processorUsed}`);
* console.log(result.output);
* } else {
* console.error(`Error: ${result.error}`);
* }
*
* // List all supported file types
* console.log(listSupportedFileTypes());
* ```
*/
// =============================================================================
// MAIN EXPORTS
// =============================================================================
export { detectMimeType,
// Utility functions
fileExists,
// CLI help
getCliUsage, getFileExtension,
// File type listing
getSupportedFileTypes, listSupportedFileTypes,
// File loading
loadFileFromPath,
// File processing
processFileFromPath, } from "./fileProcessorCli.js";
// =============================================================================
// TYPE EXPORTS
// =============================================================================