Metadata-Version: 2.4
Name: claude-kb
Version: 0.7.4
Summary: Universal knowledge base with Qdrant for Claude Code integration
Project-URL: Homepage, https://github.com/tenequm/claude-kb
Project-URL: Repository, https://github.com/tenequm/claude-kb
Project-URL: Issues, https://github.com/tenequm/claude-kb/issues
Author-email: Misha Kolesnik <misha@kolesnik.io>
License: MIT
License-File: LICENSE
Keywords: ai,claude,embeddings,knowledge-base,qdrant,semantic-search,vector-search
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Topic :: Text Processing :: Indexing
Requires-Python: >=3.13
Requires-Dist: click<9,>=8.1.0
Requires-Dist: httpx<1,>=0.27.0
Requires-Dist: mcp<2,>=1.23.0
Requires-Dist: pydantic<3,>=2.0.0
Requires-Dist: python-dotenv<2,>=1.0.0
Requires-Dist: qdrant-client<2,>=1.11.0
Requires-Dist: rich<15,>=13.0.0
Requires-Dist: sentence-transformers<6,>=5.0.0
Requires-Dist: tiktoken<1,>=0.5.0
Requires-Dist: torch<3,>=2.0.0
Description-Content-Type: text/markdown

# Claude KB

Semantic search across your Claude Code conversation history, powered by Qdrant.

## Setup

### 1. Install

```bash
uv tool install claude-kb
```

### 2. Start Qdrant

```bash
docker compose up -d
```

### 3. Initialize and import

```bash
kb init
kb import claude-code-chats
```

### 4. Add MCP server to Claude Code

```bash
claude mcp add -s user kb -- kb mcp
```

That's it. Claude Code now has access to `kb_search` and `kb_get` tools for searching your conversation history.

### Update

```bash
uv tool upgrade claude-kb
```

To check current version:

```bash
kb --version
```

## CLI Usage

```bash
kb search "your query"                    # semantic search
kb search "query" --limit 20             # with options
kb get <message-id>                       # retrieve specific message
kb get-thread <message-id>                # message with context
kb status                                 # check collections and stats
kb ai                                     # LLM-optimized schema
```

## Configuration

Set `QDRANT_URL` if Qdrant is not on localhost:

```bash
export QDRANT_URL=http://your-host:6333
```

Or create a `.env` file:

```bash
QDRANT_URL=http://localhost:6333
EMBEDDING_MODEL=BAAI/bge-base-en-v1.5
```

## Search Tips

- **Score 0.9+**: exact topic match, **0.7-0.9**: related, **0.5-0.7**: partial, **<0.5**: filtered
- Lower `min_score` to 0.3 for broader exploration
- Use `project` parameter to filter by project (partial match), not the query
- By default, thinking and tool_result content shows as `[thinking: N chars]` placeholders - use `include_thinking=True` / `include_tool_results=True` for full content

## Development

```bash
git clone https://github.com/tenequm/claude-kb.git
cd claude-kb
uv sync --extra dev
just check  # lint + format
```

## License

MIT
