cli
Install the required plugin:
tynd add cliimport { cli } from "@tynd/plugin-cli/client";Read the host process’s command-line arguments. Argv is captured once when the host boots and parsed lazily; the frontend additionally caches the parsed Promise so repeated cli.matches() calls don’t roundtrip through the IPC bridge.
API surface
Section titled “API surface”cli.matches(): Promise<CliMatches>— parsed argv (positionalargs,flags,subcommand).cli.raw(): Promise<string[]>— untouched argv snapshot, includingargv[0](the binary path).
CliMatches:
interface CliMatches { args: string[]; flags: Record<string, string | boolean>; subcommand: string | null; raw: string[];}