> ## Documentation Index
> Fetch the complete documentation index at: https://hyperbrowser.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Install

> Install the Hyperbrowser SDKs and the hx CLI

export const HxVersion = () => {
  const [version, setVersion] = React.useState('0.1.17');
  React.useEffect(() => {
    fetch('https://www.hyperbrowser.ai/cli/LATEST').then(r => r.ok ? r.text() : Promise.reject()).then(v => {
      const trimmed = v.trim();
      if ((/^\d+\.\d+\.\d+/).test(trimmed)) setVersion(trimmed);
    }).catch(() => {});
  }, []);
  return <code>{version}</code>;
};

Set up the Hyperbrowser CLI (`hx`) and/or the SDKs to start working with sandboxes.

Latest release: <HxVersion />

<Steps>
  <Step title="Install the CLI">
    <AccordionGroup>
      <Accordion title="macOS and Linux" icon="apple">
        Install the latest release with the official install script:

        ```bash theme={null}
        curl -fsSL https://www.hyperbrowser.ai/cli/install.sh | sh
        ```
      </Accordion>

      <Accordion title="Windows" icon="windows">
        In PowerShell, download and extract the latest Windows build:

        ```powershell theme={null}
        $version = (Invoke-WebRequest -UseBasicParsing https://www.hyperbrowser.ai/cli/LATEST).Content.Trim()
        $url = "https://www.hyperbrowser.ai/cli/hx_${version}_windows_amd64.tar.gz"
        Invoke-WebRequest -UseBasicParsing $url -OutFile hx.tar.gz
        tar -xzf hx.tar.gz
        Move-Item .\hx.exe "$env:USERPROFILE\AppData\Local\Microsoft\WindowsApps\hx.exe"
        ```

        <Tip>For ARM64 Windows, replace `windows_amd64` with `windows_arm64`.</Tip>
      </Accordion>

      <Accordion title="Install a specific version" icon="code-branch">
        ```bash theme={null}
        curl -fsSL https://www.hyperbrowser.ai/cli/install.sh | sh -s -- --version <version>
        ```
      </Accordion>

      <Accordion title="Direct download" icon="download">
        Each release is published as a tarball at:

        ```
        https://www.hyperbrowser.ai/cli/hx_<version>_<target>.tar.gz
        ```

        | Platform | Target                           |
        | -------- | -------------------------------- |
        | Linux    | `linux_amd64`, `linux_arm64`     |
        | macOS    | `darwin_amd64`, `darwin_arm64`   |
        | Windows  | `windows_amd64`, `windows_arm64` |

        The snippet below resolves the current release and downloads the artifact that matches your platform:

        ```bash theme={null}
        version=$(curl -fsSL https://www.hyperbrowser.ai/cli/LATEST)
        curl -fsSL "https://www.hyperbrowser.ai/cli/hx_${version}_darwin_arm64.tar.gz" -o hx.tar.gz
        tar -xzf hx.tar.gz
        ```
      </Accordion>

      <Accordion title="Verify the install" icon="circle-check">
        Confirm the CLI is on your `PATH`:

        ```bash theme={null}
        hx version
        ```
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="Install the SDK">
    <AccordionGroup>
      <Accordion title="Node.js" icon="node-js">
        ```bash theme={null}
        npm install @hyperbrowser/sdk
        ```
      </Accordion>

      <Accordion title="Python" icon="python">
        ```bash theme={null}
        pip install hyperbrowser
        # or
        uv add hyperbrowser
        ```
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="Configure your API key">
    Grab your API key from the [Hyperbrowser Dashboard](https://app.hyperbrowser.ai/quickstart).

    <Tabs>
      <Tab title="SDK">
        Export as an environment variable:

        ```bash theme={null}
        export HYPERBROWSER_API_KEY=<your_api_key>
        ```

        <CodeGroup>
          ```typescript Node.js theme={null}
          import { Hyperbrowser } from "@hyperbrowser/sdk";

          const client = new Hyperbrowser({
            apiKey: process.env.HYPERBROWSER_API_KEY,
          });
          ```

          ```python Python theme={null}
          import os
          from hyperbrowser import Hyperbrowser

          client = Hyperbrowser(api_key=os.getenv("HYPERBROWSER_API_KEY"))
          ```
        </CodeGroup>
      </Tab>

      <Tab title="CLI">
        Save your default profile:

        ```bash theme={null}
        hx auth login
        ```
      </Tab>
    </Tabs>
  </Step>
</Steps>

See [Sandbox CLI](/sandboxes/cli) for the full command reference, including named profiles and per-command overrides.
