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

ai-history

v1.0.0

Published

Cursor IDE / Claude Code の会話履歴(.jsonl)を Markdown に変換する CLI ツール

Readme

ai-history

Cursor IDE と Claude Code CLI の会話履歴(.jsonl)を、人間が読めるMarkdownに変換するCLIツール。

  • 差分同期 — 前回から更新されたファイルだけを処理(mtime ベース)
  • 読み取り専用 — 元の .jsonl は一切編集・削除しない
  • セキュリティ — API キー・絶対パスを自動でマスキング
  • 設定不要 — インストール後すぐに使える
  • クロスプラットフォーム — macOS / Windows 対応

インストール

npm install -g ai-history

クイックスタート

# 会話履歴をMarkdownに変換(output/ai-history/ に出力)
ai-history backup

# 何が変換されるか確認するだけ(ファイル書き込みなし)
ai-history --dry-run

コマンド

ai-history [backup] [options]

backup サブコマンドは省略可能。ai-history --dry-runai-history backup --dry-run と同じ動作。

オプション

| オプション | 説明 | デフォルト | |------------|------|-----------| | --project <name> | 特定プロジェクトのみ対象(部分一致) | 全プロジェクト | | --dry-run | 変換対象の一覧表示のみ(書き込みなし) | — | | --index-only | index.json のみ再構築 | — | | --output-dir <path> | 出力先ディレクトリ | output/ai-history | | -V, --version | バージョン表示 | — | | -h, --help | ヘルプ表示 | — |

使用例

# 全履歴をバックアップ
ai-history backup

# 変換対象の確認(書き込みなし)
ai-history --dry-run

# 特定プロジェクトのみ
ai-history backup --project my-project

# 出力先を変更
ai-history backup --output-dir ~/Documents/ai-backup

# index.json のみ再構築
ai-history backup --index-only

出力構造

output/ai-history/
├── .last-sync          # 差分判定用(自動管理)
├── index.json          # 全セッションのメタデータ・統計
├── cursor/
│   └── 2026-02/
│       └── {uuid8}_{タイトル}.md
└── claude-code/
    └── 2026-02/
        └── {uuid8}_{タイトル}.md

Markdown の形式

---
source: claude-code
sessionId: 9a6494ce-051f-4773-8d3e-a7707bea3b8e
date: 2026-02-28
project: my-project
gitBranch: main
model: claude-sonnet-4-6
---

## 👤 User

(ユーザーの発言)

---

## 🤖 Assistant

(AIの回答)

---
  • thinking(拡張思考)と tool_use(ツール実行)は <details> 折り畳みブロックで表示
  • APIキー・絶対パスは自動でマスキング(例: sk-...sk-[REDACTED]/Users/name/~/

データソース

会話履歴の読み取り元(読み取り専用):

| ツール | パス | |--------|------| | Cursor | ~/.cursor/projects/{id}/agent-transcripts/{uuid}/{uuid}.jsonl | | Claude Code | ~/.claude/projects/{id}/{sessionId}.jsonl | | Claude Code(サブエージェント) | ~/.claude/projects/{id}/{sessionId}/subagents/*.jsonl |


全ファイルを再変換する

.last-sync を削除すると次回実行時に全ファイルが再変換される。

rm output/ai-history/.last-sync
ai-history backup

動作要件

  • Node.js 18 以上

ライセンス

MIT