Skip to content

Commit c260458

Browse files
committed
Release v0.1.3: CLI embedding configuration
New Features: - CLI embedding provider selection via --embedder flag - Support for mock, hf, openai, cohere, voyage providers - --model flag for specifying embedding model - --dimension flag for API embedders - Automatic embedder initialization based on CLI flags Documentation: - CLI_EMBEDDINGS.md with complete usage guide - Quick start examples for all providers - Environment variable requirements - Updated CHANGELOG.md Examples: indra --embedder hf create "thought" indra --embedder openai --model text-embedding-3-small create "thought" indra --embedder voyage --model voyage-code-3 create "code"
1 parent f98716e commit c260458

4 files changed

Lines changed: 229 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.3] - 2026-02-05
9+
10+
### Added
11+
- **CLI Embedding Configuration**: New flags for choosing embedding providers
12+
- `--embedder`: Choose provider (mock, hf, openai, cohere, voyage)
13+
- `--model`: Specify model name for the embedder
14+
- `--dimension`: Set embedding dimension (required for API providers)
15+
- Examples: `indra --embedder hf create "thought"`, `indra --embedder openai --model text-embedding-3-small create "thought"`
16+
17+
- **Documentation**: `CLI_EMBEDDINGS.md` with complete CLI embedding guide
18+
- Quick start examples for all providers
19+
- Environment variable requirements
20+
- Consistency guidelines
21+
- Troubleshooting tips
22+
23+
### Changed
24+
- Updated `open_db()` function to accept embedder configuration parameters
25+
- All CLI commands now support embedder selection
26+
827
## [0.1.2] - 2026-02-05
928

1029
### Added
@@ -75,6 +94,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7594
- Graph traversal operations (neighbors, BFS, shortest path)
7695
- Complete test suite (54 tests)
7796

97+
[0.1.3]: https://github.com/moonstripe/indra_db/compare/v0.1.2...v0.1.3
7898
[0.1.2]: https://github.com/moonstripe/indra_db/compare/v0.1.1...v0.1.2
7999
[0.1.1]: https://github.com/moonstripe/indra_db/compare/v0.1.0...v0.1.1
80100
[0.1.0]: https://github.com/moonstripe/indra_db/releases/tag/v0.1.0

CLI_EMBEDDINGS.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# CLI Embedding Configuration
2+
3+
The `indra` CLI supports multiple embedding providers via command-line flags.
4+
5+
## Quick Start
6+
7+
```bash
8+
# Default (MockEmbedder)
9+
indra create "My thought"
10+
11+
# HuggingFace local model
12+
indra --embedder hf create "My thought"
13+
14+
# OpenAI API
15+
indra --embedder openai create "My thought"
16+
17+
# Custom model
18+
indra --embedder hf --model sentence-transformers/all-mpnet-base-v2 create "Better embeddings"
19+
```
20+
21+
## Options
22+
23+
### `--embedder <PROVIDER>`
24+
25+
Choose embedding provider (default: `mock`):
26+
- `mock` - Fast, deterministic, no dependencies
27+
- `hf` - Local HuggingFace models (requires `--features hf-embeddings`)
28+
- `openai` - OpenAI API (requires `--features api-embeddings`)
29+
- `cohere` - Cohere API (requires `--features api-embeddings`)
30+
- `voyage` - Voyage AI API (requires `--features api-embeddings`)
31+
32+
### `--model <MODEL>`
33+
34+
Model name for the embedder:
35+
- **HF**: `sentence-transformers/all-MiniLM-L6-v2` (default)
36+
- **OpenAI**: `text-embedding-3-small` (default), `text-embedding-3-large`
37+
- **Cohere**: `embed-english-v3.0` (default)
38+
- **Voyage**: `voyage-3` (default), `voyage-code-3`
39+
40+
### `--dimension <DIM>`
41+
42+
Embedding dimension (required for API embedders):
43+
- OpenAI: 1536 (small), 3072 (large)
44+
- Cohere: 1024
45+
- Voyage: 1024
46+
47+
## Examples
48+
49+
### MockEmbedder (Default)
50+
```bash
51+
indra init
52+
indra create "Test thought"
53+
```
54+
55+
### HuggingFace Local
56+
```bash
57+
# Requires: cargo install indra_db --features hf-embeddings
58+
indra --embedder hf create "Rust is fast"
59+
indra --embedder hf search "programming" -l 5
60+
```
61+
62+
### OpenAI
63+
```bash
64+
# Requires:
65+
# cargo install indra_db --features api-embeddings
66+
# export OPENAI_API_KEY=sk-...
67+
68+
indra --embedder openai create "AI memory"
69+
indra --embedder openai --model text-embedding-3-large --dimension 3072 create "High quality"
70+
```
71+
72+
### Cohere
73+
```bash
74+
# Requires: export COHERE_API_KEY=...
75+
indra --embedder cohere create "Multilingual text"
76+
```
77+
78+
### Voyage AI
79+
```bash
80+
# Requires: export VOYAGE_API_KEY=...
81+
indra --embedder voyage create "General text"
82+
indra --embedder voyage --model voyage-code-3 create "function main() {}"
83+
```
84+
85+
## Environment Variables
86+
87+
- `HF_HOME` - HuggingFace cache directory
88+
- `HF_TOKEN` - HuggingFace API token
89+
- `OPENAI_API_KEY` - OpenAI API key
90+
- `COHERE_API_KEY` - Cohere API key
91+
- `VOYAGE_API_KEY` - Voyage AI API key
92+
93+
## Consistency
94+
95+
**Important:** Use the same embedder for all operations on a database:
96+
97+
```bash
98+
# ✅ Good
99+
indra -d db.indra --embedder hf init
100+
indra -d db.indra --embedder hf create "thought"
101+
102+
# ❌ Bad - dimension mismatch
103+
indra -d db.indra --embedder hf init # 384 dim
104+
indra -d db.indra --embedder openai create # 1536 dim
105+
```
106+
107+
## Complete Documentation
108+
109+
See [EMBEDDINGS.md](EMBEDDINGS.md) for full embedding documentation.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "indra_db"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
edition = "2021"
55
description = "A content-addressed graph database for versioned thoughts"
66
license = "MIT"

0 commit comments

Comments
 (0)