# Reference

Source: https://browsercode.io/docs/reference

Index of every BrowserCode page: https://browsercode.io/llms.txt

Every BrowserCode URL, parameter and accepted value.

Every URL that BrowserCode accepts, with its parameters and their values. All URLs are relative to `https://browsercode.io`. The formats on this page are stable.

## URLs

| Path | Opens |
| --- | --- |
| `/ide` | The JavaScript template picker and clone field. |
| `/ide?framework=<id>` | A JavaScript template. See /ide. |
| `/ide#<project>` | A shared JavaScript project. |
| `/ide/github/<owner>/<repo>/tree/<ref>/<dir>` | A cloned GitHub repo. See /ide/github. |
| `/java` | The Java example picker. |
| `/java?example=<name>` | A Java example. See /java. |
| `/java#<project>` | A shared Java project. |
| `/agents` | The agent picker. |
| `/agents/<tool>` | A coding agent. See /agents. |
| `/embed?<parameters>` | The embeddable view. See /embed. |
| `/embed/builder` | The embed builder. |
| `/llms.txt` | This reference in plain text, for AI agents. |

## /ide

| Parameter | Value |
| --- | --- |
| `framework` | A template id. Case and surrounding whitespace are ignored. |
| `#<project>` | A project encoded by **Share**. Contains every file except lockfiles. Images are included as empty files. |

### Template ids

| Id | Template | Also accepted |
| --- | --- | --- |
| `vite` | Vite | `vite.js`, `vitejs` |
| `react` | Vite + React | `react.js`, `reactjs` |
| `svelte` | Vite + Svelte | `svelte.js`, `sveltejs` |
| `vue` | Vite + Vue | `vue.js`, `vuejs`, `vue3` |
| `nextjs` | Next.js | `next`, `next.js` |
| `nuxt` | Nuxt | `nuxt.js`, `nuxtjs` |
| `express` | Express | `express.js`, `expressjs` |

An unknown id opens the picker, with a message that names the rejected value.

## /ide/github

```
/ide/github/<owner>/<repo>/tree/<ref>/<dir>
```

| Segment | Required | Value |
| --- | --- | --- |
| `owner` | Yes | GitHub user or organization. |
| `repo` | Yes | Repository name. Public repos only. |
| `ref` | Yes | Branch, tag or commit SHA. Branch names that contain `/` are not supported. |
| `dir` | No | Subdirectory to boot from. Defaults to the repo root. |

Boot behavior:

-   Package manager: pnpm if the `package.json` names pnpm in `packageManager` or has a `workspace:` dependency, or, when booting from the root, if `pnpm-workspace.yaml` exists. Otherwise npm.
-   Script: `dev`, or `start` if there is no `dev`. If neither exists, the boot stops with an error.
-   Native packages are overridden before install. See [Native binaries](https://browsercode.io/docs/ide/javascript#native-binaries).

## /java

| Parameter | Value |
| --- | --- |
| `example` | An example name or id. Examples start on Java 25. An unknown value opens the picker. |
| `#<project>` | A project encoded by **Share**. Contains the files, the Java version and the main class. Projects with no version run on Java 8. |

### Java examples

| Name | Id | Example | Group |
| --- | --- | --- | --- |
| `helloworld` | `java` | Hello World | Basics |
| `guess` | `java-guess` | Guessing Game | Basics |
| `words` | `java-words` | Word Count | Basics |
| `calculator` | `java-calculator` | Calculator | Basics |
| `swing` | `java-swing` | Swing | Graphics |
| `mandelbrot` | `java-mandelbrot` | Mandelbrot | Graphics |
| `shapes` | `java-shapes` | Shapes | Graphics |
| `life` | `java-life` | Game of Life | Graphics |
| `tictactoe` | `java-tictactoe` | Tic-Tac-Toe | Algorithms |
| `sorting` | `java-sorting` | Sorting | Algorithms |
| `maze` | `java-maze` | Maze | Algorithms |
| `reflection` | `java-reflection` | Reflection | Language features |

### Java versions

8, 11, 17, 21 and 25. `helloworld` has a classic variant for versions below 25, and `shapes` for versions below 21.

## /agents

| Tool | Agent | Sign-in |
| --- | --- | --- |
| `claude` | Claude Code | Claude account, with a pasted code. See [Claude Code](https://browsercode.io/docs/agents/claude). |
| `codex` | Codex CLI | OpenAI API key. See [Codex CLI](https://browsercode.io/docs/agents/codex). |
| `pi` | Pi | `/login`, or a provider API key. See [Pi](https://browsercode.io/docs/agents/pi). |

An unknown tool opens Claude Code.

## /embed

| Parameter | Value |
| --- | --- |
| `framework` | A template id. See /ide. |
| `repo` | A GitHub URL or `owner/repo`, optionally followed by `/tree/<ref>/<dir>`. Without a ref, the `main` branch is cloned. |
| `agent` | `claude`, `codex` or `pi`. |
| `runtime` | `cheerpj` for Java. `framework` then takes a Java example name or id, and defaults to `helloworld`. |
| `view` | Comma-separated panes: `files`, `search`, `editor`, `terminal`, `preview`. Defaults to all. Unknown names are ignored. |
| `apiKey` | Empty (`apiKey=`) for keyless mode. Other values are not supported. Ignored by Java embeds. |
| `#<project>` | A shared project, in place of `framework` or `repo`. For a Java project, also pass `runtime=cheerpj`. |

Rules:

-   The source is the first of these that is present: `agent`, `runtime`, the hash, `repo`, `framework`. With none, the `express` template boots.
-   A value that cannot be resolved shows an error instead of booting.
-   Below 768px wide, the panes become tabs. The embed opens on the preview, or on the Output tab for Java.
-   Agents open on the terminal. For them, `view` only controls the preview pane.

### Host page requirements

| Embed | Runtime | Response headers | iframe `allow` |
| --- | --- | --- | --- |
| `runtime=cheerpj` | CheerpJ | None | None |
| All others | BrowserPod | `Cross-Origin-Opener-Policy: same-origin`  
`Cross-Origin-Embedder-Policy: require-corp` | `cross-origin-isolated` |

To use **Share** inside an embed in Chrome and Edge, also add `clipboard-write` to `allow`. See [Embedding BrowserCode](https://browsercode.io/docs/embedding).

## Runtime limits

|  | BrowserPod | CheerpJ |
| --- | --- | --- |
| Browsers | Chrome and Edge 137+, Firefox 153+, Safari 27+. Not iOS or iPadOS. | All modern browsers, including mobile. |
| Languages | Node.js 22, `python3` (standard library only), prebuilt Rust programs. | Java 8, 11, 17, 21, 25. |
| Tools | bash, git, npm, pnpm, curl, wget, tar, unzip, ripgrep, fd, coreutils. | None. No shell. |
| Network | npm registry, GitHub and AI provider APIs only. | — |
| Native binaries | Not supported. | Not applicable. |
| Concurrency | One session per agent per browser. | One Java project per site. |

- [Next Self-hosting](https://browsercode.io/docs/self-hosting)
