> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meow.style/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment variables

> Every variable meow reads and sets — plus how process.env behaves in each mode.

## Variables meow reads

Set these to change meow's behavior.

| Variable                            | Effect                                                                                                                                   |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `MEOW_HOME`                         | Relocate the global `~/.meow` tree (cache, bin, global installs). Child runtimes inherit it.                                             |
| `MEOW_DANGEROUSLY_DISABLE_SECURITY` | `=1` grants full host access on every run — equivalent to `--trust`.                                                                     |
| `MEOW_NO_SHIM`                      | `=1` makes the `node`/`npm`/… shims exec the real system binary instead of re-entering meow.                                             |
| `MEOW_METADATA_MAX_AGE_SECS`        | Freshness window (seconds) for cached registry metadata. Default `300`. `0` always revalidates; a large value stays effectively offline. |
| `MEOW_INSTALL_TRACE`                | When set, prints per-phase install timings (resolve, lockfile, materialize) to stderr.                                                   |
| `MEOW_TSC`                          | Path to a specific `tsc` binary for `meow types` (the contributor type-gen command).                                                     |
| `NODE_OPTIONS`                      | meow reads `--max-old-space-size=<MiB>` from it, for drop-in compatibility.                                                              |

### Terminal & output control

The UI engine resolves its rendering from standard terminal signals — so meow
plays well with CI and pipelines automatically.

| Variable                            | Effect                                                                |
| ----------------------------------- | --------------------------------------------------------------------- |
| `NO_COLOR`                          | Disable all color.                                                    |
| `FORCE_COLOR`                       | Force color depth (`0` off, `1`/`2`/`3` for 16/256/truecolor).        |
| `CLICOLOR_FORCE`                    | Non-`0` forces color even when not a TTY.                             |
| `CI`                                | When set, meow assumes a non-interactive environment (no animations). |
| `TERM`, `COLORTERM`, `TERM_PROGRAM` | Detect color/Unicode capabilities.                                    |
| `COLUMNS`                           | Width hint for layout.                                                |
| `LANG`, `LC_ALL`, `LC_CTYPE`        | UTF-8 detection for glyphs.                                           |

<Tip>
  In a pipe or CI, meow drops spinners, animations, and ANSI automatically — output
  stays clean and greppable. You rarely need to set these by hand.
</Tip>

## Variables meow sets

When meow runs your code, it injects a few variables so Node-style tooling finds
its bearings:

| Variable                                       | Value                                                                         |
| ---------------------------------------------- | ----------------------------------------------------------------------------- |
| `MEOW_NODE_SHIM`                               | `1` while running through meow, so re-entrant `node` calls route correctly.   |
| `MEOW_EXEC_PATH`                               | Path to the meow binary.                                                      |
| `MEOW_NODE_PLATFORM` / `MEOW_NODE_ARCH`        | Normalized platform/arch (`darwin`/`win32`/`linux`, `arm64`/`x64`).           |
| `NODE` / `npm_node_execpath`                   | Path to the shimmed `node`, so tools spawn "the current Node" back into meow. |
| `INIT_CWD`                                     | The directory a `package.json` script was invoked from.                       |
| `npm_lifecycle_event` / `npm_lifecycle_script` | The script name and body, npm-style.                                          |
| `npm_package_json`                             | Absolute path to the project `package.json`.                                  |

For deterministic runs, meow also pins `TZ=UTC` and a fixed locale before creating
the isolate — see [Determinism](/concepts/determinism#timezone--locale-pinning).

## How `process.env` behaves

`process.env` exists only in [`node-compat`](/concepts/modes) (there is no
`process` global in `strict-web` at all). What it contains depends on your grant:

<Tabs>
  <Tab title="node-compat (default)">
    `process.env` is populated from the **full host environment**, like Node.

    ```bash theme={null}
    meow run app.ts          # process.env has everything
    ```

    Narrow it for a more reproducible run:

    ```bash theme={null}
    meow run app.ts --allow-env=API_BASE,LOG_LEVEL
    ```
  </Tab>

  <Tab title="strict-web (default)">
    The host environment is **invisible** — there is no `process` global, and the
    hermetic env seam returns nothing. Grant access explicitly:

    ```bash theme={null}
    meow run app.ts --allow-env=API_BASE      # only API_BASE resolves
    meow run app.ts --allow-env                # everything visible
    ```
  </Tab>
</Tabs>

<Card title="Permissions & trust" icon="shield-halved" href="/concepts/permissions">
  The full grant model for env, clock, and randomness.
</Card>
