npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lcm-explorer

v1.2.0

Published

Web UI for browsing and searching OpenClaw LCM databases

Readme

🧠 LCM Explorer

A web UI for browsing and searching OpenClaw LCM (Lossless Context Management) databases.

Browse conversations, drill into messages and their parts, explore the summary DAG, search across everything with full-text search, and inspect the context window that your AI actually sees.

Quick Start

npx lcm-explorer

Opens on http://localhost:3078. Auto-discovers your LCM database from your OpenClaw config, or falls back to ~/.openclaw/lcm.db.

If the database isn't found, you'll get specific guidance on what to do next (not just an error).

What is LCM?

lossless-claw is a context engine plugin for OpenClaw that replaces the default sliding window with lossless context management. It stores every message verbatim in a SQLite database and builds a DAG of summaries so your AI never truly forgets a conversation.

LCM Explorer gives you a window into that database.

Prerequisites

  • Node.js 18+ (run node --version to check)
  • An LCM database from a running OpenClaw instance with the lossless-claw plugin

Don't have LCM set up yet? See Troubleshooting below.

Tip: Ask your OpenClaw bot to install and set up LCM Explorer for you. It already knows your config, whether LCM is enabled, and where the database lives. Just tell it: "Install LCM Explorer and set it up so I can browse my conversation history." It'll handle the rest, including enabling the LCM plugin if needed.

Install

npx (no install needed)

npx lcm-explorer

npm global

npm install -g lcm-explorer
lcm-explorer

Docker

docker run -v ~/.openclaw:/data -p 3078:3078 ghcr.io/sheevn/lcm-explorer

From source

git clone https://github.com/Sheevn/LCM-Explorer.git
cd LCM-Explorer
npm install
npm start

Configuration

CLI flags

lcm-explorer [options]

  --port, -p <port>    Server port (default: 3078)
  --db <path>          Path to lcm.db (overrides auto-discovery)
  --help, -h           Show help
  --version, -v        Show version

Environment variables

| Variable | Default | Description | |----------|---------|-------------| | PORT | 3078 | Server port | | LCM_DB_PATH | (auto-discover) | Explicit path to LCM SQLite database | | OPENCLAW_HOME | ~/.openclaw | OpenClaw home directory (for config discovery) | | AUTH_TOKEN | (none) | Optional access token for authentication |

Database discovery

LCM Explorer finds your database automatically:

  1. --db flag or LCM_DB_PATH env var: explicit path, used as-is
  2. OpenClaw config: reads openclaw.json to find the LCM plugin's configured DB path
  3. Default: ~/.openclaw/lcm.db

For non-standard OpenClaw installs, set OPENCLAW_HOME:

OPENCLAW_HOME=/opt/openclaw npx lcm-explorer

Custom database path

# Via flag
npx lcm-explorer --db /path/to/lcm.db

# Via env var
LCM_DB_PATH=/path/to/your/lcm.db npx lcm-explorer

Custom port

npx lcm-explorer --port 9090
# or
PORT=9090 npx lcm-explorer

Authentication

By default there's no auth, which is fine for local use.

If you're exposing it on a network, set AUTH_TOKEN:

AUTH_TOKEN=my-secret-token npx lcm-explorer

You'll get a login page. Enter the token once and you're in for 7 days (cookie-based session).

API access works with Bearer tokens:

curl -H "Authorization: Bearer my-secret-token" http://localhost:3078/api/stats

Features

  • Conversations: Browse all conversations with message counts, token usage, and timestamps
  • Messages: Paginated message list with role filtering, click through to full content and parts
  • Summary Tree: Visualize the summary DAG with parents, children, and source messages
  • Full-Text Search: Search across messages and summaries using SQLite FTS5
  • Context Window: See exactly what items are in the current context window
  • Statistics: Database overview with role distribution, compression ratios, part type breakdown
  • Dark/Light Theme: Toggle between themes, preference saved locally

Screenshots

LCM Explorer Statistics

Troubleshooting

"LCM database not found"

LCM Explorer gives you specific guidance based on your setup:

  • No OpenClaw installed: Install OpenClaw first, then the LCM plugin
  • OpenClaw installed, no LCM plugin: Run openclaw plugins install @martian-engineering/lossless-claw
  • LCM plugin installed, not configured: Add it as a contextEngine slot in openclaw.json
  • LCM configured, no data yet: Run some conversations with OpenClaw to generate data

