by nicosuave
Fast transcript search for humans & agents for Claude Code, Codex, Pi, OpenCode, Github Copilot & Cursor
# Add to your Claude Code skills
git clone https://github.com/nicosuave/memexmemex is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by nicosuave. Fast transcript search for humans & agents for Claude Code, Codex, Pi, OpenCode, Github Copilot & Cursor. It has 102 GitHub stars.
memex's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/nicosuave/memex" and add it to your Claude Code skills directory (see the Installation section above).
memex is primarily written in Rust. It is open-source under nicosuave on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh memex against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Fast local history search for Claude, Codex CLI, Cursor, OpenCode, Pi Coding Agent, OpenClaw, and GitHub Copilot CLI logs. Uses BM-25 and optionally embeds your transcripts locally for hybrid search.
Mostly intended for agents to use via skill. The intended workflow is to ask agent about a previous session & then the agent can narrow things down & retrieve history as needed.
Includes a TUI for browsing, finding and resuming agent CLI sessions, with optional token usage tracking.

brew install nicosuave/tap/memex
Or
curl -fsSL https://raw.githubusercontent.com/nicosuave/memex/main/scripts/setup.sh | sh
Or (from the AUR on Arch Linux):
paru -S memex
Or (with Nix):
nix run github:nicosuave/memex
Development shell:
nix develop
Note: No binary cache is configured, so first builds compile from source.
NixOS service:
Enable background indexing with the provided module:
{
inputs.memex.url = "github:nicosuave/memex";
outputs = { nixpkgs, memex, ... }: {
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
modules = [
memex.nixosModules.default
{
services.memex = {
enable = true;
continuous = true; # Run as a daemon (optional)
};
}
];
};
};
}
Home Manager:
Configure memex declaratively (generates ~/.memex/config.toml):
{
inputs.memex.url = "github:nicosuave/memex";
outputs = { memex, ... }: {
# Inside your Home Manager configuration
modules = [
memex.homeManagerModules.default
{
programs.memex = {
enable = true;
settings = {
embeddings = true;
include_reasoning = false;
model = "minilm";
execution_provider = "auto"; # coreml on macOS, cpu elsewhere
cuda_device_id = 0; # optional when execution_provider = "cuda"
cuda_library_paths = ["/usr/local/cuda/lib64"]; # optional override
cudnn_library_paths = ["/usr/lib/x86_64-linux-gnu"]; # optional override
compute_units = "ane"; # CoreML only: ane, gpu, cpu, all
auto_index_on_search = true;
token_usage = false; # opt in to local token and cost tracking
index_service_interval = 3600;
};
};
}
];
};
}
Then run setup to install the skills:
memex setup
Restart Claude, Codex, OpenCode, or Pi after setup.
Index (incremental):
memex index
Plaintext reasoning is excluded by default because it is usually low-value search noise. Opt
in with memex index --include-reasoning; reasoning records remain BM25-only. Encrypted and
redacted payloads, along with reasoning signature fields, are always excluded.
Search (JSONL default):
memex search "your query" --limit 20
TUI:
memex tui
Notes:
--embeddings to generate them during indexing.index, reindex, embed, and analytics backfill commands wait up to 30
seconds for another index mutation to finish and report its holder on timeout.Full transcript:
memex session <session_id>
Single record:
memex show <doc_id>
Human output:
memex search "your query" -v
Each machine keeps and updates its own index. The coordinating memex queries configured machines concurrently over SSH, merges their rankings, and keeps the originating machine attached to every result. The TUI uses the same backend for search, history previews, sharing, token charts, and interactive resume.
Install a protocol-compatible memex binary on each machine and configure SSH normally in
~/.ssh/config. Then add machines to ~/.memex/config.toml:
[multi_machine]
default = ["local", "mini"]
timeout_seconds = 10
[[machines]]
id = "mini"
label = "Mac mini"
[machines.control]
type = "ssh"
host = "mini" # SSH config alias
[machines.index]
type = "remote"
The ssh = "mini" field is a shorthand for the machines.control table. Set
command = "/path/to/memex" when memex is not on the non-interactive SSH PATH.
SSH keys, users, ports, jump hosts, and host-key policy remain in ~/.ssh/config.
memex search "tantivy corruption" # configured defaults
memex search "tantivy corruption" --machine mini
memex usage --machine local --machine mini
Unavailable machines produce partial results with a warning. Remote token usage requires
token_usage = true in that machine's memex config. The index backend is intentionally
separate from the control transport so an immutable S3 split backend can replace
type = "remote" later while SSH continues to handle indexing and resume.
In the TUI, use the machines dropdown (or press m while the session list is focused)
to select the configured default set, local, or one remote machine. The machine, source,
project, and query filters are shared by the session results and token chart; the range
dropdown bounds the chart.
Token tracking is disabled by default because it scans and caches local agent logs. Enable it in ~/.memex/config.toml:
token_usage = true
Then reconstruct historical token usage from local Claude Code, Codex, Cursor, OpenCode, Pi, OpenClaw, and Copilot logs:
memex usage
memex usage --source codex --since 2026-07-01
memex usage --json --events
--cost auto prefers a provider-stored request cost and otherwise applies the versioned built-in API price catalog. --cost source uses only stored costs; --cost reprice always applies the catalog. Calculated costs are API-equivalent estimates, not subscription charges. Events with unknown models or prices remain in token totals and are reported as unpriced.
Each source also reports prompt-cache efficiency: the cache hit rate, plus an estimate of cache waste — prompt tokens that were in the previous request's prompt but were re-billed at input rates instead of read from cache, priced at catalog rates and attributed to idle gaps past the cache TTL or model switches where those apply. Waste is estimated per transcript file chain and errs toward undercounting: subagent sidechains, ambiguous dedupe deltas, and prompts that shrink past compaction are not counted.
Local token history is reconstructed usage. It is deliberately kept separate from authoritative subscription quota percentages and reset windows.
When token tracking is enabled, press Ctrl+T on the TUI home screen to toggle the 30-day activity chart between session count and token volume. Token activity is loaded lazily and cached when first shown.
cargo build --release
Linux with NVIDIA CUDA support:
cargo build --release --features cuda
Binary:
./target/release/memex
If you built from source, run setup to install:
memex setup
This detects which tools are installed (Claude/Codex/OpenCode/Pi) and presents an interactive menu to select which to configure.
| Need | Command |
|---|---|
| Exact terms | search "exact term" |
| Fuzzy concepts | search "concept" --semantic |
| Mixed | search "term concept" --hybrid |
--project <name>--role <user|assistant|tool_use|tool_result>--tool <tool_name>--session <session_id>--source claude|codex|cursor|opencode|pi|openclaw|copilot--since <iso|unix> / --until <iso|unix>--limit <n>--min-score <float>--sort score|ts--top-n-per-session <n>--unique-session--fields score,ts,doc_id,session_id,snippet--json-arrayJSON output also includes source and, when available, tree/linkage metadata:
event_id, parent_event_id, logical_parent_event_id,
parent_session_id, thread_source, conversation_kind,
parent_tool_use_id, source_tool_use_id, and
source_tool_assistant_uuid.
Works on macOS (launchd) and Linux (systemd).
Enable:
memex index-service enable
memex index-service enable --continuous
memex index-service enable --web-ui
Disable:
memex index-service disable
index-service reads config defaults (mode, interval, log paths). Flags override.
On Linux, creates systemd user units in ~/.config/systemd/user/. On macOS, creates a launchd plist in ~/.memex/.
On successful enable, memex writes auto_index_on_search = false to config when that setting is absent, so searches do not duplicate daemon work. Explicit user config is preserved.
--web-ui implies continuous mode and serves a local search and transcript browser at
http://127.0.0.1:6363. It mirrors the TUI's core workflow with search-as-you-type,
source and project filters, a persistent session list, and Matches/History transcript
previews. The server binds to loopback by default because the index
contains private conversation history. Override the address explicitly when needed:
memex index-service enable --web-listen 127.0.0.1:8080
To run the same UI in the foreground without changing the background service:
memex web
The browser frontend lives in web/, uses React and shadcn components, and is
built with cd web && bun install && bun run build. The generated static assets
are embedded in the memex binary, so serving the UI does not add a JavaScript
runtime to the daemon.
Enable during indexin