> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Lens commands

Use the `lens` command to start the local traffic inspector, open the [findings dashboard in your browser](/docs/postman-passport/passport-cli/dashboard/#open-browser-dashboard), and manage the inspector on your machine. To view findings in the terminal, run `passport` to open the [terminal dashboard](/docs/postman-passport/passport-cli/dashboard/#open-terminal-dashboard).

## `passport lens`

### Usage

```bash
passport lens <command>
```

### Commands

| Command                           | Description                                                                        |
| --------------------------------- | ---------------------------------------------------------------------------------- |
| [`run`](#passport-lens-run)       | Run one command through a temporary local proxy and report masked secret findings. |
| [`start`](#passport-lens-start)   | Start the local traffic inspector in the background.                               |
| [`status`](#passport-lens-status) | Report the traffic inspector state and finding count.                              |
| [`report`](#passport-lens-report) | Serve the findings report at a local URL and open it in your browser.              |
| [`env`](#passport-lens-env)       | Print shell commands that set proxy environment variables.                         |
| [`stop`](#passport-lens-stop)     | Stop the traffic inspector.                                                        |
| [`clean`](#passport-lens-clean)   | Remove certificate-authority material left by an unclean shutdown.                 |

## `passport lens run`

Run one command through a temporary local proxy. Use this to inspect a single command's API traffic and credential usage without setting up environment variables or running the traffic inspector in the background. The proxy starts, intercepts traffic for the duration of the command, then stops.

### Usage

```bash
passport lens run [options] -- <curl command>
```

### Options

**`--show-body`** — default: false

Scan request bodies for secrets in addition to headers and URLs.

---

**`--json`** — default: false

Stream findings as JSON to stderr. Secret values are masked in the output.

---

### Example

```bash
passport lens run -- curl https://api.example.com
```

## `passport lens start`

Start a long-lived background process that observes traffic across multiple commands and shells. Unlike `passport lens run`, which wraps a single command, this enables you to point any tool at the inspector and review findings at any time.

### Usage

```bash
passport lens start [options]
```

### Options

**`-p, --port <port>`** — default: 30914

Port to listen on.

---

**`--show-body`** — default: false

Scan request bodies for secrets in addition to headers and URLs.

---

**`--no-open`**

Start the traffic inspector without opening the report in the browser.

---

To configure your shell to route traffic through the proxy, see [`passport lens env`](#passport-lens-env).

## `passport lens status`

Report the traffic inspector state and finding count.

### Usage

```bash
passport lens status [options]
```

### Options

**`--json`** — default: false

Output status as JSON instead of formatted text.

---

### Example output

```bash
pid       28650
port      30914
started   2026-08-04T18:05:35.313Z
captured  2
findings  /Users/<username>/.postman/passport/lens/lens-results.jsonl
report    http://127.0.0.1:52912/
```

## `passport lens report`

Serve the findings report at a local URL and open it in your browser.

### Usage

```bash
passport lens report [options]
```

### Options

**`-p, --port <port>`**

Port to serve on. Defaults to an available port.

---

**`--no-open`**

Print the report URL without opening it in the browser.

---

### Examples

```bash
passport lens report

passport lens report --port 7000 --no-open
```

## `passport lens env`

Print the proxy environment variables that tell curl and other HTTP clients to route traffic through the local proxy.

### Usage

```bash
passport lens env
```

### Route traffic through the proxy

To route traffic through the proxy, follow the steps in [Route traffic through the proxy](/docs/postman-passport/passport-cli/dashboard/#route-traffic-through-the-proxy).

## `passport lens stop`

Stop the traffic inspector.

### Usage

```bash
passport lens stop
```

## `passport lens clean`

Remove certificate-authority material left by an unclean shutdown.

### Usage

```bash
passport lens clean
```