typesense — Installable Typo-Tolerant Search Environment
Typesense is a fast, typo-tolerant
open-source search engine — an Algolia alternative and an easier-to-use
ElasticSearch alternative. It is a single C++ binary with no runtime
dependencies, architected for low-latency (<50ms) instant search. This skill
is the routing-first wrapper: choose how to run the server, wire a client,
model the data, and drive search + UI + production hardening.
When to use this skill
- The user wants to stand up a search backend for a site, app, catalog,
docs, or product browsing experience
- The user asks to install/run Typesense (binary, Docker, or Typesense Cloud)
- The user wants typo tolerance, faceting/filtering, geo-search, sorting,
grouping, synonyms, curation, scoped API keys, or federated multi-search
- The user wants to migrate off Algolia or Elasticsearch to a self-hosted
or managed open-source engine
- The user wants an InstantSearch.js UI or a Raft HA cluster in front
of / around Typesense
When not to use this skill
- The user wants LLM trace/eval observability (hallucination, prompt
scoring) → use
opik / langsmith
- The user wants token-efficient code search for agents over a repo →
use
semble
- The user wants generic service dashboards / uptime alerts (non-search
telemetry) → use
monitoring-observability
- The user wants a vector database purpose-built for embeddings only —
Typesense does vector + hybrid search, but a dedicated store may fit better
for pure ANN at extreme scale; confirm the workload first
Prerequisites
| Requirement |
Notes |
| Docker (recommended) |
Simplest local + prod path via the official image |
| or a binary host |
Linux (x86-64) / macOS binary packages from typesense.org/downloads |
| or Typesense Cloud |
Zero-ops managed cluster (fixed hourly + bandwidth, not per-record) |
| An API client |
Python / JS / PHP / Ruby official; Go / Dart / C# community |
| An API key |
Set at server start (--api-key); generate scoped keys per tenant |
Instructions
Step 1 — Choose the server mode
Local Docker server (pin a real version tag, set a strong key):
docker run -p 8108:8108 -v /tmp/typesense-data:/data \
typesense/typesense:27.1 --data-dir /data --api-key=CHANGE_ME_STRONG_KEY
The skill ships scripts/install.sh to start a local
Docker server and install the Python client in one shot.
Step 2 — Install an API client
pip install typesense # Python (official)
npm install typesense # JS/TS (official)
# PHP: composer require typesense/typesense-php Ruby: gem install typesense
Prefer an official client over raw CURL — they ship a smart retry strategy
for HA setups. See references/commands.md for the
full client + integration matrix.
Step 3 — Design the collection schema
A collection is an index with a typed schema. Mark fields facet: true to
filter/drill-down, and set default_sorting_field for ranking:
import typesense
client = typesense.Client({
"api_key": "CHANGE_ME_STRONG_KEY",
"nodes": [{"host": "localhost", "port": "8108", "protocol": "http"}],
"connection_timeout_seconds": 2,
})
client.collections.create({
"name": "companies",
"fields": [
{"name": "company_name", "type": "string"},
{"name": "num_employees", "type": "int32"},
{"name": "country", "type": "string", "facet": True},
],
"default_sorting_field": "num_employees",
})
Unlike Algolia, most settings (searchable fields, facets, ranking) are set at
query time, so one collection serves many sort orders — less memory, more
flexibility.
Step 4 — Index documents
client.collections["companies"].documents.create({
"id": "124", "company_name": "Stark Industries",
"num_employees": 5215, "country": "USA",
})
# Bulk import (JSONL) for large datasets:
# client.collections["companies"].documents.import_(jsonl_lines, {"action": "upsert"})
Step 5 — Search (typo tolerance + facets + filters + geo)
client.collections["companies"].documents.search({
"q": "stork", # typo of "stark" — handled out of the box
"query_by": "company_name",
"filter_by": "num_employees:>100",
"sort_by": "num_employees:desc",
"facet_by": "country",
})
Capabilities to reach for: faceting/filtering, geo-search (sort by distance),
grouping & distinct, synonyms, curation/merchandizing (pin records),
federated multi-search across collections in one request, and vector /
hybrid search. Details in references/commands.md.
Step 6 — Search UI + production
- UI: the InstantSearch.js adapter
gives filtering, sorting, pagination, and as-you-type UI fast.
- Multi-tenant: generate scoped API keys that restrict access to
certain records — never ship the admin key to the client.
- HA: run a Raft-based cluster (typically 3 nodes) for high
availability; upgrades are a binary swap + restart.
Step 7 — Plugin-style installation alongside jeo-skills
This skill folder is plugin-installable through the standard jeo-skills
flow so the wrapper, references, and installer land on disk for any supported
agent runtime:
# Project install (writes into .agents/skills/typesense/)
npx skills add https://github.com/akillness/jeo-skills --skill typesense
# Global install for every detected agent
npx skills add -g https://github.com/akillness/jeo-skills --skill typesense
# Target specific agents
npx skills add -g https://github.com/akillness/jeo-skills --skill typesense -a claude-code -a codex -y
Output format
When the user asks typesense for help, return a compact brief:
# typesense Routing Brief
## Scope
- Server mode: docker | binary | cloud | undecided
- Client: python | js | php | ruby | community
- Stage: install-server | install-client | schema-design | index | search | ui | production-ha
## Recommended next move
- start-docker-server | install-client | create-collection | import-docs | run-search | wire-instantsearch | scoped-keys | cluster
## Why
- 2-3 bullets grounded in the user's packet
## Route-outs
- `opik` / `langsmith` for LLM trace/eval observability
- `semble` for agent-facing code search over a repo
- `monitoring-observability` for non-search service telemetry
Best practices
- Pin a version tag, never
latest — typesense/typesense:27.1, and
keep the data dir on a real volume so restarts don't lose the index.
- Set settings at query time — searchable fields, facets, sort, and
ranking are per-query; you rarely need multiple collections for sort orders.
- Mark facets in the schema —
facet: true is required for filtering /
drill-down on a field.
- Use scoped API keys for clients — the admin key stays server-side;
scoped keys enforce per-tenant record access.
- Bulk import as JSONL with
upsert — far faster than per-document
creates for large datasets; size RAM to the index (memory-resident).
- License awareness — the server is GPL, the client libraries are
Apache-2.0; run the server as a separate daemon (the intended use).
References
1---2name: typesense3description: Stand up a self-hostable, typo-tolerant search environment with Typesense — the open-source Algolia / ElasticSearch alternative (single C++ binary, <50ms instant search, no runtime deps). One routing-first skill: pick a server mode (binary download, official Docker image, or managed Typesense Cloud), install an API client (Python/JS/PHP/Ruby official; Go/Dart/C# community), design a collection schema, index documents, and run searches with typo tolerance, faceting/filtering, geo-search, sorting, grouping, synonyms, curation, scoped API keys, and federated multi-search — then wire an InstantSearch.js UI and a Raft-based HA cluster for production. Use when the user wants to build or operate an installable search backend, add site/app/product search, or migrate off Algolia/Elasticsearch. Triggers on: typesense, search engine, typo-tolerant search, algolia alternative, elasticsearch alternative, instantsearch, faceted search, geo search, vector search, self-hosted search, site search, product search.4---56# typesense — Installable Typo-Tolerant Search Environment78[Typesense](https://github.com/typesense/typesense) is a fast, typo-tolerant9open-source search engine — an Algolia alternative and an easier-to-use10ElasticSearch alternative. It is a **single C++ binary with no runtime11dependencies**, architected for low-latency (<50ms) instant search. This skill12is the routing-first wrapper: choose how to run the server, wire a client,13model the data, and drive search + UI + production hardening.1415## When to use this skill1617- The user wants to **stand up a search backend** for a site, app, catalog,18 docs, or product browsing experience19- The user asks to install/run Typesense (binary, Docker, or Typesense Cloud)20- The user wants **typo tolerance, faceting/filtering, geo-search, sorting,21 grouping, synonyms, curation, scoped API keys, or federated multi-search**22- The user wants to **migrate off Algolia or Elasticsearch** to a self-hosted23 or managed open-source engine24- The user wants an **InstantSearch.js UI** or a **Raft HA cluster** in front25 of / around Typesense2627## When not to use this skill2829- The user wants **LLM trace/eval observability** (hallucination, prompt30 scoring) → use `opik` / `langsmith`31- The user wants **token-efficient code search for agents** over a repo →32 use `semble`33- The user wants **generic service dashboards / uptime alerts** (non-search34 telemetry) → use `monitoring-observability`35- The user wants a **vector database** purpose-built for embeddings only —36 Typesense does vector + hybrid search, but a dedicated store may fit better37 for pure ANN at extreme scale; confirm the workload first3839## Prerequisites4041| Requirement | Notes |42|-------------|-------|43| Docker (recommended) | Simplest local + prod path via the official image |44| or a binary host | Linux (x86-64) / macOS binary packages from typesense.org/downloads |45| or Typesense Cloud | Zero-ops managed cluster (fixed hourly + bandwidth, not per-record) |46| An API client | Python / JS / PHP / Ruby official; Go / Dart / C# community |47| An API key | Set at server start (`--api-key`); generate scoped keys per tenant |4849## Instructions5051### Step 1 — Choose the server mode5253| Mode | When | Entry point |54|------|------|-------------|55| **Docker** (recommended) | Local dev → prod, single command | `docker run typesense/typesense …` |56| **Binary** | Bare-metal / no Docker | Download from <https://typesense.org/downloads> |57| **Typesense Cloud** | Zero-ops managed, HA | <https://cloud.typesense.org> |5859Local Docker server (pin a real version tag, set a strong key):6061```bash62docker run -p 8108:8108 -v /tmp/typesense-data:/data \63 typesense/typesense:27.1 --data-dir /data --api-key=CHANGE_ME_STRONG_KEY64```6566The skill ships [`scripts/install.sh`](scripts/install.sh) to start a local67Docker server and install the Python client in one shot.6869### Step 2 — Install an API client7071```bash72pip install typesense # Python (official)73npm install typesense # JS/TS (official)74# PHP: composer require typesense/typesense-php Ruby: gem install typesense75```7677Prefer an official client over raw CURL — they ship a smart retry strategy78for HA setups. See [`references/commands.md`](references/commands.md) for the79full client + integration matrix.8081### Step 3 — Design the collection schema8283A collection is an index with a typed schema. Mark fields `facet: true` to84filter/drill-down, and set `default_sorting_field` for ranking:8586```python87import typesense88client = typesense.Client({89 "api_key": "CHANGE_ME_STRONG_KEY",90 "nodes": [{"host": "localhost", "port": "8108", "protocol": "http"}],91 "connection_timeout_seconds": 2,92})93client.collections.create({94 "name": "companies",95 "fields": [96 {"name": "company_name", "type": "string"},97 {"name": "num_employees", "type": "int32"},98 {"name": "country", "type": "string", "facet": True},99 ],100 "default_sorting_field": "num_employees",101})102```103104Unlike Algolia, most settings (searchable fields, facets, ranking) are set at105**query time**, so one collection serves many sort orders — less memory, more106flexibility.107108### Step 4 — Index documents109110```python111client.collections["companies"].documents.create({112 "id": "124", "company_name": "Stark Industries",113 "num_employees": 5215, "country": "USA",114})115# Bulk import (JSONL) for large datasets:116# client.collections["companies"].documents.import_(jsonl_lines, {"action": "upsert"})117```118119### Step 5 — Search (typo tolerance + facets + filters + geo)120121```python122client.collections["companies"].documents.search({123 "q": "stork", # typo of "stark" — handled out of the box124 "query_by": "company_name",125 "filter_by": "num_employees:>100",126 "sort_by": "num_employees:desc",127 "facet_by": "country",128})129```130131Capabilities to reach for: faceting/filtering, geo-search (sort by distance),132grouping & distinct, synonyms, curation/merchandizing (pin records),133federated **multi-search** across collections in one request, and vector /134hybrid search. Details in [`references/commands.md`](references/commands.md).135136### Step 6 — Search UI + production137138- **UI**: the [InstantSearch.js adapter](https://github.com/typesense/typesense-instantsearch-adapter)139 gives filtering, sorting, pagination, and as-you-type UI fast.140- **Multi-tenant**: generate **scoped API keys** that restrict access to141 certain records — never ship the admin key to the client.142- **HA**: run a **Raft-based cluster** (typically 3 nodes) for high143 availability; upgrades are a binary swap + restart.144145### Step 7 — Plugin-style installation alongside jeo-skills146147This skill folder is plugin-installable through the standard jeo-skills148flow so the wrapper, references, and installer land on disk for any supported149agent runtime:150151```bash152# Project install (writes into .agents/skills/typesense/)153npx skills add https://github.com/akillness/jeo-skills --skill typesense154155# Global install for every detected agent156npx skills add -g https://github.com/akillness/jeo-skills --skill typesense157158# Target specific agents159npx skills add -g https://github.com/akillness/jeo-skills --skill typesense -a claude-code -a codex -y160```161162## Output format163164When the user asks `typesense` for help, return a compact brief:165166```markdown167# typesense Routing Brief168169## Scope170- Server mode: docker | binary | cloud | undecided171- Client: python | js | php | ruby | community172- Stage: install-server | install-client | schema-design | index | search | ui | production-ha173174## Recommended next move175- start-docker-server | install-client | create-collection | import-docs | run-search | wire-instantsearch | scoped-keys | cluster176177## Why178- 2-3 bullets grounded in the user's packet179180## Route-outs181- `opik` / `langsmith` for LLM trace/eval observability182- `semble` for agent-facing code search over a repo183- `monitoring-observability` for non-search service telemetry184```185186## Best practices1871881. **Pin a version tag, never `latest`** — `typesense/typesense:27.1`, and189 keep the data dir on a real volume so restarts don't lose the index.1902. **Set settings at query time** — searchable fields, facets, sort, and191 ranking are per-query; you rarely need multiple collections for sort orders.1923. **Mark facets in the schema** — `facet: true` is required for filtering /193 drill-down on a field.1944. **Use scoped API keys for clients** — the admin key stays server-side;195 scoped keys enforce per-tenant record access.1965. **Bulk import as JSONL with `upsert`** — far faster than per-document197 creates for large datasets; size RAM to the index (memory-resident).1986. **License awareness** — the **server is GPL**, the **client libraries are199 Apache-2.0**; run the server as a separate daemon (the intended use).200201## References202203- Upstream repo: <https://github.com/typesense/typesense>204- API docs: <https://typesense.org/api>205- Guide / walk-through: <https://typesense.org/guide>206- Downloads (binary): <https://typesense.org/downloads>207- Docker image: <https://hub.docker.com/r/typesense/typesense>208- Typesense Cloud: <https://cloud.typesense.org>209- InstantSearch adapter: <https://github.com/typesense/typesense-instantsearch-adapter>210- Installer script: [`scripts/install.sh`](scripts/install.sh)211- Client + integration matrix: [`references/commands.md`](references/commands.md)212- Adjacent skills: `../opik/SKILL.md`, `../semble/SKILL.md`,213 `../monitoring-observability/SKILL.md`214- License: GPL-3.0 (server); API clients Apache-2.0