Trajex CLI

CLI and /trajex skill: Claude Code, Codex and Pi sessions in one SQLite index that an agent queries with JS

  • 127 ★ on the repository
  • Last commit
  • AGPL-3.0
CLI

Extended access

Why this level

  • Indexes the full text of agent sessions, which may contain secrets and private code.
All reasons and checks

wutongyuonce/trajex

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/trajex

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Indexes the full text of agent sessions, which may contain secrets and private code.

This is third-party code. Review the repository files before installing.

What it does

Trajex parses session logs of Claude Code, Codex and Pi (JSONL files) into one SQLite schema and builds an FTS5 full-text index. Data is read from `~/.claude/projects`, `~/.codex/sessions` and `~/.pi/agent/sessions`, and the database lives in `~/.trajex/trajex.sqlite`. The `trajex` CLI and the `/trajex` skill give an agent memory of past work. The agent writes short JavaScript queries through a programmable API, runs them locally and answers in plain language: which files it changed last time, where tool calls failed, what subagents concluded. Long tool results are stored truncated, and the full text is read from the original log through `raw()`. A separate Electron and Vue desktop app shows the same sessions as a timeline.

Who it is for. Developers who work heavily with Claude Code and Codex and want to find past decisions in session history.

Good fit when

  • You need to recall why the agent changed those exact files for an auth bug last time.
  • A file was edited across several sessions and you need to see all of them.
  • You want to collect the tool calls that failed recently.
  • Claude Code and Codex history should be searched in one place rather than two formats.

Not a fit when

  • Sessions contain secrets and must not be indexed even locally.
  • You need cloud sync of history between machines.
  • Node.js older than 22.13 is installed.

Example request

/trajex find the sessions where we edited this file and explain why.

Limitations

The CLI needs Node.js 22.13 or later because it uses the built-in `node:sqlite` with FTS5. Claude Code and Codex log formats are not officially documented, so the parsers are built from real files and may break after client updates. For Codex only root threads are indexed as sessions, and child subagent threads and forks are not. The middle of long tool results is not in the full-text index and is read through `raw()`. The license is AGPL-3.0, and the project is derived from obelisk. The index holds all text of your sessions, including any secrets.

How to disable. Uninstall the CLI with `npm uninstall --global @trajex-apps/cli`, remove the skill from `.claude/skills/` or the global folder, and delete the `~/.trajex` directory.

FAQ

How do I install Trajex?

Run `npm install --global @trajex-apps/cli`, then `npx --yes skills add wutongyuonce/trajex-skill` for the skill. Add `--global` to make it available everywhere.

Which agents are supported?

Claude Code, Codex and Pi. Each provider lands in one schema, and Codex and Pi ids get a prefix.

Must the CLI and the app be installed together?

No. They install independently, each carries its own Core, and they share one database.

What is the CodeAct approach in Trajex?

The agent answers by writing and running a small JavaScript query against the index's local API.

Does data leave the machine?

The documentation describes local work with files and SQLite and mentions no cloud service for the index.

Discussion

No questions or reviews yet.

CLI tools

A skill for searching past sessions: a full-text index of Claude Code, Codex, pi and Grok chats in one SQLite database

SkillMinimal access146Repository stars

A CLI that gathers Claude Code and Codex session history into a local graph, searches it and turns repeated mistakes into fixes

CLIExtended access123Repository stars

claude-history searches and opens past Claude Code, Codex and Pi conversations in the terminal and gives Claude a history skill

CLIExtended access542Repository stars

A task tracker for agents: tasks with context and result live in JSONL beside the code and outlive sessions

CLIMinimal access410Repository stars

txcript moves a session from Claude Code to Codex, OpenCode or Cursor with its messages, reasoning and tool-call history

CLIExtended access220Repository stars

An fzf-based CLI that lists sessions of Claude Code, Codex and six more agents across projects and resumes the chosen one.

CLIExtended access51Repository stars

README in short

The project combines three parts: a log indexer, a CLI with a query API and a desktop app for reading sessions. Documentation is in Chinese and English.

README badge

Report a problem