This quickstart is for TypeScript. For Python, see the installation guide.
1) Create a sample project
2) Run it
Follow the CLI prompts to enter the project directory and add your API keys. Then run the example script.3) Use Stagehand (act, extract, observe)
The scaffold includes an index.ts file that contains the example script. Here’s what it looks like:To use, set provider keys in
.env
(e.g., OPENAI_API_KEY
). For cloud browsers, add BROWSERBASE_API_KEY
and BROWSERBASE_PROJECT_ID
.