# seniority/dotenv/cli

> Every export of seniority/dotenv/cli, with its signature and doc comment: parseRunArgs, run, HELP, plus 2 types.

Source: https://seniority.interlace.tools/docs/api/dotenv/cli

<!-- Generated by scripts/api-reference.ts from the built dist/*.d.ts. Do not edit; run `npx tsx scripts/api-reference.ts`. -->

```ts
import { parseRunArgs, run, HELP } from 'seniority/dotenv/cli';
```

## Functions

### parseRunArgs

dotenv's `parseRunArgs`.

```ts
function parseRunArgs(args: readonly string[]): RunArgs;
```

| Parameter | Type |
| :-- | :-- |
| `args` | `readonly string[]` |

**Returns** `RunArgs`

### run

dotenv's `run`: the whole of `dotenv <argv>`.

```ts
function run(argv: readonly string[], proc?: CliProcess, io?: RunIo): void;
```

| Parameter | Type |
| :-- | :-- |
| `argv` | `readonly string[]` |
| `proc` (optional) | `CliProcess` |
| `io` (optional) | `RunIo` |

**Returns** `void`

## Constants

### HELP

dotenv's help text, to the line.

```ts
const HELP: string;
```

## Interfaces

### RunIo

How the child is started, and how Windows takes its tree down; the real ones unless a test hands in its own.

```ts
interface RunIo {
    spawn?: (command: string, args: readonly string[], options: SpawnOptions) => ChildProcess;
    spawnSync?: (command: string, args: readonly string[], options: {
        stdio: 'ignore';
    }) => unknown;
}
```

## Types

### RunArgs

The command line, read: dotenv's flags up to the command, and the command with everything after it.

```ts
type RunArgs = {
    help: true;
} | {
    error: string;
} | {
    paths: string[];
    pathSet: boolean;
    quiet?: boolean;
    debug?: boolean;
    override?: boolean;
    fast?: boolean;
    command: string[];
};
```
