Quick Start Guide¶
Get KotaDB running in under 5 minutes!
1. Install KotaDB¶
2. Run Your First Command¶
# Start the database with development configuration
cargo run -- --config kotadb-dev.toml
# In another terminal, check status
cargo run stats
3. Insert and Search Documents¶
Using the Rust API¶
use kotadb::{DocumentBuilder, create_file_storage};
#[tokio::main]
async fn main() -> Result<()> {
// Initialize storage
let storage = create_file_storage("./data", Some(1000)).await?;
// Create a document
let doc = DocumentBuilder::new()
.path("/hello.md")?
.content(b"Hello, KotaDB!")?
.build()?;
// Insert it
storage.insert(doc).await?;
// Search for it
let results = storage.search("Hello").await?;
println!("Found {} documents", results.len());
Ok(())
}
Using the HTTP API¶
# Insert a document
curl -X POST http://localhost:8080/documents \
-H "Content-Type: application/json" \
-d '{
"path": "/api-test.md",
"content": "Testing the HTTP API"
}'
# Search for documents
curl http://localhost:8080/search?q=Testing
Using Python Client¶
from kotadb import KotaDB
# Connect to KotaDB
db = KotaDB("http://localhost:8080")
# Insert a document
doc_id = db.insert({
"path": "/python-test.md",
"title": "Python Test Document",
"content": "Hello from Python!",
"tags": ["test", "python"]
})
# Search documents
results = db.query("Python")
for result in results.results:
print(f"Found: {result.document.title} (score: {result.score})")
Using TypeScript/JavaScript Client¶
import { KotaDB } from 'kotadb-client';
// Connect to KotaDB
const db = new KotaDB({ url: 'http://localhost:8080' });
// Insert a document
const docId = await db.insert({
path: '/typescript-test.md',
title: 'TypeScript Test Document',
content: 'Hello from TypeScript!',
tags: ['test', 'typescript']
});
// Search documents
const results = await db.query('TypeScript');
for (const result of results.results) {
console.log(`Found: ${result.document.title} (score: ${result.score})`);
}
4. What's Next?¶
Congratulations! You've successfully: - ✅ Installed KotaDB - ✅ Started the database server - ✅ Inserted your first document - ✅ Performed a search query
Explore Further¶
- 📖 Full Installation Guide - Detailed installation options
- ⚙️ Configuration - Customize KotaDB settings
- 🔍 Search Features - Advanced search capabilities
- 🚀 Performance Tuning - Optimize for your workload
- 🤖 MCP Integration - Connect with LLMs
Join the Community¶
- ⭐ Star us on GitHub
- 💬 Join Discussions
- 🐛 Report Issues
- 🤝 Contribute - We welcome contributions!