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

# Install the Rork CLI and sign in

> Install the rork command-line tool on macOS, Linux or Windows, sign in to your Rork account from the browser, and check which account it uses.

The Rork CLI is the `rork` command. It works with your Rork projects from a terminal, a script or another coding agent. This page shows how to install it and sign it in to your account.

## Install

> [tab] macOS and Linux
>
> Run this in a terminal:
>
> ```sh theme={null}
> curl -fsSL https://rork.com/install | sh
> ```
>
> The installer downloads the build for your machine (Apple silicon or Intel Mac, x64 or arm64 Linux), checks it against the release checksums and puts `rork` in `~/.rork/bin`.
>
> It also adds that folder to your `PATH`. Open a new terminal afterwards so it picks that up.

> [tab] Windows
>
> Run this in PowerShell:
>
> ```powershell theme={null}
> irm https://rork.com/install.ps1 | iex
> ```
>
> The installer adds `rork` to your user `PATH`. Open a new terminal afterwards, because only new terminals read the updated `PATH`.

Check that it works:

```sh theme={null}
rork --version
```

## Sign in

Sign in once on each computer:

```sh theme={null}
rork login
```

**1. Get a code**

The CLI prints a short code and opens [rork.com/auth/cli](https://rork.com/auth/cli) in your browser. If no browser opens, for example over SSH, open that address on any device yourself.

**2. Confirm in the browser**

Sign in to Rork if you are not already, enter the code, and approve the request.

**3. Back in the terminal**

The CLI says `Successfully logged in!`, with your email and where it stored the session.

The session is stored in your system keychain, or in `~/.rork/auth.json` (readable only by you) where no keychain is available. It renews itself, so you stay signed in until you run `rork logout`.

## Check who you are signed in as

```sh theme={null}
rork whoami
```

It shows your account, the token in use, and the project the CLI picked for the current folder. Inside a project cloned from Rork, the CLI finds the project on its own. Elsewhere, pass `--project <id>` or set `RORK_PROJECT`. Add `--json` for machine-readable output. When you are not signed in, it says so and exits with code 1.

Inside a Rork project, the Rork agent's own `rork` is already signed in for that project, so the agent never needs `rork login`.

## Sign out

```sh theme={null}
rork logout
```

This removes the stored session from this computer.

## Keep it up to date

```sh theme={null}
rork update
```

`rork update --check` only reports whether a newer release exists. The CLI also tells you once a day when a new version is out.

## Troubleshooting

> [accordion] command not found: rork
>
> Open a new terminal window. If it still says this, run the install command again.

> [accordion] Device code expired
>
> Run `rork login` again to get a new code, and finish the browser step before it expires.

> [accordion] Signed in to the wrong account
>
> Run `rork logout`, then `rork login` and sign in with the account you want in the browser.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.