# Claude Code on the web
URL: /docs/agents/cloud-agents/claude-code-web
LLM index: /llms.txt
Description: One cloud environment gives every Claude Code session on the web the lim CLI, the Limrun skills, and your API key.

# Claude Code on the web

Claude Code on the web runs each session on a Linux VM in the cloud, with no access to macOS, so it can't run Xcode or the iOS Simulator by itself. Set up one cloud environment with the `lim` CLI, the Limrun skills, and your API key, and Claude builds your iOS app on Limrun's Macs from any of your repositories, then runs it on a simulator you open in your browser.

## Set up the environment

<Steps>
  <Step title="Add a cloud environment">
    Open [claude.ai/code](https://claude.ai/code). In the environment menu below the prompt box, choose **Cloud**, then **Add cloud environment**.

    <Frame>
      <img src="/images/claude-code-web/01-add-environment.png" width="800" alt="Claude Code on the web environment menu with Cloud selected and the Add cloud environment entry below the Default environment" />
    </Frame>
  </Step>

  <Step title="Name it and set network access">
    Name the environment `limrun` and set **Network access** to **Full**. To allow only specific domains instead, see [Restrict network access](#restrict-network-access).

    <Frame>
      <img src="/images/claude-code-web/02-network-access.png" width="520" alt="Add cloud environment dialog with the name limrun and network access set to Full" />
    </Frame>
  </Step>

  <Step title="Add your API key">
    Create an API key for this environment: open [console.limrun.com/settings](https://console.limrun.com/settings), go to **API Keys**, and click **Create Token**. Then add it under **Environment variables**:

    ```text
    LIM_API_KEY=lim_...
    ```

    <Frame>
      <img src="/images/claude-code-web/03-env-var.png" width="520" alt="Environment variables field containing LIM_API_KEY with a placeholder value" />
    </Frame>

    <Warning>
    Anyone who can use the environment can read its variables. Use a key created only for this environment, and delete it in the console if the environment is ever shared more widely than you intended. Sharing the environment with your organization makes the key visible to every member who can use it.
    </Warning>
  </Step>

  <Step title="Add the setup script">
    Paste this into **Setup script**:

    ```bash
    #!/bin/bash
    npm install --global lim
    lim skills install --agents claude --scope global
    ```

    The script runs at the start of every session, before Claude Code launches. The first line installs the `lim` CLI. The second installs every Limrun skill into `~/.claude/skills`, so Claude has them in any repository, including ones that don't commit the skills themselves.

    <Frame>
      <img src="/images/claude-code-web/04-setup-script.png" width="520" alt="Setup script field with npm install --global lim and lim skills install --agents claude --scope global" />
    </Frame>
  </Step>

  <Step title="Save and start a session">
    Click **Add environment**. Below the prompt box, pick the `limrun` environment and your repository, then ask Claude to build and run your app, for example:

    ```text
    Build this app with Limrun and show it to me on an iOS simulator.
    ```

    <Frame>
      <img src="/images/claude-code-web/05-select-repo.png" width="800" alt="Session bar with the limrun environment, the ios-bazel-template repository, and the main branch selected" />
    </Frame>
  </Step>
</Steps>

## What to expect

- **Claude picks the build path from the skills.** The `limrun-xcode` skill covers xcodebuild projects and `limrun-xcode-bazel` covers Bazel workspaces.
- **Asking to see the app attaches a simulator.** From then on, every successful build installs and relaunches the app on it, and Claude's reply links to the live simulator, which you can tap and type in from your browser.
- **Instances outlive the session.** The Xcode sandbox and the simulator stay up until your organization's inactivity timeout deletes them. To stop them right away, ask Claude to clean up before you close the session.
- **Each new session sets up again.** The setup script runs at the start of every session, and Claude starts the build setup over.

## Restrict network access

Full access is the simplest setup. To use **Custom** instead, keep the default allowlist enabled, since it covers package registries such as npm that the setup script needs, and add Limrun's domains:

```text
*.limrun.com
*.limrun.net
```

Then add the hosts your own build downloads dependencies from. If a step fails with a network error, add the host it tried to reach and start a new session. For how the levels work, see [Anthropic's network access documentation](https://code.claude.com/docs/en/cloud-environments).

## Next steps

<Columns cols={2}>
  <Card title="Tutorial: Bazel iOS app" icon="graduation-cap" href="/docs/tutorials/ios-bazel-claude-code-web">
    Build a template app, change it with Claude, and review it in a pull request preview.
  </Card>
  <Card title="CLI for coding agents" icon="terminal" href="/docs/agents/cli">
    The `lim` commands the skills run, and how to set them up in other agents.
  </Card>
  <Card title="Build with Xcode" icon="hammer" href="/docs/ios/build-with-xcode">
    Remote `xcodebuild` builds for projects without Bazel.
  </Card>
  <Card title="Build with Bazel" icon="zap" href="/docs/ios/build-with-bazel">
    Remote build execution for Bazel workspaces.
  </Card>
</Columns>