██████╗ ██╗ ██╗ █████╗ ███╗ ███╗ █████╗ ██████╗ ███████╗██╗ ██╗ ██╔═══██╗██║ ██║ ██╔══██╗████╗ ████║██╔══██╗██╔══██╗██╔════╝╚██╗██╔╝ ██║ ██║██║ ██║ ███████║██╔████╔██║███████║██║ ██║█████╗ ╚███╔╝ ██║ ██║██║ ██║ ██╔══██║██║╚██╔╝██║██╔══██║██║ ██║██╔══╝ ██╔██╗ ╚██████╔╝███████╗███████╗██║ ██║██║ ╚═╝ ██║██║ ██║██████╔╝███████╗██╔╝ ██╗ ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚═╝ ╚═╝
Welcome to Ollamadex, a clean, localized index and management engine designed to tame the expanding ecosystem of local AI. Instead of jumping back and forth to a browser to find the right tool for the job, Ollamadex acts as a private directory that automatically organizes available models, their parameter sizes, capabilities, and specific variants into a single, lightning-fast database on your machine. Built to be entirely self-contained and private, it gives you a deeply queryable inventory of the local AI landscape, making it perfect for powering custom application pickers, automating model workflows, or simply keeping track of the best weights available for your hardware.
- Local-first model index - scrapes and stores Ollama's model library (names, descriptions, capability tags, size tags, cloud availability, and per-variant details like context length and disk size) into a single SQLite database on your machine.
- Fuzzy search caching - incoming search queries are compared against previously cached queries using Jaro-Winkler string similarity. A close-enough match (≥0.85 similarity) reuses the cached results instead of re-scraping, cutting down on redundant network calls.
- On-demand scraping fallback - if a query has no cached match (or a specific model isn't found by
href), Ollamadex scrapes ollama.com live, persists the results, and serves them from the database from then on.- Configurable cache staleness - how long a cached query is considered valid (default: 600 seconds / 10 minutes) is stored in
app_settingsand adjustable at runtime via an authenticated endpoint.- Generated API key auth - a unique API key (
sk_live_...) is generated and printed to the console on every server start, required for protected admin actions like updating cache settings.- Simple REST API - built on Axum, exposing endpoints to search, look up a specific model, list everything indexed, and tune caching behavior.
- Containerized - ships with a
Dockerfileanddocker-compose.yamlfor one-command setup, no local Rust toolchain required.
Before setting up Ollamadex, make sure you have the following installed:
git clone https://github.com/Maddox-RVS/Ollamadex cd Ollamadex
Option A - with Docker Compose (recommended):
docker compose up --buildBy default the server listens on port
3000. Override it by settingPORT:PORT=8080 docker compose up --build
Option B - with Cargo:
cargo run --release -- --port 3000
On startup, Ollamadex prints a generated API key to the console, save it, as it's required for admin-only endpoints (see below) and isn't persisted between restarts.
Searches the local cache for models matching a query, scraping and indexing fresh results from ollama.com if no sufficiently similar cached search exists yet.
| Query Param | Type | Required | Description |
|---|---|---|---|
query |
string |
Yes | The search term to look up |
Example:
curl "http://localhost:3000/search?query=llama3"Looks up a specific model by its ollama.com page path, scraping and indexing it if it isn't already in the local database.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
href |
string |
Yes | The model's page path (e.g. "/library/llama3.3") |
model_name |
string |
Yes | The model name to scrape with |
Example:
{
"href": "/library/llama3.3",
"model_name": "llama3.3"
}Returns every model currently indexed in the local database.
No parameters required.
Updates how long (in seconds) a cached search is considered fresh before a new scrape is triggered. Requires a valid
api_key.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
cache_stale_seconds |
i64 |
Yes | New staleness threshold, in seconds |
api_key |
string |
Yes | Server-issued API key (printed on startup) |
Returns the current similarity threshold (0.0–1.0) used to decide whether an incoming query is "close enough" to a previously cached search to reuse its results instead of re-scraping.
No parameters required.
Example response:
{ "cache_similarity_threshold": 0.85 }Updates the similarity threshold used for cache matching. Requires a valid
api_key.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
cache_similarity_threshold |
f64 |
Yes | New threshold, must be between 0.0 and 1.0 |
api_key |
string |
Yes | Server-issued API key (printed on startup) |
Example:
{
"cache_similarity_threshold": 0.9,
"api_key": "your_api_key"
}Ollamadex uses a structured SQLite relational database consisting of four main tables to handle application configuration, query caching, indexed models, and their respective architectural variants.
Stores persistent global key-value configuration flags.
Column Type Constraints Description keyTEXTPRIMARY KEYSetting name identifier valueTEXTNOT NULLAssociated configuration value (e.g., '600'forcache_stale_seconds)
Caches scrapers' queries with timestamps to prevent unnecessary external hits.
Column Type Constraints Description idINTEGERPRIMARY KEY AUTOINCREMENTUnique cache record ID queryTEXTNOT NULL UNIQUEScraped query string searched_atTEXTNOT NULLISO 8601 formatted timestamp
Contains metadata indexing the main, parent LLM families.
Column Type Constraints Description idINTEGERPRIMARY KEY AUTOINCREMENTUnique parent model ID nameTEXTNOT NULLGeneral model name (e.g., "llama3")descriptionTEXTNOT NULLDescription scraped from ollama's website capability_tagsTEXTNOT NULLCapabilities serialized as a JSON array size_tagsTEXTNOT NULLParameter size tags serialized as a JSON array cloud_tagBOOLEANNOT NULLBoolean flag indicating cloud availability urlTEXTNOT NULL UNIQUEDirect URL link to the model page on ollama's website
Tracks individual weights, parameter configurations, and context sizes linked to parent models.
Column Type Constraints Description idINTEGERPRIMARY KEY AUTOINCREMENTUnique variant ID model_idINTEGERNOT NULL,FOREIGN KEYReferences models(id)ON DELETE CASCADEmodel_identifierTEXTNOT NULLFull reference string (e.g., "llama3:8b-instruct-q8_0")sizeTEXTNOT NULLFile footprint size on disk contextTEXTNOT NULLSupported sequence context length limit inputTEXTNOT NULLAccepted input formats / modalities urlTEXTNOT NULLDirect tag manifest page reference URL

