Skip to Content
CLIsearch

flexkit search

Searches the records of your project by text, across every entity or only the ones you name, and lists the best matches. It uses the same search as the Studio: exact and prefix matches come first, then near misses for typos. Only searchable attributes are matched.

Synopsis

flexkit search <text> [--entity <name>]... [--limit <n>] [--scope <scope>] [--json] [--project <id>]

Examples

# Search every entity
flexkit search "canvas bag"
 
# Search only products and brands, up to 25 results
flexkit search tote --entity products,brands --limit 25
 
# Show German labels of scoped display attributes
flexkit search tasche --scope de
 
# Open the best match
flexkit search BAG-001 -e product --json | jq -r '.[0]._id' | xargs flexkit records get product

The table shows each hit’s entity, id, label (the display attribute) and relevance score, best first. With --json, each hit has entity, plural, _id, label, score and the matched document.

Options

OptionDescription
-e, --entity <name>Only search this entity, by name or plural. Repeatable or comma-separated. Default: every entity.
-n, --limit <n>Maximum number of results, from 1 to 100. Default: 10.
--scope <scope>Scope used for scoped labels. Default: the project’s default scope.
--jsonPrint the hits as JSON on stdout.
-p, --project <id>Project to search. Defaults to the linked project.

You can also use all global options.

Authentication

Search works with your flexkit login session or with a project API token. Results respect your spaces: records of entities bound to spaces you don’t belong to are left out, and attributes bound to such spaces are removed from the results.

Last updated on