# Getting started

## Requirements

Reliora requires Node.js 20 or newer. It has no runtime dependencies and performs no network calls at runtime.

## Install and initialize

Install globally when you want the command available across projects:

```sh
npm install -g reliora@latest
cd your-project
reliora init --agent codex
```

Start a new Codex task after setup so project instructions are reloaded. Plain `reliora init` is the manual, no-agent alternative.

### Windows

PowerShell 5.1, PowerShell 7, and Command Prompt should invoke the npm-generated command shim explicitly:

```powershell
reliora.cmd init --agent codex
reliora.cmd agent status
```

This avoids PowerShell selecting `reliora.ps1` when script execution is restricted. Do not change the machine or user execution policy for Reliora.

For a project-local install, use npm execution:

```powershell
npm.cmd install --save-dev reliora@latest
npx.cmd reliora init --agent codex
```

### macOS and Linux

Use the normal executable name:

```sh
reliora init --agent codex
reliora agent status
```

A local install can be invoked with `npx reliora ...` or `npm exec -- reliora ...`.

## First manual record

Without an agent integration:

```sh
reliora init
reliora template > experience.json
reliora record experience.json
reliora search "database migration error"
```

On Windows PowerShell 5.1, Reliora accepts the UTF-16 BOM output that legacy `>` redirection can produce. The same workflow works with UTF-8 in PowerShell 7 and other shells.

Review the template before recording. A useful lesson is observed, non-obvious, causally explained, bounded in applicability, and reproducibly verified. Do not store secrets, personal data, raw logs, or guesses.

## Inspect the library

```sh
reliora list
reliora list --tag migration --reused --sort used --limit 10
reliora stats
reliora show <id>
```

`list` returns compact summaries. `stats` reports local counts only; neither command sends telemetry.

## Integration lifecycle

```sh
reliora agent status
reliora init --agent codex
reliora agent remove
```

Re-running setup is idempotent. It updates only the marked Reliora block, upgrades older managed instructions, and preserves surrounding user text. Removal preserves `.reliora/experiences`.

Continue with the [Codex integration guide](codex-integration.md), [CLI reference](cli-reference.md), or [troubleshooting guide](troubleshooting.md).
