@coctostan/kotadb
v2.2.1
Published
Local-only code intelligence tool for CLI agents. SQLite-backed repository indexing and code search via MCP.
Downloads
66
Maintainers
Readme
KotaDB Application Layer
This directory contains the TypeScript/Bun HTTP API service for indexing and searching code repositories.
Quick Start
Prerequisites
- Bun v1.1+
Install Dependencies
bun installRun the Server
# Development mode with watch
bun --watch src/index.ts
# Production mode
bun run src/index.ts
# Custom port
PORT=4000 bun run src/index.tsThe server will start on port 3000 by default. Data is stored in .kotadb/kota.db within your project directory.
Development Commands
Type Checking and Linting
bunx tsc --noEmit # Type-check without emitting files
bun run lint # Biome lintingTesting
# Run tests
bun testProject Structure
src/
api/ # HTTP routes and database queries
db/ # SQLite client and database utilities
indexer/ # Git repository indexing logic
mcp/ # Model Context Protocol implementation
types/ # Shared TypeScript types
tests/ # Test suite
api/ # API endpoint tests
indexer/ # Indexer tests
mcp/ # MCP protocol tests
helpers/ # Test utilities
scripts/ # Bash scripts for developmentAPI Endpoints
GET /health- Health checkPOST /index- Index a repositoryGET /search?term=query- Search indexed filesGET /files/recent- List recently indexed filesPOST /mcp- Model Context Protocol endpoint
