Skip to content

Instantly share code, notes, and snippets.

@nibzard
Created February 12, 2026 08:44
Show Gist options
  • Select an option

  • Save nibzard/b16321c47d31117f7b3bf02f99c6adb8 to your computer and use it in GitHub Desktop.

Select an option

Save nibzard/b16321c47d31117f7b3bf02f99c6adb8 to your computer and use it in GitHub Desktop.

Steel + [Framework] Starter

[Brief 1-2 sentence description explaining what this example does]

Difficulty Time Tech


TL;DR

[TIME] minute read. [KEY_OUTCOME]

git clone https://github.com/steel-dev/steel-cookbook
cd examples/[EXAMPLE_SLUG]
[INSTALL_STEPS]
cp .env.example .env
# Add your API keys to .env
[RUN_COMMAND]

What You'll Learn

  • [Learning Point 1]: Brief explanation
  • [Learning Point 2]: Brief explanation
  • [Learning Point 3]: Brief explanation

Installation

[Clone command]

[Language-specific setup]

TypeScript/Node.js:

npm install

Python:

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt

Quick Start

The script will:

  • [What happens 1]
  • [What happens 2]
  • [What happens 3]

1. Configure environment

Create .env:

STEEL_API_KEY=your_steel_api_key_here
[OTHER_ENV_VARS]

Get your free API key: app.steel.dev/settings/api-keys

2. Run

TypeScript/Node.js:

npm start

Python:

python main.py

Configuration

Customize by editing [main.py/index.ts]:

TypeScript:

const session = await client.sessions.create({
  useProxy: true,        // Use Steel's proxy network
  solveCaptcha: true,     // Enable CAPTCHA solving
  sessionTimeout: 1800000, // 30 minute timeout
});

Python:

session = client.sessions.create(
    use_proxy=True,           # Use Steel's proxy network
    solve_captcha=True,       # Enable CAPTCHA solving
    session_timeout=1800000,  # 30 minute timeout
)

Error Handling

The template includes proper cleanup:

TypeScript:

try {
  // Your automation code
} finally {
  // Cleanup runs even if there's an error
  if (browser) await browser.close();
  if (session) await client.sessions.release(session.id);
}

Python:

try:
    # Your automation code
finally:
    # Cleanup runs even if there's an error
    if browser:
        browser.close()
    if session:
        client.sessions.release(session.id)

Support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment