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

# oqoqo login, whoami, and upgrade

> Sign the oqoqo CLI in and out, check who it acts as, show its version, update it, and print each command's JSON Schema.

These commands work on the CLI itself rather than on a project. All of them except `oqoqo whoami` run without a sign-in, and only `whoami` has a Plugin (MCP) tool. API keys and background updates are on the [CLI reference](https://docs.oqoqo.ai/cli/overview.md).

## oqoqo login

Sign in to Oqoqo with your browser.

```bash theme={null}
oqoqo login [flags]
```

No Plugin (MCP) tool: an MCP host [signs in with OAuth](https://docs.oqoqo.ai/operate/plugin.md) when it first calls a tool.

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--no-browser` | boolean | `false` | Print the sign-in link without opening a browser, for a remote machine. |

Also takes the [global flags](https://docs.oqoqo.ai/cli/overview.md#global-flags).

**Examples**

Sign in on this computer, or from a remote machine by opening the printed link on any computer:

```bash theme={null}
oqoqo login
oqoqo login --no-browser
```

**Notes**

The CLI prints the sign-in link and a confirmation code on stderr, even with `--quiet`, and in a terminal it also opens the link in your browser. When you confirm the code in the browser, the command finishes, saves your sign-in, and makes your organization the active one. The result names you, your organization, and the dashboard URL.

While `OQOQO_API_KEY` is set, `oqoqo login` refuses to sign in and exits with code `2`. Unset the variable first, as [Use an API key](https://docs.oqoqo.ai/cli/overview.md#use-an-api-key) explains.

## oqoqo whoami

Show who the CLI acts as, in which organization, and whether it uses a sign-in or an API key.

```bash theme={null}
oqoqo whoami [flags]
```

**Plugin (MCP) tool:** [`get_identity`](https://docs.oqoqo.ai/mcp-server/identity-and-projects#get_identity)

Takes only the [global flags](https://docs.oqoqo.ai/cli/overview.md#global-flags).

**Examples**

```bash theme={null}
oqoqo whoami --output json
```

**Result fields**

| Field | Description |
| - | - |
| `user` | The person the CLI acts as. |
| `organization` | The organization, with its `id`. |
| `dashboardUrl` | The dashboard address. |
| `credential` | `sign_in` for a browser sign-in, or `api_key` when `OQOQO_API_KEY` is set. |

**Notes**

To keep a script in one organization, pass `organization.id` to `--expected-organization-id` on later commands: they then fail if your sign-in moves to another organization. When you're not signed in, the command exits with code `3` and tells you to run `oqoqo login`.

## oqoqo logout

Remove your saved sign-in and your saved project from this computer.

```bash theme={null}
oqoqo logout [flags]
```

No Plugin (MCP) tool: it acts only on the CLI on this computer.

Takes only the [global flags](https://docs.oqoqo.ai/cli/overview.md#global-flags).

**Examples**

```bash theme={null}
oqoqo logout
```

**Notes**

Running it twice is safe. While `OQOQO_API_KEY` is set, commands keep using the key after you log out, and the CLI says so on stderr.

## oqoqo version

Show the installed version, its release channel, the platform, and whether background updates are on.

```bash theme={null}
oqoqo version [flags]
```

No Plugin (MCP) tool: it acts only on the CLI on this computer.

Takes only the [global flags](https://docs.oqoqo.ai/cli/overview.md#global-flags).

**Examples**

```bash theme={null}
oqoqo version --output json
```

**Result fields**

| Field | Description |
| - | - |
| `version`, `channel` | The installed version and its release channel. |
| `platform` | The platform, such as `darwin-arm64`. |
| `autoUpdate` | `on`, or `off` in the cases that [Background updates](https://docs.oqoqo.ai/cli/overview.md#background-updates) lists. |

**Notes**

`oqoqo --version` prints the version and channel on one line. Neither command contacts Oqoqo.

## oqoqo upgrade

Replace the installed `oqoqo` binary with the latest release for its channel.

```bash theme={null}
oqoqo upgrade [flags]
```

No Plugin (MCP) tool: it acts only on the CLI on this computer.

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--check` | boolean | `false` | Report the latest version and install nothing. |
| `--force` | boolean | `false` | Install the latest release even when you already have it. |

Also takes the [global flags](https://docs.oqoqo.ai/cli/overview.md#global-flags).

**Examples**

See whether a newer release exists, then install it:

```bash theme={null}
oqoqo upgrade --check
oqoqo upgrade
```

**Result fields**

| Field | Description |
| - | - |
| `currentVersion`, `latestVersion` | The installed release and the latest one. |
| `path` | Where the binary is. |
| `action` | What the command did, from the next table. |

| `action` | Meaning |
| - | - |
| `upgraded` | The CLI installed the latest release. |
| `already-current` | You already have it. Nothing changed. |
| `check` | With `--check`: a newer release exists. Nothing changed. |
| `unsupported` | The CLI runs from source, so there's no binary to replace. Reinstall with the [install script](https://docs.oqoqo.ai/cli/overview.md#install). |

**Notes**

The command doesn't contact the Oqoqo API, so it still runs when other commands fail with `client_update_required`. Use it when you don't want to wait for a [background update](https://docs.oqoqo.ai/cli/overview.md#keep-the-cli-current).

If the CLI can't write its binary, the command tells you to reinstall in a folder you can write, such as `~/.local/bin` or `~/.oqoqo/bin`. You don't need `sudo`.

## oqoqo schema

Print machine-readable command definitions as JSON Schema.

```bash theme={null}
oqoqo schema [command]
```

No Plugin (MCP) tool: an MCP host reads each tool's input schema from the server.

**Arguments**

| Argument | Description |
| - | - |
| `[command]` | The command to describe, such as `experiments launch`. Without it, every command is listed with its summary. |

Takes only the [global flags](https://docs.oqoqo.ai/cli/overview.md#global-flags).

**Examples**

List every command, then read the launch plan schema before you write a plan:

```bash theme={null}
oqoqo schema
oqoqo schema experiments launch --output json
```

**Result fields**

For one command, the result has these fields:

| Field | Description |
| - | - |
| `name`, `summary`, `description` | The command and what it does. |
| `requiresAuth` | Whether it needs a sign-in or an API key. |
| `args` | Each argument, and whether it's optional or takes several values. |
| `flags` | The flags as JSON Schema, with types, defaults, and limits. |
| `payload` | The JSON input it reads from a flag or file, such as the `plan` of `experiments launch`, the `operation` of `resources apply`, or the `query` of `data query`. `null` when there is none. |
| `output` | The JSON Schema of `data` in the [JSON envelope](https://docs.oqoqo.ai/cli/overview.md#output). |
| `examples` | Example invocations. |

**Notes**

An unknown command name fails with `usage_error`. The command doesn't contact Oqoqo.

## Related

> [card] [oqoqo projects](https://docs.oqoqo.ai/cli/projects.md)
>
> List projects and choose the one later commands use.

> [card] [CLI reference](https://docs.oqoqo.ai/cli/overview.md)
>
> Global flags, output, exit codes, and conventions.

> [card] [Profile and API keys](https://docs.oqoqo.ai/setup/profile.md)
>
> Create a personal API key for CI jobs and other places where nobody can sign in.


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