# Steel CLI
URL: /overview/steel-cli

---
title: Steel CLI
sidebarTitle: Steel CLI
description: Run browser automation from the terminal with the Steel CLI. Manage sessions, scrape, screenshot, and install Steel Skills for coding agents like Claude Code, Cursor, Codex, and OpenCode.
llm: true
---

## Overview

The Steel CLI lets you run full browser workflows from the terminal, end-to-end.
You can start a browser session, navigate pages, click/fill/type, extract content, and
stop the session without wiring custom browser infrastructure.

What it enables:

- Run browser automation in cloud mode (default) or self-hosted/local mode
- Drive pages with terminal-first browser commands (`open`, `snapshot`, `fill`, `click`, etc.)
- Use API tools for `scrape`, `screenshot`, and `pdf`
- Bootstrap projects quickly with `forge` and run templates instantly with `run`

Under the hood, `steel browser` is directly integrated with the `agent-browser` runtime.
That means Steel adds session lifecycle, auth, and endpoint routing while preserving
familiar browser command behavior.

- GitHub: [steel-dev/cli](https://github.com/steel-dev/cli)

## Documentation Index (for Agents)

If you are using an AI agent and want a complete docs index before exploring pages:

- `https://docs.steel.dev/llms-full.txt`

This returns a flattened, agent-friendly text map of the docs site.

## Installation

Install with the official script (recommended):

```bash Terminal
curl -fsS https://setup.steel.dev | sh
```

This installs the native `steel` binary to `~/.steel/bin` and runs `steel init`
to log you in, verify connectivity, and install coding-agent skills.

## Quick Start

### Cloud Mode (Default)

```bash Terminal -wc
steel login
steel browser start --session my-job
steel browser open https://example.com --session my-job
steel browser snapshot -i --session my-job
steel browser stop --session my-job
```

### Self-Hosted Endpoint

```bash Terminal
steel browser start --api-url https://steel.your-domain.dev/v1 --session my-job
steel browser open https://example.com --api-url https://steel.your-domain.dev/v1 --session my-job
```

### Local Runtime (`localhost`) Flow

```bash Terminal
steel dev install
steel dev start
steel browser start --local --session local-job
steel browser open https://example.com --session local-job
steel browser stop --session local-job
steel dev stop
```

## Skills for Coding Agents

Steel ships a first-party skills catalog for agent workflows:

- [Steel Skills](/overview/skills)
- [steel-dev/skills](https://github.com/steel-dev/skills)

This is designed for coding agents, including:

- Codex
- OpenCode
- OpenClaw
- Claude Code

Install from the public skills catalog:

```bash Terminal
npx skills add steel-dev/skills --skill steel-browser
```

Or through the Steel CLI helper:

```bash Terminal
steel skills install steel-browser
steel skills list
steel skills doctor
```

After installation, restart your agent client so it can discover newly installed skills.

What this skill gives agents:

- Mode-aware command planning (cloud vs self-hosted)
- Named-session lifecycle discipline (`start -> work -> stop`)
- Reliable command patterns for `steel browser` passthrough actions
- Migration guidance from `agent-browser`
- Troubleshooting playbooks for auth/session/CAPTCHA failures

### Typical Agent Skill Workflow

Most agent loops follow this pattern:

1. Start or attach a named session.
2. Open a page and inspect interactable elements (`snapshot -i`).
3. Perform actions (`fill`, `select`, `check`, `click`).
4. Wait for the post-action state and verify output.
5. Stop the session when done.

```bash Terminal
SESSION="signup-demo-$(date +%s)"
steel browser start --session "$SESSION"
steel browser open https://example.com/signup --session "$SESSION"
steel browser snapshot -i --session "$SESSION"
steel browser fill @e1 "Jane Doe" --session "$SESSION"
steel browser fill @e2 "jane@example.com" --session "$SESSION"
steel browser select @e3 "California" --session "$SESSION"
steel browser check @e4 --session "$SESSION"
steel browser click @e5 --session "$SESSION"
steel browser wait --load networkidle --session "$SESSION"
steel browser stop --session "$SESSION"
```

If you already know upstream `agent-browser`, the behavior is typically command-prefix only:

```bash Terminal
agent-browser open https://example.com/signup
agent-browser snapshot -i
agent-browser fill @e1 "Jane Doe"
agent-browser fill @e2 "jane@example.com"
agent-browser select @e3 "California"
agent-browser check @e4
agent-browser click @e5
agent-browser wait --load networkidle
```

## Command Model

### Steel-Owned Browser Lifecycle Commands

- `steel browser start`
- `steel browser stop`
- `steel browser sessions`
- `steel browser live`
- `steel browser captcha solve`

### Inherited Browser Commands (Passthrough)

All non-lifecycle `steel browser <command>` calls are routed through the vendored
`agent-browser` runtime.

Migration is usually command-prefix only:

- Before: `agent-browser <command> ...`
- After: `steel browser <command> ...`

### Essential Inherited Commands

These are the most common inherited commands agents use:

- Page navigation: `open`, `back`, `forward`, `reload`
- Page understanding: `snapshot`, `snapshot -i`
- Interaction: `click`, `fill`, `type`, `select`, `check`, `press`, `hover`
- Data retrieval: `get text`, `get html`, `get title`, `get url`
- Synchronization: `wait`, `wait --load networkidle`, `wait --text`
- Debugging: `screenshot`, `errors`, `console`

Use command help directly when needed:

```bash Terminal
steel browser --help
steel browser click --help
steel browser wait --help
```

For full command references:

- [Steel browser commands reference](https://github.com/steel-dev/cli/blob/main/docs/references/steel-browser-commands.md)
- [Steel browser session lifecycle reference](https://github.com/steel-dev/cli/blob/main/docs/references/steel-browser.md)

## Command Overview

| Group               | Commands                                                                                     |
| ------------------- | -------------------------------------------------------------------------------------------- |
| Onboarding          | `init`, `forge`                                                                              |
| Browser lifecycle   | `browser start`, `browser stop`, `browser sessions`, `browser live`, `browser captcha solve` |
| Browser passthrough | `steel browser <inherited-command>`                                                          |
| API tools           | `scrape`, `screenshot`, `pdf`                                                                |
| Local runtime       | `dev install`, `dev start`, `dev stop`                                                       |
| Profiles            | `profile import`, `profile sync`, `profile list`, `profile delete`                           |
| Credentials         | `credentials list`, `credentials create`, `credentials update`, `credentials delete`         |
| Account + utility   | `login`, `logout`, `config`, `doctor`, `cache`, `update`                                     |

## Common Workflows

### 1. Named Session Lifecycle

```bash Terminal
SESSION="job-$(date +%s)"
steel browser start --session "$SESSION"
steel browser open https://example.com --session "$SESSION"
steel browser snapshot -i --session "$SESSION"
steel browser get title --session "$SESSION"
steel browser stop --session "$SESSION"
```

### 2. CAPTCHA-Aware Sessions

```bash Terminal
# Manual solve mode
steel browser start --session my-job --session-solve-captcha
steel browser captcha solve --session my-job

# Auto solve mode (stealth preset)
steel browser start --session my-job --stealth
```

### 3. `agent-browser` Migration

```bash Terminal
# Before
agent-browser open https://example.com
agent-browser snapshot -i
agent-browser click @e3

# After
steel browser open https://example.com
steel browser snapshot -i
steel browser click @e3
```

### 4. API Tool Commands

```bash Terminal
# Scrape (markdown-first output by default)
steel scrape https://example.com

# Screenshot
steel screenshot https://example.com --full-page

# PDF
steel pdf https://example.com
```

## `forge` (Templates)

Use `forge` to scaffold a project from a template.

```bash Terminal
# Scaffold a project
steel forge playwright --name my-bot
```

List all templates and flags:

```bash Terminal
steel forge --help
```

## Endpoint Resolution

For browser lifecycle, passthrough bootstrap, and API tools (`scrape`, `screenshot`, `pdf`),
endpoint selection is deterministic.

Self-hosted precedence:

1. `--api-url <url>`
2. `STEEL_BROWSER_API_URL`
3. `STEEL_LOCAL_API_URL`
4. `browser.apiUrl` in `~/.config/steel/config.json`
5. `http://localhost:3000/v1`

Cloud precedence:

1. `STEEL_API_URL`
2. `https://api.steel.dev/v1`

Attach-flag override:

- If `--cdp` or `--auto-connect` is provided, Steel skips bootstrap injection and forwards
  passthrough arguments unchanged.

## Auth, Config, and Updates

If you provision Steel through Stripe Projects, `stripe projects add steel/browser` writes a
standard `STEEL_API_KEY` that the Steel CLI can read from your environment. See
[Stripe Projects](/overview/stripe-projects).

```bash Terminal
steel login
steel config
steel logout
steel cache --clean
steel update
steel update --check
steel update --force
```

Disable auto-update checks (24-hour cache window):

```bash Terminal
steel scrape https://example.com --no-update-check
STEEL_CLI_SKIP_UPDATE_CHECK=true steel scrape https://example.com
CI=true steel scrape https://example.com
NODE_ENV=test steel scrape https://example.com
```

## Runtime and Output Notes

- `steel scrape` defaults to markdown-first output; use `--raw` for full JSON payload.
- `steel browser start` and `steel browser sessions` return display-safe `connect_url` values
  with sensitive query parameters redacted.
- Browser command paths bypass auto-update checks to reduce interactive latency.

## Troubleshooting

- `Missing browser auth...`: run `steel login` or set `STEEL_API_KEY`.
- `Failed to reach Steel session API ...`: confirm mode and endpoint settings (`--local`,
  `--api-url`, env vars).
- Session reuse issues: use a consistent `--session <name>` across every step.
- Local runtime issues: run `steel dev install` once, then `steel dev start`.
- Stale state: run `steel browser stop --all` and start a fresh named session.

## References

- [Steel CLI README](https://github.com/steel-dev/cli/blob/main/README.md)
- [Generated CLI Reference](https://github.com/steel-dev/cli/blob/main/docs/cli-reference.md)
- [Steel Browser Reference](https://github.com/steel-dev/cli/blob/main/docs/references/steel-browser.md)
- [Steel Skills](/overview/skills)

### FAQ

### How do I install the Steel CLI?

Run `curl -fsS https://setup.steel.dev | sh`. This installs the native `steel` binary to `~/.steel/bin` and runs `steel init` to log you in, verify connectivity, and install coding-agent skills.

### Can I scrape or screenshot a page from the terminal without writing code?

Yes. The CLI ships one-shot API tools: `steel scrape <url>` (markdown-first output by default, `--raw` for full JSON), `steel screenshot <url> --full-page`, and `steel pdf <url>`.
