New CLI tool that enables selective queries against the triple store,

unlike tg-show-graph which dumps the entire graph.

Features:
- Filter by subject, predicate, object, and/or named graph
- Auto-detection of term types (IRI, literal, quoted triple)
- Two ways to specify quoted triples:
  - Inline Turtle-style: -o "<<s p o>>"
  - Explicit flags: --qt-subject, --qt-predicate, --qt-object
- Output formats: space-separated, pipe-separated, JSON, JSON Lines
- Streaming mode for efficient large result sets

Auto-detection rules:
- http://, https://, urn:, or <wrapped> -> IRI
- <<s p o>> -> quoted triple
- Otherwise -> literal
This commit is contained in:
Cyber MacGeddon 2026-03-10 10:29:14 +00:00
parent ec83775789
commit fc011499d4
2 changed files with 561 additions and 0 deletions

View file

@ -71,6 +71,7 @@ tg-show-config = "trustgraph.cli.show_config:main"
tg-show-flow-blueprints = "trustgraph.cli.show_flow_blueprints:main"
tg-show-flow-state = "trustgraph.cli.show_flow_state:main"
tg-show-flows = "trustgraph.cli.show_flows:main"
tg-query-graph = "trustgraph.cli.query_graph:main"
tg-show-graph = "trustgraph.cli.show_graph:main"
tg-show-kg-cores = "trustgraph.cli.show_kg_cores:main"
tg-show-library-documents = "trustgraph.cli.show_library_documents:main"