You can always point directly to a database:

npx lcm-explorer --db /path/to/lcm.db

"Port 3078 is already in use"

Another process is using that port. Try a different one:

npx lcm-explorer --port 3079

Database on a remote server

Copy the database locally (it's a single SQLite file):

scp server:~/.openclaw/lcm.db ./lcm.db
npx lcm-explorer --db ./lcm.db

The database is opened read-only, so it's safe to copy while OpenClaw is running.

LCM Compatibility

| LCM Version | Explorer Support | Notes | |-------------|-----------------|-------| | 0.3.x | Full | Core tables only | | 0.4.x | Full | Plugin config support, session scoping | | 0.5.0+ | Full | Large file externalization, bootstrap checkpoints, model on summaries |

LCM Explorer auto-detects which tables exist and degrades gracefully. Tables added in newer versions (like large_files and conversation_bootstrap_state) are queried only if present. Running against an older LCM database works fine; you just won't see the newer stats.

API Routes

All routes return JSON. Authenticated if AUTH_TOKEN is set.

| Route | Description | |-------|-------------| | GET /health | Always public. Returns status, uptime, DB connection state | | GET /api/stats | Aggregate stats: messages, summaries, conversations, role distribution, large files, bootstrap checkpoints, DB size | | GET /api/conversations | List all conversations with message/summary counts and token totals | | GET /api/conversations/:id | Single conversation detail with role breakdown | | GET /api/conversations/:id/messages | Paginated messages. Params: limit, offset, role | | GET /api/conversations/:id/messages/:msgId | Full message with all parts | | GET /api/conversations/:id/summaries | Summaries with parent IDs and source message IDs | | GET /api/summaries/:id/tree | Summary DAG: parents, children, source messages | | GET /api/context/:convId | Current context window items with resolved content | | GET /api/search | Full-text search. Params: q, scope, conversation_id, limit | | GET /api/large-files | List externalized large files (v0.5.0+). Params: conversation_id, limit, offset | | GET /api/large-files/:id | Single file detail (v0.5.0+) |

LCM Database Schema Reference

Tables created and managed by lossless-claw. LCM Explorer reads these in read-only mode.

Core Tables (all versions)

| Table | Purpose | Key Columns | |-------|---------|-------------| | conversations | Session groupings | conversation_id, session_id, session_key, title, bootstrapped_at, created_at, updated_at | | messages | Raw message content | message_id, conversation_id, seq, role, content, token_count, created_at | | message_parts | Structured message components | part_id, message_id, session_id, part_type, ordinal, text_content, tool_name, tool_input, tool_output, tool_error, tool_call_id, tool_status, tool_title, patch_hash, patch_files, file_mime, file_name, file_url, subtask_prompt, subtask_desc, subtask_agent, step_reason, step_cost, step_tokens_in, step_tokens_out, snapshot_hash, compaction_auto, metadata, is_ignored, is_synthetic | | summaries | Compressed context (DAG nodes) | summary_id, conversation_id, kind (leaf/condensed), depth, content, token_count, earliest_at, latest_at, descendant_count, descendant_token_count, source_message_token_count, file_ids, model, created_at | | summary_messages | Summary-to-message links | summary_id, message_id, ordinal | | summary_parents | DAG edges | summary_id, parent_summary_id, ordinal | | context_items | Current context window | conversation_id, ordinal, item_type (message/summary), message_id, summary_id, created_at |

v0.5.0+ Tables

| Table | Purpose | Key Columns | |-------|---------|-------------| | large_files | Externalized tool outputs | file_id, conversation_id, file_name, mime_type, byte_size, storage_uri, exploration_summary, created_at | | conversation_bootstrap_state | Incremental bootstrap checkpoints | conversation_id, session_file_path, last_seen_size, last_seen_mtime_ms, last_processed_offset, last_processed_entry_hash, updated_at |

FTS Tables

| Table | Tokenizer | Indexed Columns | |-------|-----------|-----------------| | messages_fts | porter unicode61 | content | | summaries_fts | porter unicode61 | summary_id (UNINDEXED), content |

Message Part Types

text, reasoning, tool, patch, file, subtask, compaction, step_start, step_finish, snapshot, agent, retry

Tech

  • Express + better-sqlite3 (read-only)
  • Vanilla JS SPA (no build step, no framework)
  • CSS custom properties for theming
  • Zero external API calls

License

MIT