🌿
claude codeのセッションログを振り返るツール ccconv(ccこんぶ)を作りました
claude code を使っていて、今日はどんなことをやったんだっけ?って思うことはありませんか?
~/.claude/projects 配下にセッションのログが溜まっていることを知ったので、これを整形すればいい感じにできるんじゃないでしょうか?
ということでつくりました。
概要
このツールは ~/.claude/projects/
に保存されている Claude Code の会話ログを読み込み、様々な形式でデータの表示・解析を行います。
データの整形はすべてローカルのnodeでやっています。
インストール
npm install --global ccconv
グローバルインストール後は ccconv
コマンドとして使用できます。
使い方
基本コマンド
# 今日のログファイル一覧と統計を表示
node ccconv.js
# 今日の会話データをJSONで出力(デフォルト)
node ccconv.js raws
> [
> {
> "parentUuid": null,
> "isSidechain": false,
> "userType": "external",
> "cwd": "/Users/riin/workspace/wasurenainder",
> "sessionId": "ff381c7b-9b3b-41f3-b101-12bf0d52ab21",
> "version": "1.0.89",
> "gitBranch": "main",
> "type": "system",
# カラムを絞込込み
ccconv raws --column=timestamp,type,message
>[
> {
> "timestamp": "2025-08-23T03:48:54.396Z",
> "type": "system"
> },
> {
> "timestamp": "2025-08-23T03:48:56.501Z",
> "type": "user",
> "message": {
> "role": "user",
> "content": "test"
> }
> },
> {
> "timestamp": "2025-08-23T03:49:00.443Z",
> "type": "assistant",
> "message": {
> "id": "msg_01VNthWK5ePtpiGcSZpC3r2d",
> "type": "message",
> "role": "assistant",
# 会話風の読みやすい形式で出力
node ccconv.js raws --format=talk
> ccconv raws --format=talk | head -n 10
> [2025-08-23 12:48:56] User:
> test
>
> [2025-08-23 12:49:00] Assistant:
> テストを実行しますね。
>
> [2025-08-23 12:49:05] Tool: Tool
> The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file). STOP what you are doing and wait for the user to tell you how to proceed.
>
> [2025-08-23 12:49:05] User:
# key: value形式のシンプルな出力
node ccconv.js raws --format=plain
# 新しいメッセージから表示(逆順)
node ccconv.js raws --reverse
# 今日更新されたプロジェクト一覧を表示(デフォルト)
node ccconv.js projects
> cconv projects
> プロジェクト一覧:
>
> 📁 -Users-riin--claude
> 📊 ファイル数: 19個
> 📅 最新更新: 2025/8/23 14:45:43
> 💬 総メッセージ数: 666件
> 🎯 総トークン: 入力=4,988, 出力=29,473
> 📂 作業ディレクトリ: /Users/riin/.claude
> ⏱️ セッション期間: 2025-08-23
# 全プロジェクトの一覧とサマリを表示
node ccconv.js projects --since=all
# 直近4時間のトークン使用量を表示
node ccconv.js tokens
発展的用途
claude は標準出力も扱えるので、「ccconv を使って今日の作業日誌作って」とかもできます
Discussion