struo query
Query the typed build graph
Synopsis#
struo query [QUERY] <SUBCOMMAND>Description#
Inspectable-first surface for humans and agents. query targets lists every declared target id with its target kind
and capabilities; query capabilities shows what a specific
target exposes (build, lint, run, test); query schema
returns the typed attribute and provider shape for a target kind;
query example returns the files in a chosen starter; query script validates
an annotated script contract; query validate-workspace checks the
complete loaded graph; and query evidence lists durable action evidence
captured from prior executions. A quoted
MATCH ... RETURN ... expression can explore the graph through
a read-only Cypher-like pattern. All query surfaces respect
--format json and --format toon so consumers can plan
against the graph without scraping prose.
Query Expressions#
struo query '<QUERY>' accepts a read-only subset of Cypher backed
by the Cypher tree-sitter grammar. It accepts one MATCH pattern,
optional WHERE predicates joined with AND and OR, and explicit
RETURN projections.
struo query 'MATCH (app:Target {id: "services/api/Api"})-[:DEPENDS_ON*]->(dep:Target) RETURN dep.id, dep.kind'
struo query 'MATCH (t:Target)-[:EXPOSES]->(c:Capability {name: "test"}) RETURN t.id'
struo query 'MATCH (t:Target) WHERE t.visibility CONTAINS "public" OR t.attrs.tier IN ["core", "shared"] RETURN t.id, t.attrs.tier'Supported labels are Target, Capability, and Provider. Labels
use the :Label form, for example (t:Target). Bare node names
without a colon are aliases, so (Target) binds a variable named
Target instead of filtering by the Target label. Supported
relationships are DEPENDS_ON, EXPOSES, and EMITS. The *
suffix on a relationship performs transitive traversal, for example
[:DEPENDS_ON*].
Predicates support =, <>, CONTAINS, IN, STARTS WITH, and
ENDS WITH. CONTAINS checks a string substring or array membership.
IN checks whether a scalar is present in an array literal. Property
paths can inspect nested maps, for example t.attrs.bundle_id.
String literals can be quoted with single or double quotes and
support \n, \r, \t, \\, \", and \' escapes. Other
escape forms, including Unicode escapes, are rejected.
Arguments#
| Argument | Required | Description |
|---|---|---|
<QUERY> | no | Read-only Cypher-like graph query expression. |
Subcommands#
struo query workspacestruo query triggersstruo query validate-triggerstruo query trigger-planstruo query targetsstruo query capabilitiesstruo query artifactsstruo query schemastruo query examplestruo query target-kindsstruo query module-contractstruo query external-sourcestruo query targetstruo query graph-fingerprintstruo query graph-reprostruo query testsstruo query affected-testsstruo query test-planstruo query test-resultsstruo query test-manifeststruo query test-attemptsstruo query evidencestruo query verificationstruo query validate-targetstruo query scriptstruo query validate-workspacestruo query validate-actionsstruo query validate-module