Gregius Data – WPCLI

Overview

Gregius Data ships a full WP-CLI command surface under wp gregius-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 gregius-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 gregius-data --help
wp gregius-data sync --help
wp gregius-data vectors --help
wp gregius-data answer --help
wp gregius-data benchmark --help
wp gregius-data evaluation --help
wp gregius-data list-connections --help
wp gregius-data list-models --help
wp gregius-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 gregius-data sync postsSync posts by post type
wp gregius-data sync termsSync all taxonomies, term taxonomies, and term relationships
wp gregius-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 gregius-data sync all --connection=gregius-data --batch-size=200

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

# Sync all posts as CSV for reporting
wp gregius-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 gregius-data vectors generateGenerate vectors for content that needs them
wp gregius-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 gregius-data vectors generate --embedding-model=hashingtf-murmur3-1024 --batch-size=100

# Full rebuild
wp gregius-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 gregius-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 gregius-data answer "What is dementia care?"

# With model overrides and JSON output
wp gregius-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 gregius-data answer "Summarize our privacy policy" --prompt-id=42

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 gregius-data evaluation runExecute the full prompt corpus
wp gregius-data evaluation list_promptsList configured evaluation prompts
wp gregius-data evaluation validate_configValidate the evaluation configuration
wp gregius-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 gregius-data evaluation adapters

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

# Single prompt for targeted validation
wp gregius-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 gregius-data list-connectionsList configured data connections
wp gregius-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 gregius-data list-connections --format=json

# List embedding models only
wp gregius-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 gregius-data logs listView log entries with filters
wp gregius-data logs exportExport filtered logs to CSV or JSON
wp gregius-data logs purgeDelete logs older than N days
wp gregius-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 gregius-data logs list --level=error --limit=20

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

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

# Quick stats overview
wp gregius-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

Local:

Global: