Full-stack AI enablement platform
Project description
๐ฌ Dolphin
โ ๏ธ EXPERIMENTAL - This is a developmental library under active development. APIs and interfaces are unstable and subject to change without notice.
A semantic code search and knowledge management system with AI-native interfaces (MCP, REST API, CLI).
Quick Start
Installation
# Install from PyPI
uvx install pb-dolphin
# โ ๏ธ IMPORTANT: Ensure OPENAI_API_KEY is set as env var
Basic Usage
# Initialize global knowledge store and index a repository
dolphin init
dolphin add-repo my-project /path/to/project
dolphin index my-project
# Search your indexed code
dolphin search "authentication logic"
# Start API server
dolphin serve
Core Commands
dolphin init- Initialize configuration (auto-creates~/.dolphin/config.toml)dolphin init --repo- Create repo-specific config in current directorydolphin add-repo <name> <path>- Register a repository for indexingdolphin index <name>- Index a repository with language-aware chunkingdolphin search <query>- Search indexed code semanticallydolphin serve- Start REST API server (port 7777)dolphin config --show- Display current configuration
Architecture
High-Level Overview
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI Interfaces (Claude, Continue, etc) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Protocol
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Dolphin Knowledge Base โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โ
โ โ MCP Bridge โโโโโบโ REST API โ โ
โ โ (TypeScript)โ โ (Python/FastAPI)โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโ
โผ โผ
โโโโโโโโโโโ โโโโโโโโโโโโ
โLanceDB โ โ SQLite โ
โ(Vectors)โ โ(Metadata)โ
โโโโโโโโโโโ โโโโโโโโโโโโ
Key Features
- Language-Aware Chunking - Intelligent code parsing for Python, TypeScript, JavaScript, Markdown
- Semantic Search - OpenAI embeddings with LanceDB vector storage
- MCP Support - Native Model Context Protocol integration for Claude Desktop
- REST API - FastAPI server with search, retrieval, and metadata endpoints
- Unified CLI - Single
dolphincommand for all operations - Auto-Configuration - Smart config hierarchy (repo โ user โ defaults)
Environment Variables
Dolphin requires the following environment variables depending on your usage:
Required for OpenAI Embeddings
# Required when using OpenAI embeddings (recommended for production)
export OPENAI_API_KEY="sk-your-openai-api-key-here"
Getting Your OpenAI API Key
- Visit OpenAI Platform
- Sign up or log in to your account
- Navigate to API Keys
- Click "Create new secret key"
- Copy the key and set it as
OPENAI_API_KEY
Configuration
Dolphin uses a multi-level configuration system:
- Repo-specific (
./.dolphin/config.toml) - Per-repository chunking settings - User-global (
~/.dolphin/config.toml) - Auto-created on first use
Example Config
# ~/.dolphin/config.toml
default_embed_model = "large" # or "small"
[embedding]
provider = "openai"
batch_size = 100
[retrieval]
top_k = 8
score_cutoff = 0.15
Claude Desktop Integration (MCP)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"dolphin": {
"command": "bun",
"args": ["run", "/path/to/dolphin/mcp-bridge/src/index.ts"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}
Start the server: dolphin serve
Available MCP tools: search_knowledge, fetch_chunk, fetch_lines, get_vector_store_info
REST API
# Start server
dolphin serve
# Search
curl -X POST http://127.0.0.1:7777/v1/search \
-H "Content-Type: application/json" \
-d '{"query": "authentication", "top_k": 5}'
# List repositories
curl http://127.0.0.1:7777/v1/repos
# Health check
curl http://127.0.0.1:7777/v1/health
Development Status
Current: Pre-alpha (0.1.x)
- โ Core indexing and search pipeline
- โ Language-aware chunking (Python, TS, JS, Markdown)
- โ REST API with MCP bridge
- โ ๏ธ Developmental stage
Upcoming:
- Performance optimization
- Production hardening
- Evaluation framework
- Expanded language support
Requirements
- Python โฅ3.12
- OpenAI API key (for embeddings)
- Bun (for MCP bridge)
- Git (for repository scanning)
Testing
# Run all tests
uv run pytest
# Run specific test suite
uv run pytest tests/unit/
uv run pytest tests/integration/
License
MIT License
Acknowledgments
Built with LanceDB, OpenAI, FastAPI, and Bun
โ ๏ธ Remember: This is experimental software under active development. Use at your own risk.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pb_dolphin-0.1.7.tar.gz.
File metadata
- Download URL: pb_dolphin-0.1.7.tar.gz
- Upload date:
- Size: 85.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ec9ccaa7c8aae66db28b84f397d4ec207daa14b1d9392034e72de1efc26f471
|
|
| MD5 |
ac13815f3b94f346b9fd076f80ac3fde
|
|
| BLAKE2b-256 |
d7a431fe28f9a406010c27d0ed317f7ec7df678c9fc7bdb1b4ccb876b8d67dfe
|
File details
Details for the file pb_dolphin-0.1.7-py3-none-any.whl.
File metadata
- Download URL: pb_dolphin-0.1.7-py3-none-any.whl
- Upload date:
- Size: 115.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9ebaa6fa7c17dacd87ad441c1e7f838c17b8ba367ca92e06577a7931475859e
|
|
| MD5 |
5930ee434f31c53b50c47c5a6636dcc8
|
|
| BLAKE2b-256 |
6fdc9b60b5337d9a0d05594af79e55969a7f0af88ea70476c050cea59e6a46b5
|