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

cchist

v0.1.0

Published

Aggregate Claude Code conversation history from all your machines with one command

Readme

cchist

One command. All your Claude conversations. One place.

cchist は、複数のマシンに散らばった Claude Code のセッション履歴(~/.claude/projects/**/*.jsonl)と、Claude.ai のエクスポート ZIP を、ローカルの1ディレクトリに集約する CLI ツールです。集約後はそのまま claude -p に投げて「未完了タスク」「宙に浮いた検討事項」を自動抽出できます。


なぜ作ったか

Claude を本気で使っていると、会話履歴が

  • ローカルマシン (~/.claude/projects/)
  • VPS / リモート開発機 (同上)
  • Claude.ai (Web/モバイル)
  • API 直叩きしているアプリのログ

…と複数の場所に分散していき、「あの議論どこでやったっけ?」「あの設計、結論出てたっけ?」が即座にわからなくなる問題があります。

cchist は SSH と rsync を裏で叩くだけのシンプルな配管屋で、cchist sync 一発で全部を1ディレクトリにミラーします。さらに --analyze フラグを付けると、集約後に claude -p を spawn して、横断的に未完了タスクを markdown で出してくれます。


Quick Start

# 1. インストール
npm install -g cchist        # or: bun add -g cchist / pnpm add -g cchist

# 2. 設定ファイルを作る
cchist init

# 3. ~/.config/cchist/config.toml を編集して SSH ソース等を追加
$EDITOR ~/.config/cchist/config.toml

# 4. 同期
cchist sync

# 5. 横断で「未完了タスク」を抽出
cchist sync --analyze
# または
cchist analyze

設定ファイル

~/.config/cchist/config.toml:

storage = "~/cchist-archive"

[[source]]
name = "local"
kind = "local"
path = "~/.claude/projects"

[[source]]
name = "vps"
kind = "ssh"
host = "my-vps"            # ~/.ssh/config を使う
remote_path = "~/.claude/projects"

[[source]]
name = "claude-ai"
kind = "zip"
path = "~/Downloads/claude-export.zip"

対応ソース

| kind | 説明 | 必要なもの | |-------|------|-----------| | local | ローカルのディレクトリ | rsync (推奨) または cp | | ssh | SSH 経由のリモート | rsync, ssh, ~/.ssh/config 設定済み | | zip | Claude.ai のデータエクスポート ZIP | unzip |

BYO クラウドストレージ (任意)

[[remote]] を追加するとローカル sync 完了後にアーカイブを S3 互換オブジェクトストレージへ自動ミラーします。aws CLI を裏で叩くだけなので、AWS S3 / Cloudflare R2 / MinIO / Backblaze B2 / Wasabi いずれも同じ設定で動きます。

# AWS S3
[[remote]]
name = "s3-backup"
kind = "s3"
bucket = "my-cchist-archive"
prefix = "archive"
region = "us-east-1"

# Cloudflare R2 (S3 互換)
[[remote]]
name = "r2-backup"
kind = "s3"
bucket = "my-cchist-archive"
prefix = "archive"
region = "auto"
endpoint = "https://<ACCOUNT_ID>.r2.cloudflarestorage.com"

認証は標準 AWS チェーン (環境変数 AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY~/.aws/credentials、IMDS 等)。cchist 自身は秘密情報を読みません。R2 の場合は R2 API トークンを上記環境変数として export してください。

| フラグ | 効果 | |--------|------| | --skip-remote | リモートプッシュをスキップ (ローカル sync のみ) | | --remote-only | ソース sync をスキップし、既存アーカイブをリモートに再 push | | --only-remote <name...> | 指定 remote だけに push | | --dry-run | aws s3 sync --dryrun を含めて何が転送されるか表示 |


コマンド

