Command Line Interface (CLI)
Plain meaning: Run GKC tasks from your terminal.
Overview
The GKC command line interface provides a lightweight entry point for authentication, source loading, profile maintenance, packet workflows, validation, and SpiritSafe artifact maintenance.
Installation
If you have GKC installed, the gkc command should be available. When developing locally, use Poetry to run the CLI:
poetry run gkc --help
Global Flags
These flags work with any command:
--json: Emit machine-readable JSON output for all commands--verbose: Show additional details and diagnostic information
Command Groups
Authentication
Manage credentials and verify authentication for Wikiverse (Wikidata, Wikipedia, Wikimedia Commons) and OpenStreetMap services.
gkc auth wikiverse status
gkc auth osm status
Mash
Load Wikidata items as templates for viewing, filtering, and exporting in various formats.
gkc mash qid Q42
Profile
Export JSON Entity Profiles, hydrate value lists, and load profile packages.
gkc profile package load --profile Q4 --source local --local-root /path/to/SpiritSafe
gkc profile export-json --source local --local-root /path/to/SpiritSafe --output /path/to/SpiritSafe/profiles
gkc profile value-lists hydrate --source local --local-root /path/to/SpiritSafe
Packet
Build, inspect, validate, and charge curation packets.
gkc packet build --profile Q4 --source local --local-root /path/to/SpiritSafe -o /tmp/packet.json
gkc packet charge --packet-file /tmp/packet.json --qid Q195562 -o /tmp/charged.json
SpiritSafe
Build SpiritSafe support artifacts such as sitelink sources and semantic anchors.
gkc spiritsafe sitelinks sync-wikimedia-sites --source local --local-root /path/to/SpiritSafe
gkc spiritsafe semantic-anchors build --source local --local-root /path/to/SpiritSafe
Registry
The live CLI also includes gkc registry for registry inspection and validation against still/profiles/*.json.
Wizard
Launch the interactive Streamlit curation wizard from a profile reference.
gkc wizard --profile Q4 --source local --local-root /path/to/SpiritSafe
Mash revision cache operations
Check Data Distillery Wikibase recentchanges and refresh SpiritSafe entity cache artifacts.
gkc mash check-wikibase-revisions --since 2026-03-13T16:00:00Z
gkc mash cache-wikibase-revisions --cache-dir /path/to/SpiritSafe/still/entities
Quick Start Examples
Check authentication status:
gkc auth wikiverse status
Load a Wikidata item as a template:
gkc mash qid Q42 --summary
Get raw Wikidata JSON output for scripting:
gkc --json mash qid Q42 --raw
Launch the interactive profile wizard:
gkc wizard --profile Q4 --local-root /path/to/SpiritSafe
Getting Help
Use --help with any command or subcommand to see available options:
gkc --help
gkc auth --help
gkc mash qid --help
gkc packet --help
gkc spiritsafe --help
Build and Test Commands
Build documentation:
poetry run mkdocs build
Run tests:
poetry run pytest