Documentation

Agentrails CLI.

Set up the local archive, connect approved providers, run background capture, and search agent history without opening the desktop app.

Install, initialize, connect.

The CLI requires Node.js 22.13 or newer. Install the package globally, initialize the archive, then inspect the provider catalog before you connect anything.

TerminalNode.js 22.13+
npm install --global @agentrails/cli

agentrails init
agentrails providers catalog
agentrails providers connect io.agentrails.codex
agentrails service install
Connecting a provider can update its local configuration. Agentrails asks first, creates a backup, and preserves unrelated hook entries. Use agentrails providers setup <provider-id> if you want to make the configuration change yourself.

The commands you will use.

agentrails init

Create the local archive and print its data directory.

agentrails providers list

Show installed provider packages and connection state.

agentrails providers catalog

List known agent surfaces and their capture modes.

agentrails providers connect io.agentrails.codex

Install the approved Codex completion hook and enable its provider.

agentrails sync

Reconcile documented local history and drain the capture queue.

agentrails threads

List archived threads with provider and coverage information.

agentrails search "deployment"

Search the redacted local full-text index.

agentrails service install

Start the background archive service when you sign in.

agentrails service status

Check whether the background service is installed and running.

Import a provider export

Choose the provider package and the file explicitly. Imports are limited to 512 MiB and the selected source enters the encrypted archive before normalization.

ExampleOfficial ChatGPT export
agentrails providers import \
  io.agentrails.openai-export \
  conversations.zip

Documented inputs only.

Agentrails does not scrape signed-in web apps. Every provider declares its capture method and coverage. A provider without an approved source remains unsupported.

Official hooks

After completed work

Codex CLI, Claude Code, Cursor, Gemini CLI, Windsurf, Copilot CLI

Documented history

At startup and on your schedule

Codex CLI, Claude Code, Gemini CLI

Selected imports

Only when you pick a file

ChatGPT, Claude, Cursor, OpenCode, Cline, Aider, Continue, Roo

Run the app or read the privacy model.