| key | query | ||
|---|---|---|---|
| name | Query | ||
| tags |
|
||
| status | active | ||
| description | A structured request for entities from the repository. Supports filters, nested includes, ordering, cursor-based pagination, computed fields, and full-text/vector search. | ||
| alternativeNames |
|
||
| sourceFiles |
|
||
| relatesTo |
|
A query is a structured request for entities from the repository. The format is JSON-based, designed to be schema-validatable, LLM-friendly, and expressive enough for complex data access without raw SQL. Queries drive views, navigation, CLI output, and API responses.
Retrieve one entity by reference (UID, key, or ID) with optional field selection:
{ "ref": "my-task", "includes": { "title": true, "project": { "includes": { "name": true } } } }Query multiple entities with filters, includes, ordering, and pagination:
{ "filters": { "type": "Task", "status": "active" }, "includes": { "title": true }, "orderBy": ["!priority"], "pagination": { "limit": 20 } }Filters constrain which entities are returned. Simple equality uses direct values; complex conditions use operator objects:
Common operators: eq, not, in, notIn, empty
String operators: contains, notContains, match
Number/date operators: lt, lte, gt, gte
Full-text: $text — case-insensitive substring search across all plaintext and richtext fields (excluding identity fields and tags)
{ "status": "active", "priority": { "op": "gte", "value": 3 }, "tags": { "op": "in", "value": ["urgent", "important"] } }Full-text search combines with other filters using AND:
{ "$text": "authentication", "type": "Task", "status": "active" }The includes parameter controls which fields appear in the response. When omitted, all fields are returned. When specified, only requested fields are included. Includes nest recursively for relations, and can apply filters to related entities:
{ "includes": { "title": true, "comments": { "includes": { "body": true, "author": { "includes": { "name": true } } }, "filters": { "status": "approved" } } } }- orderBy: field names with
!prefix for descending:["!priority", "createdAt"] - pagination: cursor-based with
limit,after,before. Cursor-based pagination provides consistent results even when data changes between pages.
$and, $or, $not for complex filter composition. The $ prefix avoids collision with user field names. Root-level filters are implicitly $and.
match: full-text searchsimilar: vector similaritysearch: hybrid combining both
Defined in a computed section, calculated at query time, referenceable in filters and orderBy:
- Aggregation:
count,sum,avg,min,max - Collection:
concat,collect - Boolean:
every,some - Temporal:
earliest,latest
Computed fields are only included in the response when explicitly listed in includes.
A compact text representation for CLI, URLs, and views — a lossy subset of the full JSON format. Each query parameter has its own independent serial grammar:
- Filters:
type=Task status=done priority>=3ordeployment issues type=Task. Plain text tokens (without an operator) are collected into a$textfilter for full-text search across plaintext and richtext fields. When the same field appears multiple times, compatible values (equality andin) are merged into a singleinfilter (e.g.status=active status=pending→status:in=active,pending); incompatible operators are overwritten by the last occurrence - Includes:
title,status,project(title,owner(name,email)). Parentheses for nesting - OrderBy:
!priority,createdAt
binder search type=Task status=done -f "project(title),tags" -o "!priority" --limit 20Advanced features (logical operators, computed fields, nested include filters) require the full JSON/YAML form.
- JSON format: schema-validatable, LLM-friendly, structured for programmatic construction
- Naming convention: top-level fields use nouns (
filters,includes,orderBy); operators use verbs (count,match,contains) - Nested includes: fetch exactly what's needed in one request, including related data
- Cursor pagination: stable under concurrent modification, unlike offset-based
- Serial as lossy subset: optimised for the common case; power users use JSON