# @commonfabric/cli ## Launcher Contract `packages/cli/launcher.ts` is the stable Deno launcher for consumers that need to run the Common Fabric CLI from another repo or from a sandbox. It keeps the selected Labs checkout as the source of truth while making the child CLI process use an explicit Deno config/import map. The launcher itself intentionally uses only Deno built-ins so callers can invoke it before the Labs import map is active. Launcher options are parsed before the first non-launcher argument or `--`. Use `--` when a `cf` argument has the same name as a launcher option: ```bash deno task cf -- --config piece-config.json ``` Launcher `--config` is the child Deno config/import map used to start the CLI. It is not a `cf` command or pattern config. The child CLI working directory defaults to `INIT_CWD` when present, otherwise the launcher's current directory. This preserves `deno task cf` behavior from a caller directory. Direct sandbox or wrapper callers should pass `--cwd` when they need to ignore a stale inherited `INIT_CWD`. The child CLI process inherits the parent environment. The launcher only adds `CF_CLI_NAME=cf`, so caller-provided `CF_API_URL`, `CF_IDENTITY`, experimental flags, and CFC/sandbox-related environment variables continue to flow through. From the Labs checkout: ```bash deno task cf --help deno task cf check packages/cli/fixtures/pattern.tsx --no-run ``` From a sibling consumer such as Pattern Factory: ```bash deno run --allow-run --allow-env --allow-read ../labs/packages/cli/launcher.ts \ -- check workspace//pattern/main.tsx --no-run ``` From a vendored consumer such as Loom: ```bash deno run --allow-run --allow-env --allow-read vendor/labs/packages/cli/launcher.ts \ --labs-root vendor/labs \ --config deno.jsonc \ -- check .ops/patterns/example.tsx --no-run ``` Use `--launcher-help` for launcher-specific help. Normal CLI flags such as `--help` are passed through to `cf`.