Steel CLI
Overview
The Steel CLI is a powerful command-line interface for interacting with the Steel platform. It provides an easy way to create browser automation projects, run AI agents, and manage your Steel workflows directly from your terminal.
Key Features:
- Quick project scaffolding with pre-built templates
- Instant script execution without local setup
- Switch between local and cloud execution modes
- Integration with popular AI frameworks (OpenAI, Claude, Browser Use, etc.)
- Support for Playwright, Puppeteer, and Selenium
GitHub Repository: steel-dev/cli
Installation
The Steel CLI requires Node.js 18 or higher.
$npm install @steel-dev/cli -g
Verify the installation:
steel --version
For TypeScript examples, ensure you have ts-node installed globally:
$npm install ts-node -g
Quick Start
1. Login to Steel
First, authenticate with your Steel account:
steel login
This will open your browser to authenticate. Once complete, you're ready to go!
2. Run Your First Automation
The fastest way to get started is using the run command, which executes automations instantly without creating any files:
# Run a Playwright automationsteel run playwright# Run with a specific tasksteel run browser-use --task "Navigate to example.com and take a screenshot"# Run a Python automation with Browser Usesteel run browser-use
3. Create a New Project
For more substantial projects, use forge to scaffold a complete project:
# Interactive mode - choose from available templatessteel forge# Create a specific templatesteel forge playwright --name my-automation# Create with specific optionssteel forge playwright-py --name my-project --skip_auth
Core Commands
steel forge - Create Projects
The forge command scaffolds complete projects with all necessary dependencies and boilerplate code.
Usage:
steel forge [template] [options]
Popular Templates:
| Template | Language | Description |
|---|---|---|
playwright | TypeScript | Drive Steel sessions with Playwright |
playwright-py | Python | Playwright automation in Python |
puppeteer | TypeScript | Use Puppeteer with Steel |
selenium | Python | Selenium WebDriver integration |
browser-use | Python | AI agent framework by Browser Use |
stagehand | TypeScript | Stagehand AI framework |
magnitude | TypeScript | Magnitude AI agent framework |
claude-cua | TypeScript | Claude Computer Use with Steel |
oai-cua | TypeScript | OpenAI Computer Use with Steel |
auth | TypeScript | Reusable authentication context |
creds | TypeScript | Steel Credentials API example |
files | TypeScript | Steel Files API example |
Options:
-n, --name- Project name-a, --api_url- Custom Steel API URL--api_key- Steel API key--openai_key- OpenAI API key (for AI templates)--skip_auth- Skip authentication prompts
Examples:
# Interactive template selectionsteel forge# Create a Playwright TypeScript projectsteel forge playwright --name web-scraper# Create a Python Browser Use projectsteel forge browser-use --name ai-agent --openai_key your_key# Create with custom API configurationsteel forge puppeteer --name custom-bot --api_url https://api.steel.dev
steel run - Instant Execution
Run automations immediately without creating project files. Perfect for quick tests and one-off scripts.
Usage:
steel run [template] [options]
Available Templates:
| Template | Language | Description |
|---|---|---|
playwright | TypeScript | Playwright + TypeScript |
playwright-js | JavaScript | Playwright in JavaScript |
puppeteer | TypeScript | Puppeteer + TypeScript |
puppeteer-js | JavaScript | Puppeteer in JavaScript |
playwright-py | Python | Playwright in Python |
selenium | Python | Selenium WebDriver |
browser-use | Python | Browser Use AI agent |
oai-cua | TypeScript | OpenAI Computer Use |
oai-cua-py | Python | OpenAI Computer Use (Python) |
magnitude | TypeScript | Magnitude AI framework |
files | TypeScript | Files API example |
creds | TypeScript | Credentials API example |
Options:
-t, --task- Specific task description for AI agents-o, --view- Open live session viewer in browser-a, --api_url- Custom Steel API URL--api_key- Steel API key--openai_key- OpenAI API key--skip_auth- Skip authentication--no-update-check- Disable update checking
Examples:
# Run Playwright automation interactivelysteel run playwright# Run with live session viewersteel run playwright --view# Run AI agent with specific tasksteel run browser-use --task "Find the latest iPhone price on Apple's website"# Run OpenAI Computer Use agentsteel run oai-cua --task "Research the top 3 trendingGitHub repos today" --openai_key your_key# Run without update check (useful in CI)steel run playwright --no-update-check
steel settings - Configure Execution Mode
Switch between local and cloud execution modes for your Steel automations.
Usage:
steel settings
This opens an interactive menu where you can choose:
-
Cloud Mode (default) - Run automations on Steel's managed infrastructure
- No local browser installation needed
- Scalable and production-ready
- Access to Steel's proxy network
- Automatic resource management
-
Local Mode - Run automations on your local machine
- Useful for development and debugging
- Requires local browser installation
- Direct access to local files and resources
Example Workflow:
# Check current settingssteel settings# Switch to local mode for debuggingsteel settings# Select "Local" from the menu# Run your automation locallysteel run playwright# Switch back to cloud for productionsteel settings# Select "Cloud" from the menu
Additional Commands
Authentication
# Login to Steelsteel login# Logout from Steelsteel logout# View current session infosteel config
Cache Management
The CLI caches templates and files for faster execution:
# View cache informationsteel cache# Clear all cached filessteel cache --clean
Development Tools
# Start Steel Browser in development modesteel browser start# Start on specific port with verbose loggingsteel browser start --port 3000 --verbose# Stop development serversteel browser stop
Help & Resources
# View CLI helpsteel --help# Get help for specific commandsteel forge --help# Open Steel documentationsteel docs# Join Steel Discord communitysteel support# Star the GitHub repositorysteel star
Updates
# Update to latest versionsteel update# Check for updates without installingsteel update --check# Force updatesteel update --force
The CLI automatically checks for updates every 24 hours. Disable with:
# Using flagsteel run --no-update-check# Using environment variableSTEEL_CLI_SKIP_UPDATE_CHECK=true steel run
Practical Examples
Example 1: Quick Web Scraping
# Run a Playwright automation with live viewersteel run playwright --view# In the generated code, add your scraping logic# The browser session will be visible in your browser
Example 2: Create a Browser-use Project
# Create a new Browser Use projectsteel forge browser-use --name price-monitorcd price-monitor# Install dependenciesuv add -r requirements.txt# Edit the generated script with your logic# Run your agentuv run main.py
Example 3: Using Authentication Context
# Create a project with reusable authsteel forge auth --name linkedin-scraper# This template shows how to:# 1. Authenticate once and save session# 2. Reuse authentication across runs# 3. Handle session expiration
Example 4: Multi-Step Workflow
# 1. Create project with credentials APIsteel forge creds --name secure-automation# 2. Configure for cloud executionsteel settings# Select "Cloud"# 3. The project will use Steel's credentials management# for secure handling of sensitive data
Example 5: Local Development, Cloud Production
# Develop locallysteel settings # Choose "Local"steel forge playwright --name my-botcd my-bot# Test locallynpm start# Deploy to cloudsteel settings # Choose "Cloud"npm start # Now runs on Steel's infrastructure
Best Practices
1. Use Cloud Mode for Production
Cloud mode provides better scalability, reliability, and doesn't require local browser maintenance.
2. Leverage Templates
Templates include best practices and proper error handling. Start with a template rather than from scratch.
3. Use --view for Debugging
When developing automations, use steel run playwright --view to watch the browser in real-time.
4. Cache Management
Run steel cache --clean periodically to free up disk space, especially after trying many templates.
5. Environment Variables
For CI/CD pipelines, use environment variables:
export STEEL_API_KEY=your_keyexport STEEL_CLI_SKIP_UPDATE_CHECK=truesteel run playwright --skip_auth
6. Version Control
When using forge, make sure to:
- Add
.envfiles to.gitignore - Commit the generated project structure
- Document required API keys in README
Troubleshooting
Command Not Found
If steel command isn't found after installation:
# Reinstall globallynpm install -g @steel-dev/cli# Or use npxnpx @steel-dev/cli run playwright
Authentication Issues
# Clear session and re-authenticatesteel logoutsteel login
Template Errors
# Clear cache and try againsteel cache --cleansteel forge playwright
Node Version
Ensure you're using Node.js 18 or higher:
node --version# Should be v18.0.0 or higher
Next Steps
- Explore the Steel API Documentation for advanced features
- Join the Steel Discord for community support
- Check out example projects in the CLI repository
- Learn about Steel Sessions for persistent browser contexts
Support
- Documentation: Run
steel docsor visit steel.dev/docs - Discord: Run
steel supportor join our Discord community - GitHub: Report issues at github.com/steel-dev/cli