graph
Run graph-specific workflows.
Usage
worai graph sync run --profile <name> [--debug]worai --config <path> graph sync run --profile <name> [--debug]worai graph sync create <destination> [--template <src>] [--defaults] [--data-file <path>] [--vcs-ref <ref>] [--non-interactive] [--force]worai graph export [--profile <name>] [output_file_name]worai graph validate <file-or-url> [<file-or-url> ...] [--builtin-shape <name>] [--exclude-builtin-shape <name>] [--shape <file-or-url>] [--level warning|error] [--format text|json]worai graph property delete <predicate> [--dry-run] [--yes] [--workers <n>] [--retries <n>] [--rate-delay <s>] [--limit <n>]
Notes
graph sync runexecutes the graph sync workflow for a profile inworai.toml.graph sync createbootstraps a new graph sync project from a Copier template.graph sync createenables Copier trusted mode by default, so template_tasksrun automatically.graph exportdownloads graph data from/exportand writes it to a local file.--profileis optional for export and defaults todefault.- API key resolution is
profiles.<name>.api_keyfirst, thenWORDLIFT_API_KEY. - output format is inferred from file extension:
.ttl->text/turtle.nt->application/n-triples.nq->application/n-quads.rdf/.xml->application/rdf+xml.jsonld/.json->application/ld+json
- when no output file is passed, default name is
export_<profile>_<yyyyMMdd>_<seq>.ttl(sequence starts at1and increments if the file already exists).
graph validatevalidates one or more local files or URLs with SHACL shapes.--builtin-shapeincludes selected packaged shape names.--exclude-builtin-shaperemoves packaged shapes from the active set.--shapeadds extra shape files/URLs.--level warning|errorcontrols failure threshold.--format text|jsonselects output format.
graph property deleteremoves one predicate from all matching entities.- accepts full IRI (
https://w3id.org/seovoc/html) or CURIE (seovoc:html). - includes private fields by default (
X-include-Private: true) for both matching-entity discovery and deletion PATCH requests. --dry-runreports matching entities without patching.- without
--yes, the command asks for confirmation before patching.
- accepts full IRI (
- Supported input sources:
urls(explicit URL list)sitemap_url(+ optionalsitemap_url_pattern)- Google Sheets (
sheets_url+sheets_name+sheets_service_account) - configure exactly one source mode per run.
graph sync run --profileis required and must match a profile entry in the selected config file.- Config path comes from root
worai --config ...when provided. - Without root
--config, standard worai config discovery applies (WORAI_CONFIG,./worai.toml,~/.config/worai/config.toml,~/.worai.toml). sheets_service_accountaccepts either inline JSON or a file path.- The command fails when the selected profile does not define
api_key. google_search_consolecan be set globally or per profile inworai.toml.- profile value overrides global value.
- default is
falsewhen unset. - mapped to SDK setting
GOOGLE_SEARCH_CONSOLE.
postprocessor_runtimecan be set globally or per profile inworai.toml.- profile value overrides global value.
- accepted values:
oneshot,persistent. - SDK 6 default is
persistent; setoneshotto preserve legacy one-shot behavior. - when set, exported as env var
POSTPROCESSOR_RUNTIMEduringgraph sync run.
- Callback telemetry for
graph sync run:graph sync runusesrun_cloud_workflowand logs per-graph progress events and one final KPI summary.on_infolifecycle messages remain supported and are logged as info events.- debug artifacts are written by the SDK protocol callback to
output/debug_cloud/<profile>/(relative to the invocation current working directory):static_templates.ttlcloud_<sha256(url)>.ttlfor each callback URL.
- SDK 6 ingestion settings are forwarded when configured:
ingest_source:auto|urls|sitemap|sheets|localingest_loader:auto|simple|proxy|playwright|premium_scraper|web_scrape_api|passthroughingest_passthrough_when_html: defaulttrue
- Timeout is forwarded as
INGEST_TIMEOUT_MS(milliseconds). - SDK 6 cloud-flow migration deprecates integration reliance on:
WEB_PAGE_IMPORT_MODEWEB_PAGE_IMPORT_TIMEOUT
- SDK 6.2 SHACL validation settings:
- use
shacl_validate_mode = "warn"|"fail"|"off" - use
shacl_builtin_shapes,shacl_exclude_builtin_shapes,shacl_extra_shapes shacl_validate_syncandshacl_shape_specsare no longer supported Example ingestion config:
- use
[profiles.acme]
api_key = "wl_..."
sitemap_url = "https://example.com/sitemap.xml"
ingest_source = "sitemap"
ingest_loader = "web_scrape_api"
ingest_passthrough_when_html = true
web_page_import_timeout = "60s"
sheets_service_accountis required only when using Google Sheets source (sheets_url+sheets_name).- Failure cases for
sheets_service_account(Sheets source only):- value is missing or empty
- value is neither valid JSON object content nor an existing file path
- JSON content is valid JSON but not an object
Example profile config:
[profiles.acme]
api_key = "wl_..."
google_search_console = true
sheets_service_account = "./service-account.json"
# or inline JSON string:
# sheets_service_account = "{\"type\":\"service_account\",...}"
Examples
worai graph sync run --profile acmeworai --config ./worai.toml graph sync run --profile acmeworai graph sync run --profile acme --debugworai graph sync create ./acme-graphworai graph exportworai graph export --profile acmeworai graph export ./acme-export.jsonld --profile acmeworai graph validate ./acme-export.ttlworai graph validate ./acme-export.ttl ./acme-export.jsonld --builtin-shape google-required --shape ./custom.ttl --level warning --format jsonworai graph property delete seovoc:html --dry-runworai graph property delete https://w3id.org/seovoc/html --yes --workers 4