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

# Getting started with HelixDB CLI

> Install the CLI, run locally, or link a WorkOS-authenticated Cloud database

<div className="flex flex-wrap gap-2"><Badge color="green" size="sm">Tutorial</Badge></div>

## Local quickstart

macOS and Linux:

```bash theme={"languages":{"custom":["languages/helixql.json"]}}
curl -sSL "https://install.helix-db.com" | bash
```

Windows PowerShell:

```powershell theme={"languages":{"custom":["languages/helixql.json"]}}
irm https://raw.githubusercontent.com/HelixDB/helix-db/main/crates/cli/install.ps1 | iex
```

Then:

```bash theme={"languages":{"custom":["languages/helixql.json"]}}
mkdir my-helix-app && cd my-helix-app
helix init local
helix start dev
helix query dev --file examples/request.json
helix stop dev
```

Local requests use the local auth-disabled runtime. The default storage is in-memory; use `--disk`
or an S3 storage URI when persistence is required. `helix chef` can automate local scaffolding and
agent setup without any Cloud login.

When `helix chef` launches an installed agent, it uses this priority order:
Claude Code → OpenAI Codex → OpenCode → Cursor Agent.

## Cloud quickstart

```bash theme={"languages":{"custom":["languages/helixql.json"]}}
helix auth login
helix workspace list
helix project list --workspace-id <workspace-id>
helix database list --project <project-id>

helix project link <project-id>
helix add cloud --name production --database tenant:<tenant-id>
helix query production --file examples/request.json
```

Cloud commands use only the rotating WorkOS session. Query execution goes through the backend broker
and requires an independent `database.query.read` or `database.query.write` grant. The CLI does not
need a gateway URL, application key, service credential, or sync step.

If a command cannot derive one target, pass an explicit workspace/project or `cluster:<id>` /
`tenant:<id>`. Stable links live only in the current project's `helix.toml`.

<CardGroup cols={2}>
  <Card title="Local workflow" href="/cli/workflows/local">Run and query a local instance</Card>
  <Card title="Cloud workflow" href="/cli/workflows/helix_cloud">Use the session-authenticated Cloud CLI</Card>
  <Card title="Command reference" href="/cli/command-reference">See every retained command</Card>
  <Card title="Troubleshooting" href="/cli/troubleshooting">Resolve common errors</Card>
</CardGroup>
