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

# Codex

> Give Codex project memory with nemu setup codex

```bash theme={null}
npm i -g nemu-cli
nemu login
nemu setup codex
```

`nemu setup codex` signs you in if needed, registers this computer as a device, registers an MCP
server named `nemu` with `codex mcp add` (it runs `nemu mcp`, so no token sits in
`~/.codex/config.toml`), and asks whether to install hooks in `~/.codex/hooks.json` (or
`$CODEX_HOME`).

> [!WARNING]
>
> Codex runs hooks only after you trust them. Open Codex once and run `/hooks`, then trust the Nemu
> hooks. Codex asks again if the hooks change.

The hooks do the same as for [Claude Code](https://docs.nemu.cc/context/claude-code.md#what-the-hooks-do): load notes at
session start, track changed files locally, ask for a handoff before stopping, and remember
unfinished work at session end.

## Start a session

```bash theme={null}
nemu codex              # sets up if needed, then starts Codex
nemu codex -- --model gpt-5
```

## Bring in earlier work

```bash theme={null}
nemu codex load sessions
```

This opens Codex with your recent Codex sessions for this project and asks it to save what matters.
Transcripts stay on your machine.

`nemu codex load memories` imports nothing today. Codex keeps its own memories as generated state in
a format it does not document, so Nemu does not read them directly. Use `load sessions` instead.

## Check and remove

```bash theme={null}
nemu status
nemu uninstall codex
```


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