/** * Fortify action runners * Programmatic API for running fcli actions */ import type { BootstrapOptions, BootstrapResult } from './types.js'; /** * Options for running actions */ export interface RunActionOptions { /** Action arguments to pass to fcli */ args?: string[]; /** Whether to show bootstrap messages (default: false for clean output) */ verbose?: boolean; /** Bootstrap configuration (cacheDir, fcliUrl, verifySignature, etc.) */ config?: BootstrapOptions; } /** * Result from running an action */ export interface RunActionResult { /** Bootstrap result (fcli path, version, source) */ bootstrap: BootstrapResult; /** Action exit code */ exitCode: number; /** Action output (only available if captureOutput is true) */ output?: string; } /** * Run fcli tool env command programmatically * * Handles both 'init' subcommand (for tool setup) and format subcommands * (shell, github, etc.) for generating environment variables. * * Automatically bootstraps fcli if not available in cache or via config. * * @param options - Action and bootstrap options * @returns Promise with bootstrap and execution results * * @example * ```typescript * import { runFortifyEnv } from '@fortify/setup'; * * // Create reusable bootstrap config * const config = { * cacheDir: '/tmp/fortify/fcli', * fcliUrl: process.env.FCLI_URL * }; * * // Initialize tools * await runFortifyEnv({ * args: ['init', '--tools=sc-client'], * verbose: true, * config * }); * * // Generate environment variables (reusing same config) * await runFortifyEnv({ * args: ['shell'], * config * }); * ``` */ export declare function runFortifyEnv(options?: RunActionOptions): Promise; /** * Manage fcli cache * * @param action - Cache action: 'refresh', 'clear', or 'info' */ export declare function manageFcliCache(action: string, logger?: import("./logger.js").Logger): Promise; /** * Get fcli path without bootstrapping (for env command) * Checks configured fcli first, then cached fcli * * @param options Optional bootstrap options for cache directory resolution * @returns fcli path or null if not available */ export declare function getFcliPathForEnv(options?: BootstrapOptions): string | null; //# sourceMappingURL=actions.d.ts.map