Skip to content

xpd find

Run xpd find "<task>" before choosing a library function to search xpd's bundled library symbols, rules, worked recipes, and playbooks without installing those libraries. Read any chosen entry in full with xpd api.

Terminal window
xpd find [OPTIONS] [QUERY]
Argument What it does
<QUERY> The task, in your own words, such as "grouped regression".
Option Default What it does
--package <PACKAGE> Search only this library, by its Python import name, such as sklearn.
--kind <KIND> Search only symbols, rules or recipes. Values: symbol, rule, recipe.
--category <CATEGORY> Search only this category. Conflicts with --check. Values: data, numerics, statistics, features, models, evaluation, optimization, visualization, workflow.
--role <ROLE> Filter or list symbols by canonical workflow role (such as splitters or linear-models) Conflicts with --check. Values: splitters, hyperparameter-search, scalers, feature-engineering, meta-estimators, linear-models, regression, classification, cleaning, feature-selection, unsupervised, calibration, explanation, forecasting, evaluation.
--limit <LIMIT> Maximum results per kind (defaults to 5 symbols, 3 rules and 3 recipes)
--format <FORMAT> text Print text, or JSON with symbols, rules and recipes. Values: text, json.
--index <INDEX> Additional index generated from local source.
--check <CHECK> Run real discovery questions and fail if an expected entry misses the top five. Conflicts with <QUERY>.
Terminal window
$ xpd find "rounded bars" --kind recipe
Recipes
plotly/recipe/rounded-bars [recipe] [installed 7.1]
Rounded Bars
pandas/recipe/round-each-value-in-the-index-to-the [recipe] [installed 3.1.1]
Round each value in the Index to the given number of decimals.
numpy/recipe/round-to-nearest-integer-towards-zero [recipe] [installed 2.5.5]
Round to nearest integer towards zero.
Terminal window
$ xpd find "improve my charts" --kind recipe
Recipes
xpd/recipe/plotly-chart [recipe]
...

A playbook is a complete house style module that passes style = "strict" with ordered commands and rules. Playbooks rank first on ties.

Playbook Pattern Sample query
xpd/recipe/pandas-pipeline Step functions returning frame.assign(...) joined with pipe "build a pandas pipeline"
xpd/recipe/feature-module One typed function per feature column "write a feature engineering module"
xpd/recipe/linear-script Step-by-step script rewritten as one chain verified by xpd equiv "turn this script into a linear pipeline"
xpd/recipe/plotly-chart Tufte-compliant plotly figure with direct labels and plain template "improve my charts"

xpd find ranks Symbols, Rules, and Recipes by combining keyword scores with semantic embeddings from EmbeddingGemma 300M (downloaded once, 333 MB). Without Python or the cached model, xpd find falls back to keyword ranking and notes the fallback on stderr.

Platform Embedding model cache
XDG_CACHE_HOME set $XDG_CACHE_HOME/xpd/models
Linux ~/.cache/xpd/models
macOS ~/Library/Caches/xpd/models
Windows %LOCALAPPDATA%\xpd\models

Pass --check <file> (such as indexes/questions.json) to assert that every benchmark query returns its expected entry in the top five and every playbook passes strict linting.

Exit code Meaning
0 Search ran (even with zero matches) or all --check questions passed
2 Invalid arguments, unreadable index, failing --check question, or playbook lint error