Gregius Data – WPCLI

Overview

Gregius Data ships a full WP-CLI command surface under wp gg-data — eight command families covering sync, vectors, RAG answers, benchmarks, evaluation, listing, and logs. Every subcommand accepts a --format flag (table, json, or csv), producing deterministic output for scripts and CI/CD pipelines.

Automation and scripting are a site operator’s most reliable tools. Without a command-line interface, routine tasks — syncing content after a migration, rebuilding vectors after a model change, auditing logs — require dashboard clicks or REST calls that compound into brittle workflows. The wp gg-data namespace turns these into repeatable, versionable one-liners.

By the end of this page, you will know every command family, its subcommands, flags, defaults, and output formats — enough to script your entire Gregius Data operational surface.

Prerequisites

  • WP-CLI installed and configured for the target WordPress site
  • Gregius Data plugin installed and activated
  • At least one data connection configured and active (for sync, vectors, answer, and listing commands)
  • AI models registered (for vector generation and RAG answer commands)

How to: Get Started

Every subcommand responds to --help with its full flag contract. Start here before running anything:

wp gg-data --help
wp gg-data sync --help
wp gg-data vectors --help
wp gg-data answer --help
wp gg-data benchmark --help
wp gg-data evaluation --help
wp gg-data list-connections --help
wp gg-data list-models --help
wp gg-data logs --help

All subcommands produce output in one of three formats controlled by --format:

FormatUse case
tableInteractive terminal use (default)
jsonScript consumption, API bridges, jq pipelines
csvSpreadsheet import, reporting pipelines

Sync Commands

Sync commands move WordPress content into PostgreSQL. Three subcommands cover posts, terms, and a combined full sync.

Subcommands:

SubcommandScope
wp gg-data sync postsSync posts by post type
wp gg-data sync termsSync all taxonomies, term taxonomies, and term relationships
wp gg-data sync allRun posts + terms in sequence

Flags:

FlagDefaultDescription
--connectiongregius-dataTarget data connection name
--post-typeallSpecific post type (posts only)
--batch-size100Posts per batch (max 1000)
--dry-runoffReport what would sync without writing
--formattabletable, json, or csv

Examples:

# Full sync with custom batch size
wp gg-data sync all --connection=gregius-data --batch-size=200

# Sync only pages, dry-run first
wp gg-data sync posts --post-type=page --dry-run

# Sync all posts as CSV for reporting
wp gg-data sync posts --format=csv

Vectors Commands

Vector commands generate and rebuild semantic embeddings from your synced content. Two subcommands handle initial generation and full rebuilds.

Subcommands:

SubcommandScope
wp gg-data vectors generateGenerate vectors for content that needs them
wp gg-data vectors rebuildRebuild all vectors for the connection

Flags:

FlagDefaultDescription
--connectiongregius-dataTarget data connection name
--embedding-modeltfidf-300Embedding model ID to use
--post-typeallSpecific post type to process
--batch-size50Items per batch (max 200)
--forceoffForce regeneration even when vectors exist
--formattabletable, json, or csv

Examples:

# Generate vectors with a specific model
wp gg-data vectors generate --embedding-model=hashingtf-murmur3-1024 --batch-size=100

# Full rebuild
wp gg-data vectors rebuild --connection=gregius-data

Answer Command

Ask a question through the RAG pipeline directly from the command line. Useful for testing retrieval quality and debugging prompt behavior.

Command: wp gg-data answer <query>

Flags:

FlagDefaultDescription
--connectiongregius-dataTarget data connection
--embedding-modeltfidf-300Embedding model for search
--agentic-model(none)Model for agentic routing
--rerank-model(none)Model for result reranking
--answer-modelgpt-4o-miniModel for answer generation
--prompt-id(none)Specific prompt ID (numeric)
--prompt(none)Prompt by slug or exact title
--no-trackoffSuppress interaction recording
--formattabletable or json

Examples:

# Basic RAG query
wp gg-data answer "What is dementia care?"

# With model overrides and JSON output
wp gg-data answer "What is dementia care?" --embedding-model=text-embedding-3-small --answer-model=gpt-4o --format=json

# Using a specific system prompt by ID
wp gg-data answer "Summarize our privacy policy" --prompt-id=42

Benchmark Commands

Benchmark commands validate and run the RAG quality benchmark. Designed for QA reviewers who need repeatable response validation.

