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

# Codex CLI

> Connect Codex CLI on a VPS or remote development machine to ByteRover V4 with authentication before onboarding.

Use the published ByteRover skill to give Codex CLI access to persistent project memory on a VPS or any terminal environment.

## Before you start

* Install and authenticate Codex CLI on the VPS.
* Open the project folder in the same shell where Codex CLI runs.

## Optional step 0: Remove old V3 CLI, connectors, and integrations

If this VPS still has the old V3 CLI, connectors, OpenClaw integration, or Hermes memory provider installed, remove them before setting up the V4 skill:

```bash theme={null}
curl -fsSL https://www.byterover.dev/uninstall-v3.sh | sh
```

This removes old V3 command-line tools and connectors. It also removes the old OpenClaw integration and Hermes memory provider when they are detected. It does not migrate V3 memory data.

## Install the ByteRover skill

Run this on the VPS:

Requires Node.js 20 or newer. Node.js includes npm and npx.

```bash theme={null}
npx skills add campfirein/skills
```

Run the command in the same environment where Codex CLI runs.

## Restart Codex CLI

Stop the current Codex CLI session, then start a new one in the project:

```bash theme={null}
cd path/to/your/project
codex
```

Agents load installed skills when a new session starts.

## Authenticate with ByteRover

Prompt Codex CLI:

```text theme={null}
Authenticate with ByteRover.
```

Codex CLI may print a browser URL and ask you to approve the connection.

1. Open the URL in your browser.
2. Approve the request before the code expires.
3. Return to the VPS terminal.
4. Type:

```text theme={null}
approved
```

## Onboard with ByteRover

Prompt Codex CLI:

```text theme={null}
onboard with ByteRover
```

Codex CLI checks whether the project is linked to a ByteRover space.

## If Codex CLI needs a space

Open ByteRover Desktop, create or select the space for this project, then prompt Codex CLI again:

```text theme={null}
onboard with ByteRover
```

## Verify

Ask Codex CLI to check ByteRover before starting work:

```text theme={null}
query ByteRover for this project
```

After setup, Codex CLI should query memory before non-trivial work and record useful project knowledge when work is complete.
