CameoDB v0.3.11: A New World of Search, From JSON Paths to Source Code
CameoDB v0.3.11 searches any piece of text, a star at the front of a word, regular expressions, grep over stored text and JSON by every path, all from the index, and ships a code index that lets people and agents navigate any repository.
A New World of Search
0.3.11 brings the search forms that are the hardest to make fast: any piece of text, a star at the front of a word, regular expressions, grep over stored text and JSON by path and type.
Each runs from an index built for it rather than a scan, and they combine freely with phrases, ranges, sorting, counts and paging.
We proved them on source code, the most demanding text we know, and ship the result as a tool for any repository.
What you can ask of your data is a different thing than it was a release ago.
text_sub:"fn spawn(" # any piece, n-grams
name:*Reloader # a star at the front
version:/1\.2\.[0-9]+/ # a regex over terms
lang:rust grep text:/\.reload\(\)/ # grep over stored text
cells.amount:>3 # JSON by path and type
# all of it, in one query
path:*/server/* AND name_parts:reload
grep text:/\.reload\(\)/ limit 0 values(dir)
Names, Pieces and Suffixes
The code tokenizer cuts identifiers into their words at _ and at changes of case, so KeyReloader, key_reloader, KEY_RELOADER and the words in a comment are one phrase. trigram indexes every three characters, punctuation included, so any piece of a value is found exactly, straight from the index. And a ghost can now transform its source: reverse turns a suffix into a prefix, host, extension and dirname cut URLs and paths, and the planner picks the right ghost for *Reloader or *load* on its own.
# one phrase, every spelling text_words:"key reloader" # KeyReloader key_reloader KEY_RELOADER # any piece, across spaces and punctuation text_sub:"fn spawn(" # a star at the front, from ghosts name:*Reloader # reverse ghost path:*/tests/* # trigram ghost "domain": {"ghost": {"source": "email", "fn": "host"}}
Regex and Grep
field:/pattern/ matches a regular expression against a field's terms, anchored at both ends, so names, versions and codes are found by their shape. grep goes further and runs a regex over stored text: the pattern's literals find candidates on the trigram column, each is read and checked, and the query runs over the verified documents alone. total_hits, sorting and metrics count real matches, and every hit names its lines, line numbers and byte ranges.
# terms by their shape name:/.*[Rr]eload.*/ version:/1\.2\.[0-9]+/ # a regex over stored text lang:rust grep text:/\.reload\(\)/ # each hit carries its lines "_grep": {"field": "text", "lines": [ {"line": 4, "text": " keys.reload();", "ranges": [[8, 17]]}]}
JSON, All the Way Down
A json field now indexes every value under its key's path and by its own type: strings, numbers, booleans, RFC 3339 dates, and each object of an array under the same paths. Ranges and sorts at a path run from a fast column, and the index lists the paths it holds so a typo is answered with the nearest one. values(field) then counts a field's most frequent values over every match, not only the page: over 2 million matches it answers in about 90 ms.
# a parsed config, by path and type data.package.name:serde data.workspace.dependencies.tokio.version:1* # ranges and sorts at a path cells.amount:>3 sort cells.amount:desc cells.when:[2024-01-01T00:00:00Z TO *] # where KeyReloader is used, by directory refs:KeyReloader limit 0 values(dir)
The Code Index
All of it comes together in code-index, a Python tool in the CameoDB repository. Run inside any git repository, it parses Rust, Python, C, C++ and shell with tree-sitter into one row per function, class, struct, namespace or imports block, each with its text, its lines and its links: calls, refs, uses, bases. Every file rebuilds byte for byte, sync reloads only what changed, and 13.7 million lines of ClickHouse load in 69 seconds.
$ code-index schema && code-index load loaded 496867 rows from 98576 files name:KeyReloader AND NOT unit_type:end # definition symbol:"DB::StorageMergeTree::read" # by qualified name calls:spawn AND test_code:false # callers uses:"Interpreters/Context.h" # importers bases:IStorage AND is_declaration:false # subclasses test_code:true AND calls:reload # its tests
Agents on the Same Index
Agents reach the same index through the MCP server built into the node, guided by a 6 KB skill that ships beside the tool. One search_index call carries up to 20 searches, chars returns short elements whole and the head of long ones, and hits come back as a table with the columns named once, 58% of their former size. On nine code-navigation tasks an agent spent 4,080 tokens on answers, against 7,868 for the same tasks done with rg.
{"index": "clickhouse", "limit": 5,
"fields": ["path", "name", "line_from", "line_to"],
"queries": [
"name_parts:hash AND path:src/Functions/*",
{"query": "name:REGISTER_FUNCTION AND path:*Murmur*",
"fields": ["path", "line_from", "text"], "chars": 3000},
{"query": "path:tests/* AND path_text:hash", "limit": 20}
]}
Upgrade and Get It
Existing indexes read as they did, and 0.3.10 and 0.3.11 nodes form one cluster, so you can upgrade a node at a time. Upgrade every node before declaring the new tokenizers, a ghost with fn or a json field with paths, and before using grep, values, term regex or leading wildcards across a cluster. A schema an older peer cannot build is refused with 400, naming the nodes.
Hardened. The move to libp2p 0.57 retires eighteen dependency advisories, among them a spoofed DNS packet that made the decoder reserve 18 MB. The Docker Compose files drop every Linux capability and set no-new-privileges, and the cluster's load balancer runs unprivileged, still on port 9480.
Download
One binary for macOS (Apple Silicon), Linux and Windows, or a deb, rpm or msi package. Every artifact is signed with cosign and listed with its SHA-256, and signed SPDX and CycloneDX SBOMs name every dependency. Verify a download with one command.
Start in a minute
- Run
cameodbwith no configuration. It serves127.0.0.1:9480and keeps its data in./data/cameodb. - Inside a repository,
code-index schema && code-index loadwith the code-index tool. - Point your agent at
http://127.0.0.1:9480/mcpand add the skill that ships beside the tool.
Then try it on your own code. The index comes with its model already defined: the fields, ghosts and tokenizers for loading, queries and MCP. One load turns your repository into something your agents can navigate, and you can see how it serves your languages, your codebase and the way you work.