Subcommands:

SubcommandPurpose
wp gg-data benchmark runExecute the full prompt matrix
wp gg-data benchmark list_promptsList configured benchmark prompts
wp gg-data benchmark validate_configValidate the benchmark configuration file
wp gg-data benchmark scorecardRegenerate scorecard from existing artifacts

Flags:

FlagDefaultDescription
--configuploads-based pathPath to benchmark config JSON
--only(none)Run a single prompt by ID (e.g. P1)
--scorecard-scopeallall or selected
--output-diruploads-based pathArtifact output directory

Examples:

# Validate config before running
wp gg-data benchmark validate_config

# Targeted single-prompt run
wp gg-data benchmark run --only=P1 --scorecard-scope=selected

# Regenerate scorecard without re-running
wp gg-data benchmark scorecard --from-dir=/path/to/artifacts

Evaluation Commands

Evaluation commands produce framework-ready evaluation datasets from pre-collected RAG prompts. Designed for QA engineers running downstream quality measurement.

Subcommands:

SubcommandPurpose
wp gg-data evaluation runExecute the full prompt corpus
wp gg-data evaluation list_promptsList configured evaluation prompts
wp gg-data evaluation validate_configValidate the evaluation configuration
wp gg-data evaluation adaptersList supported framework adapters

Flags:

FlagDefaultDescription
--configuploads-based pathPath to evaluation config JSON
--only(none)Run a single prompt by ID
--frameworkconfig valueOverride framework (e.g. ragas)
--output-diruploads-based pathArtifact output directory

Examples:

# List supported framework adapters
wp gg-data evaluation adapters

# Validate config, then run
wp gg-data evaluation validate_config
wp gg-data evaluation run --framework=ragas

# Single prompt for targeted validation
wp gg-data evaluation run --only=P1 --framework=ragas

Listing Commands

Listing commands discover the configured data connections and registered AI models. Use them before running sync, vectors, or answer commands to confirm valid names.

Commands:

CommandPurpose
wp gg-data list-connectionsList configured data connections
wp gg-data list-modelsList registered AI models

Flags:

FlagDefaultDescription
--formattabletable, json, or csv
--with-embedding-modelsoffInclude embedding model context (connections)
--with-model-detailsoffInclude full model details (connections; implies --with-embedding-models)
--connectiongregius-dataConnection scope (models)
--type(all)Filter by model type: embeddings, llm, or rerank (models)

Examples:

# Discover connection names
wp gg-data list-connections --format=json

# List embedding models only
wp gg-data list-models --type=embeddings --format=table

Logs Commands

Logs commands browse, export, purge, and summarize plugin operational logs. Designed for routine maintenance and diagnostics.

Subcommands:

SubcommandPurpose
wp gg-data logs listView log entries with filters
wp gg-data logs exportExport filtered logs to CSV or JSON
wp gg-data logs purgeDelete logs older than N days
wp gg-data logs statsSummary statistics

Flags:

FlagDefaultDescription
--level(all)Filter by severity: debug, info, warning, error, critical
--component(all)Filter by source: rag, search, sync, vectors, connection, model, cron, system
--connection(all)Filter by data connection name
--limit50Max entries returned (list)
--days30Age threshold for purge (must be ≥ 1)
--yesoffSkip confirmation prompt (purge)
--formattable (list, stats), csv (export)table, json, or csv

Examples:

# View recent error logs
wp gg-data logs list --level=error --limit=20

# Export sync component logs as CSV
wp gg-data logs export --component=sync --format=csv

# Purge logs older than 90 days
wp gg-data logs purge --days=90 --yes

# Quick stats overview
wp gg-data logs stats --format=json

Permissions

CommandRequired capabilityNotes
syncmanage_optionsWrites to PostgreSQL
vectorsmanage_optionsGenerates and stores embeddings
answerreadReads via Abilities API
benchmarkmanage_optionsExecutes RAG pipeline
evaluationmanage_optionsExecutes RAG pipeline
list-connectionsmanage_optionsReads connection configuration
list-modelsmanage_optionsReads model registry
logsmanage_optionsReads and manages operational logs

Next Steps

View on GitHub: You can review, fork, and inspect the entire codebase and core logic over at the repository on GitHub.

Gregius Data is the open-source AI orchestration layer for WordPress.