> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.usepassport.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.usepassport.ai/_mcp/server.

# Lens commands

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

## `passport lens`

### Usage

```bash showLineNumbers={false}
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 or clear 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 showLineNumbers={false}
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 showLineNumbers={false}
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 showLineNumbers={false}
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 showLineNumbers={false}
passport lens status [options]
```

### Options

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

Output status as JSON instead of formatted text.

---

### Example output

```bash showLineNumbers={false}
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 showLineNumbers={false}
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 showLineNumbers={false}
passport lens report

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

## `passport lens env`

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

### Usage

```bash showLineNumbers={false}
passport lens env [options]
```

### Options

**`--unset`** — default: false

Clear the proxy and CA environment variables.

---

### Route traffic through the proxy

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

## `passport lens stop`

Stop the traffic inspector.

### Usage

```bash showLineNumbers={false}
passport lens stop
```

## `passport lens clean`

Remove certificate-authority material left by an unclean shutdown.

### Usage

```bash showLineNumbers={false}
passport lens clean
```