https://github.com/browserbase/stagehand-scaffold
https://github.com/browserbase/stagehand-scaffold
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/browserbase/stagehand-scaffold
- Owner: browserbase
- Created: 2025-03-17T19:23:51.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-30T20:11:10.000Z (12 months ago)
- Last Synced: 2025-07-08T03:03:07.326Z (10 months ago)
- Language: TypeScript
- Size: 43 KB
- Stars: 12
- Watchers: 5
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🤘 Welcome to Stagehand!
Hey! This is a project built with [Stagehand](https://github.com/browserbase/stagehand).
You can build your own web agent using: `npx create-browser-app`!
## Setting the Stage
Stagehand is an SDK for automating browsers. It's built on top of [Playwright](https://playwright.dev/) and provides a higher-level API for better debugging and AI fail-safes.
## Curtain Call
Get ready for a show-stopping development experience. Just run:
```bash
npm install && npm start
```
## What's Next?
### Add your API keys
Required API keys/environment variables are in the `.env.example` file. Copy it to `.env` and add your API keys.
```bash
cp .env.example .env && nano .env # Add your API keys to .env
```
### Custom .cursorrules
We have custom .cursorrules for this project. It'll help quite a bit with writing Stagehand easily.
### Run on Browserbase
To run on Browserbase, add your API keys to .env and change `env: "LOCAL"` to `env: "BROWSERBASE"` in [stagehand.config.ts](stagehand.config.ts).
### Use Anthropic Claude 3.5 Sonnet
1. Add your API key to .env
2. Change `modelName: "gpt-4o"` to `modelName: "claude-3-5-sonnet-latest"` in [stagehand.config.ts](stagehand.config.ts)
3. Change `modelClientOptions: { apiKey: process.env.OPENAI_API_KEY }` to `modelClientOptions: { apiKey: process.env.ANTHROPIC_API_KEY }` in [stagehand.config.ts](stagehand.config.ts)