Cli type { kind: "local"; name: string; id: PathId; } | { kind: "global"; name: string; id: PathId; }
import type {Cli} from '@fuzdev/gro/cli.js'; 6 declarations
Cli type { kind: "local"; name: string; id: PathId; } | { kind: "global"; name: string; id: PathId; }
import type {Cli} from '@fuzdev/gro/cli.js'; (name: string, cwd?: string | URL, options?: SpawnOptions | undefined): Promise<Cli | null> import {find_cli} from '@fuzdev/gro/cli.js'; Searches the filesystem for the CLI name, first local to the cwd and then globally.
namestringcwdstring | URLprocess.cwd()options?SpawnOptionsPromise<Cli | null>
null if not found locally or globally
(name_or_cli: string | Cli, args: string[] | undefined, cwd: string | URL | undefined, log?: Logger | undefined, options?: SpawnOptions | undefined): Promise<...> import {resolve_cli} from '@fuzdev/gro/cli.js'; name_or_clistring | Cliargsstring[][]cwdstring | URL | undefinedlog?Loggeroptions?SpawnOptionsPromise<Cli | undefined>
(name_or_cli: string | Cli, args?: string[], log?: Logger | undefined, options?: SpawnOptions | undefined): Promise<SpawnResult | undefined> import {spawn_cli} from '@fuzdev/gro/cli.js'; Spawns a CLI if available using fuz_util's spawn.
If a string is provided for name_or_cli, it checks first local to the cwd and then globally.
name_or_clistring | Cliargsstring[][]log?Loggeroptions?SpawnOptionsPromise<SpawnResult | undefined>
undefined if no CLI is found, or the spawn result
(name_or_cli: string | Cli, args?: string[], log?: Logger | undefined, options?: SpawnOptions | undefined): Promise<SpawnedProcess | undefined> import {spawn_cli_process} from '@fuzdev/gro/cli.js'; Spawns a CLI if available using fuz_util's spawn_process.
If a string is provided for name_or_cli, it checks first local to the cwd and then globally.
name_or_clistring | Cliargsstring[][]log?Loggeroptions?SpawnOptionsPromise<SpawnedProcess | undefined>
undefined if no CLI is found, or the spawn result
(cli: string | Cli): string import {to_cli_name} from '@fuzdev/gro/cli.js'; clistring | Clistring