cchist init                  # ~/.config/cchist/config.toml を生成
cchist sync                  # 全ソースから同期
cchist sync --only local vps # 特定ソースだけ
cchist sync --dry-run        # 何をやるか確認
cchist sync --analyze        # 同期 + claude -p で分析
cchist sync --debounce 30    # 30秒以内に実行済みならスキップ
cchist list                  # アーカイブ内のセッション一覧(新しい順)
cchist list --source vps     # ソース絞り込み
cchist list --json           # JSON 出力
cchist search "ERC-4337"     # 横断 grep
cchist analyze               # 同期せずに分析だけ実行
cchist analyze --prompt "..." # プロンプト差し替え
cchist install-hook          # Claude Code の Stop hook に cchist sync を登録
cchist install-hook --debounce 60  # debounce 窓を 60 秒に変更
cchist install-hook --dry-run      # 書き込まずに確認

自動同期 (install-hook)

cchist install-hook を一度実行すると、~/.claude/settings.jsonStop hook に cchist sync --only local --debounce 30 が登録されます。 Claude Code セッションが終了するたびにローカル履歴が自動同期されます。

cchist install-hook          # デフォルト設定で登録
cchist install-hook --debounce 60   # debounce を 60 秒に変更して登録
cchist install-hook --force  # 既存の cchist hook を置き換えて再登録

注意: SSH ソースは hook では同期されません (--only local 限定)。 マルチマシン集約は引き続き cchist sync を手動実行してください。


動作原理

  1. ソース ごとに ~/cchist-archive/<source-name>/ を作る
  2. SSH ソースなら rsync -az --delete --include='*.jsonl' ... でリモートからミラー
  3. ZIP ソースなら unzip で展開し、conversations.json を per-conversation な jsonl に分解
  4. --analyze 時は claude -p "<archive を読んで未完了タスクを抽出して>"~/cchist-archive を cwd にして spawn

**重要: cchist 自身に LLM ロジックは無い。**Anthropic API キーも不要。claude CLI が既に認証済みであることだけが前提です。


セキュリティ

  • 集約された jsonl にはコード差分、コマンド履歴、場合によっては .env の中身まで含まれます
  • ~/cchist-archive のパーミッションは自分で管理してください(デフォルトはユーザのデフォルト umask)
  • SSH ソースは BatchMode=yes で動くので、ssh-agent or 鍵認証が必要

開発

git clone https://github.com/InterfaceX-co-jp/cchist
cd cchist
bun install    # or npm install / pnpm install
bun run src/cli.ts --help   # dev
bun run build  # → dist/cli.mjs

Web ビューワ (Railway 一発デプロイ)

CLI で S3 / R2 に push したアーカイブを、ブラウザで閲覧する読取専用 Next.js アプリ。コードは web/

Deploy on Railway

  • セルフホスト前提 (SaaS 提供なし) — 自分の Railway アカウントで動かす
  • DB 不要 — bucket をそのまま読む
  • HTTP Basic Auth で保護 (BASIC_AUTH_USER / BASIC_AUTH_PASS)
  • 必要な env vars は web/README.md 参照

ボタンの REPLACE_ME を Railway の referral code に置換、かつ Railway dashboard で template として登録すると、ワンクリックで env var 入力フォームに遷移 → デプロイまで進む。


ロードマップ

  • [x] cchist install-hook: hook 経由のリアルタイム同期 (Stop hook → cchist sync --only local)
  • [ ] API ログ取り込み(SDK ラッパー or OpenTelemetry コレクタ)
  • [x] Web UI (検索 / セッション差分 / タイムライン) — web/
  • [ ] 個別セッションを markdown にエクスポート
  • [ ] memory のエクスポート(claude.ai)取り込み

License

MIT © InterfaceX Co., Ltd.


English

cchist is a single-command CLI that aggregates Claude conversation history (Claude Code ~/.claude/projects/**/*.jsonl plus claude.ai export ZIPs) from multiple machines into one local archive. Optionally pipes the archive into claude -p to extract unfinished tasks across all sessions.

npm install -g cchist
cchist init
$EDITOR ~/.config/cchist/config.toml   # add your SSH hosts
cchist sync --analyze

cchist is a thin plumbing layer: rsync for transfers, claude -p for analysis. No API keys needed; uses your existing claude auth. See examples/config.example.toml for full config reference.