Registry / developer-tools / agentslog

agentslog

JSON →
library0.7.1jsnpmunverified

Query your Claude Code session history as a local SQLite database. Indexes JSONL transcripts from ~/.claude/projects/ into a queryable local store. CLI tool for analyzing tool calls, file edits, token usage, and errors across all sessions. Fully offline, no cloud. Node.js ≥20 required. Current version 0.7.1. Release cadence: active development with frequent minor releases. Differentiator: works on existing history, no setup beyond install, zero network dependencies.

npm install agentslog
INSTALL
IMPORT
SIG · AGENTSLOG
A
agentslog
developer-toolsjavascriptv0.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

agentslog
npm install -g agentslog
npm install agentslog
agentslog is primarily a CLI tool meant to be installed globally. Using local install may require npx.
ingest
agentslog ingest
agentslog index
The command to index history is 'ingest', not 'index'.
setup
agentslog setup
agentslog init
The command to configure MCP server and memory is 'setup', not 'init' or 'configure'.

Installs agentslog globally, indexes existing Claude Code session history, and demonstrates basic stats and setup commands.

npm install -g agentslog # Index your existing history agentslog ingest # Query stats agentslog stats # Or full setup with MCP + memory agentslog setup
Debug
Known issues
breakingRequires Node.js ≥20. Older Node versions will fail to install or run.
fix
Upgrade Node.js to version 20 or later.
affects: <1.0.0
gotchaagentslog only reads Claude Code transcripts from ~/.claude/projects/. Other agent histories (Cline, Aider) are experimental and may not work reliably.
fix
Ensure Claude Code sessions exist. Use the default path; symlinks may not be followed.
affects: >=0.0.0
deprecatedThe '--with-hooks' flag is experimental and may change behavior or be removed in future versions.
fix
Use 'agentslog setup' without --with-hooks for stable behavior. Check changelog before production use.
affects: >=0.7.0
gotchaAgentslog CLI must be installed globally to use 'agentslog' as a command. Local install requires npx.
fix
Use 'npm install -g agentslog' or prefix with 'npx agentslog'.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'better-sqlite3'
Missing native SQLite binding when agentslog is not installed globally or dependencies not built.
fix
Run 'npm install -g agentslog' to ensure all native modules are compiled for your platform.
agentslog: command not found
agentslog not installed globally or not in PATH.
fix
Run 'npm install -g agentslog' and ensure npm global bin directory is in your PATH.
node: --experimental-strip-types is not needed in Node 22+
User added experimental flag manually; agentslog handles Node version internally.
fix
Remove any --experimental-strip-types flags. agentslog manages Node version checks automatically.
Upgrade
Version history
0.7.1latest on npm
Audit
Dependencies
better-sqlite3requiredSQLite binding for Node.js used to index and query session data
commanderrequiredCLI framework for parsing commands and options
chalkrequiredTerminal string coloring for CLI output
Agent activity
47 hits · last 30 days
node
38
Amazon
1
Resources
agentslog — npm install agentslog · libregistry