## 1. What is the problem?
`browse templates clone playwright` passes the public catalog slug
`playwright` to the scaffolder, although the [catalog
entry](https://www.browserbase.com/api/templates/playwright) identifies
its source as `playwright/quickstart-playwright`. The scaffolder expects
`quickstart-playwright`. Puppeteer and Selenium have the same mismatch.
The printed setup instructions also ignore the generated project's
package manager and Python environment: TypeScript always gets npm
commands, and Python can get `uv sync` followed by bare `python
main.py`.
## 2. Why does it matter, and what changes?
Users select a valid catalog template but can receive the wrong project
or instructions that run outside its dependency environment. The CLI
should translate the catalog's public identifier into the source
identifier and print commands consistent with the generated project.
This change targets V4 `main` and:
- Uses the final directory component of `sourcePath`, falling back to
`slug` when absent. For example, `playwright/quickstart-playwright`
becomes `quickstart-playwright`; an entry without `sourcePath` keeps its
slug. This uses structured metadata, with no hardcoded alias table or
shell-command parsing.
- Reads `package.json#packageManager` to choose npm, pnpm, yarn, or bun
setup commands; defaults to npm.
- Uses `uv sync` for a Python project, or `uv venv && uv pip install -r
requirements.txt` for requirements, then `uv run python main.py`.
README dependency parsing is outside this change; README-only Python
dependency instructions remain a separate follow-up.
## 3. How do we know this fixes it?
Validated on September 23, 2026, against V4 main
`2c098f44857665045dbed31168ac36af920774d9`:
- **477 CLI tests passed across 36 files**, including regressions for
source-name translation in both languages, slug fallback, package
managers, and Python requirements. The focused template suite also
passed all 18 tests.
- CLI build and lint, including formatting and TypeScript checks,
passed.
- Checked all **39 live catalog entries**: the source-path algorithm
matched all **68 advertised template arguments**, with no mismatches.
- A real Python Playwright clone using the published scaffolder produced
the Playwright project and uv instructions.
- A real TypeScript Playwright clone using a local build of the merged
scaffolder fix `d35dd22` produced the Playwright project. Only
dependency selection was redirected to that build; template downloads
and generation were real. These checks verified cloning and printed
instructions, not authenticated browser execution.
### Release dependency
Published Node `create-browser-app@3.0.0` still silently generates the
basic Stagehand starter for the corrected nested template name. The live
check reproduced this. That separate bug is fixed in merged
[create-browser-app
#43](https://github.com/browserbase/create-browser-app/pull/43), but
[release PR
#44](https://github.com/browserbase/create-browser-app/pull/44),
proposing 3.0.1, is still open. **Publish that release before shipping
this as a complete TypeScript quickstart fix.** Browse already invokes
`create-browser-app@latest`, so no dependency pin changes are needed
here.