Skip to content

pj4533/seance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Seance

Python 3.10+ License: MIT

Summon insights from past conversations. ๐Ÿ”ฎ

Semantic search across all your Claude Code session logs.


โœจ Features

  • ๐Ÿ” Semantic Search - Find conversations by meaning, not just keywords
  • โšก Fast Local Index - ChromaDB-powered vector store on your machine
  • ๐ŸŽฏ Project Filtering - Scope searches to specific projects
  • ๐Ÿ“… Date Filtering - Find conversations from specific time periods
  • ๐Ÿ”Œ JSON Output - Pipe results into other tools

๐Ÿ“ฆ Installation

git clone https://github.com/pj4533/seance.git
cd seance
python -m venv .venv
source .venv/bin/activate
pip install -e .

๐Ÿ”‘ Configuration

Seance uses OpenAI's text-embedding-3-small model for embeddings. You'll need an API key:

# Option 1: Environment variable
export OPENAI_API_KEY=your-key

# Option 2: Local .env file (recommended for standalone use)
echo "OPENAI_API_KEY=your-key" > .env

Note: The .env file is gitignored. If both are set, the environment variable takes precedence.

๐Ÿš€ Quick Start

1. Index your sessions

# Full index (first time)
seance index

# Incremental updates (subsequent runs)
seance index --incremental

2. Search!

seance search "how did we implement retry logic"

๐Ÿ“– Usage

Search Commands

# Basic semantic search
seance search "authentication bug fix"

# Filter by project
seance search "debugging" --project my-app

# Filter by date
seance search "refactoring" --since 2025-01-01

# Get more results
seance search "API design" --results 10

# JSON output for scripting
seance search "streaming audio" --json

Index Management

# Full re-index
seance index

# Incremental (only new sessions)
seance index --incremental

# Verbose output
seance index --incremental --verbose

Utilities

# List all indexed projects
seance list

# Show index statistics
seance stats

๐Ÿ”ง How It Works

~/.claude/projects/     seance index      ~/.seance/
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  session.jsonl   โ”‚    embed + store     โ”‚  ChromaDB       โ”‚
โ”‚  session.jsonl   โ”‚                      โ”‚  (vectors)      โ”‚
โ”‚  session.jsonl   โ”‚                      โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                  โ”‚
                        seance search             โ”‚
                        "retry logic"             โ–ผ
                        โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        returns file_path + message_id

Seance parses JSONL logs from ~/.claude/projects/ and creates embeddings for searchable content.

What Gets Indexed

Content Source Why
๐Ÿ’ฌ User messages type: "user" entries Your questions and requests
๐Ÿ“ Summaries type: "summary" entries Session topic/domain context

What Gets Skipped

  • ๐Ÿค– Assistant responses (too verbose with "let me read..." boilerplate)
  • โš™๏ธ System messages, file snapshots, queue operations
  • ๐Ÿง  Thinking blocks, tool calls

๐Ÿ“ Storage

Location Contents
~/.seance/ ChromaDB vector database
~/.seance/cursor.json Last indexed timestamp per project

๐Ÿค Contributing

Contributions welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License

MIT License - see LICENSE for details.


Made with ๐Ÿ”ฎ for Claude Code users

About

Semantic search for Claude Code session logs ๐Ÿ”ฎ

Resources

License

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages