> ## 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.

# Run commands

> init, run, dev, task, x, and eval — full flag reference.

## Shared run flags

`run`, `dev`, `task`, and `x` share a common set of grant and engine flags:

| Flag                         | Description                                                  |
| ---------------------------- | ------------------------------------------------------------ |
| `--allow-clock`              | Use the real system clock (run is no longer reproducible).   |
| `--allow-random`             | Use OS entropy for `Math.random` / `crypto.getRandomValues`. |
| `--allow-env[=NAMES]`        | Expose host env. Bare = all; `=A,B` scopes to those names.   |
| `--trust`                    | Grant full host access (clock + random + env).               |
| `--max-old-space-size <MiB>` | V8 heap limit, like Node. Also read from `NODE_OPTIONS`.     |
| `--v8-flags <FLAGS>`         | Pass comma-separated flags straight to V8.                   |

See [Permissions](/concepts/permissions) for the grant model.

***

## meow init

Scaffold a new project in the current directory.

```bash theme={null}
meow init
meow init --mode node-compat
meow init --force --no-install
```

| Flag            | Default      | Description                                             |
| --------------- | ------------ | ------------------------------------------------------- |
| `--mode <mode>` | `strict-web` | `strict-web` or `node-compat`.                          |
| `--force`       | off          | Overwrite existing `meow.config.json` / `package.json`. |
| `--no-install`  | off          | Skip the dependency install after scaffolding.          |

Writes `meow.config.json`, a minimal `package.json`, and a starter `main.ts`; runs
`meow sync`; then `meow install` (unless `--no-install`).

***

## meow run

Execute a file or a `package.json` script.

```bash theme={null}
meow run main.ts
meow run build
meow run app.ts -- --port 8080      # forward args after --
meow run app.ts --allow-clock
```

| Argument     | Description                                                     |
| ------------ | --------------------------------------------------------------- |
| `<target>`   | A script name (matched in `package.json` first) or a file path. |
| `-- <args…>` | Arguments forwarded to your program as `argv`.                  |

Plus the [shared run flags](#shared-run-flags).

***

## meow dev

Shorthand for `meow run dev`, with a cold-start banner.

```bash theme={null}
meow dev
meow dev -- --host 0.0.0.0
```

Accepts the shared run flags and `-- <args…>`.

***

## meow task

Run a `package.json` script by name (explicit form, no file-path inference).

```bash theme={null}
meow task build
meow task deploy -- --dry-run
```

| Argument     | Description                        |
| ------------ | ---------------------------------- |
| `<name>`     | The script name in `package.json`. |
| `-- <args…>` | Forwarded arguments.               |

***

## meow test

Discover and run the test suite in deterministic V8 isolates.

```bash theme={null}
meow test
```

meow runs every `*.test.*` / `*.spec.*` file (`.ts`, `.tsx`, `.js`, `.jsx`, `.mts`,
`.mjs`, `.cts`, `.cjs`), each in its own hermetic isolate, and prints a pass/fail
summary. Exits non-zero if any test fails. Tests use the
[`meow:test`](/api/test) API. See [Testing](/toolchain/test).

***

## meow x

Ephemeral package execution — install to a temp workspace, run, discard.
Aliased as `execute`, and reachable via the `npx`/`bunx`/`meowx` binary names.

```bash theme={null}
meow x create-vite my-app
meow x prettier@latest . --write
meow x wrangler deploy --trust       # grants may trail the package
```

| Argument    | Description                                         |
| ----------- | --------------------------------------------------- |
| `<package>` | Package to run, optionally `@version` or `@tag`.    |
| `<args…>`   | Forwarded to the package's binary (no `--` needed). |

Accepts the shared run flags; they may also appear **after** the package name.
`MEOW_DANGEROUSLY_DISABLE_SECURITY=1` grants trust persistently.

***

## eval & print

Run inline source without a file.

```bash theme={null}
meow -e "console.log(2 + 2)"
meow -p "Math.max(3, 7)"           # wraps the expression in console.log
```

| Flag            | Description                    |
| --------------- | ------------------------------ |
| `-e`, `--eval`  | Evaluate the given source.     |
| `-p`, `--print` | Evaluate and print the result. |

<Card title="Package commands" icon="box" href="/cli/packages">
  install, add, remove, search.
</Card>
