From b23dc4ddfdca2de6a95da4c200a07e2bf986c2d0 Mon Sep 17 00:00:00 2001 From: Hunter Mellema <124718352+hpmellema@users.noreply.github.com> Date: Thu, 25 Jul 2024 09:40:05 -0600 Subject: [PATCH] Add a section on the select task (#147) --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index e0d19c3..d759b9f 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,20 @@ to install it now. ## Guide A detailed guide can be found here: https://smithy.io/2.0/guides/building-models/gradle-plugin.html +## Querying models in your project +All the Smithy Gradle plugins above will add a `select` task to your Gradle project. This task will execute the +Smithy CLI `select` command, allowing you to queries a model using a [selector](https://smithy.io/2.0/spec/selectors.html#selectors). + +For example, to query all trait definitions in your project you could use the `select` task as follows: +```console +gradle select --selector '[trait|trait]' +``` + +or with the Gradle wrapper: +```console +./gradlew select --selector '[trait|trait]' +``` + ## Plugins ### Smithy Base Plugin The `smithy-base` plugin is a capability plugin primarily intended to be applied by other Smithy gradle plugins such as