## Usage

```bash
bunx [flags] <package>[@version] [flags and arguments for the package]
```

Execute an npm package executable (CLI). If the package isn't installed in `node_modules`, Bun installs it into a global shared cache.

### Flags

<ParamField path="--bun" type="boolean">
  Force the command to run with Bun instead of Node.js, even if the executable contains a Node shebang (`#!/usr/bin/env
  node`)
</ParamField>

<ParamField path="-p, --package" type="string">
  Specify package to install when binary name differs from package name
</ParamField>

<ParamField path="--no-install" type="boolean">
  Skip installation if package is not already installed
</ParamField>

<ParamField path="--cwd" type="string">
  Set the working directory
</ParamField>

<ParamField path="--env-file" type="string">
  Load environment variables from the specified file(s)
</ParamField>

<ParamField path="--minimum-release-age" type="number">
  Only install packages published at least N seconds ago (security feature)
</ParamField>

<ParamField path="--trust" type="boolean">
  Run the lifecycle scripts of the package and of **all** of its dependencies during installation
</ParamField>

<ParamField path="--verbose" type="boolean">
  Enable verbose output during installation
</ParamField>

<ParamField path="--silent" type="boolean">
  Suppress output during installation
</ParamField>

### Examples

```bash terminal icon="terminal"
# Run Prisma migrations
bunx prisma migrate

# Print a message
bunx cowsay 'Hello, Bun!'

# Run a specific version of a package
bunx uglify-js@3.14.0 app.js

# Use --package when binary name differs from package name
bunx -p @angular/cli ng new my-app

# Force running with Bun instead of Node.js, even if the executable contains a Node shebang
bunx --bun vite dev foo.js
```
