SpiritSafe CLI
Plain meaning: Build SpiritSafe-maintained support artifacts from local cache content.
Overview
The gkc spiritsafe command group manages generated artifacts that live alongside the SpiritSafe cache.
If you need the concept before the commands, see Semantic Anchors.
Current subcommands:
gkc spiritsafe sitelinks sync-wikimedia-sitesgkc spiritsafe semantic-anchors buildgkc spiritsafe semantic-anchors validate
These routes are oriented toward local SpiritSafe maintenance workflows.
gkc spiritsafe sitelinks sync-wikimedia-sites
Fetch the Wikimedia sitematrix and write the SpiritSafe sitelink source artifact.
gkc spiritsafe sitelinks sync-wikimedia-sites --source local --local-root /path/to/SpiritSafe
Common options:
--source-url: Wikimedia sitematrix URL.--timeout: HTTP timeout in seconds.--user-agent: User-Agent string for the sitematrix request.--source: Source override, eithergithuborlocal.--local-root: Local SpiritSafe root when using--source local.--repo: GitHub repository slug when using--source github.--ref: Git ref when using--source github.-o,--output: Optional output path. By default this writes topartners/wikimedia_sites.jsonunder the local SpiritSafe root.
gkc spiritsafe semantic-anchors build
Build the SpiritSafe semantic anchor artifact from local cache entities.
This command materializes the transformed runtime lookup document derived from the package contract in meta_wb_init.yaml and current cache-backed Meta-Wikibase resolution.
The artifact binds internal ontology names such as _entity_profile and _has_statement to concrete entity URIs in config/semantic_anchors.json.
gkc spiritsafe semantic-anchors build --source local --local-root /path/to/SpiritSafe
Common options:
--source: Source override, eithergithuborlocal.--local-root: Local SpiritSafe root when using--source local.--repo: GitHub repository slug when using--source github.--ref: Git ref when using--source github.-o,--output: Optional output path. By default this writes toconfig/semantic_anchors.jsonunder the local SpiritSafe root, unless a workflow overrides it.
gkc spiritsafe semantic-anchors validate
Validate a semantic-anchor artifact against the package-owned Meta-Wikibase contract.
Use this when you need to confirm that the generated artifact still matches the ontology backbone expected by gkc runtime consumers.
Validate a specific artifact file:
gkc spiritsafe semantic-anchors validate --artifact-file /path/to/semantic_anchors.json
Validate the default artifact in a local SpiritSafe checkout and compare it to a freshly rebuilt cache-derived document:
gkc spiritsafe semantic-anchors validate --local-root /path/to/SpiritSafe --check-current-cache
Common options:
--artifact-file: Path to an existing semantic-anchor JSON artifact.--local-root: Local SpiritSafe root. When--artifact-fileis omitted, the command defaults toconfig/semantic_anchors.jsonunder this root.--check-current-cache: Rebuild the current semantic-anchor document fromstill/entitiesand compare it to the artifact being validated.
This command checks the runtime contract only:
- required internal semantic anchors are present
- property anchors resolve to property ids and carry the expected datatype
- item anchors resolve to item ids
- anchor
idvalues use URI form for stable runtime resolution - the artifact shape is valid
When --check-current-cache is used, stale-artifact drift against current cache-derived anchors is also reported.
Related Commands
gkc profile export-jsongkc profile value-lists hydrategkc packet build