{"id":19311059,"url":"https://github.com/boxuk/dictator","last_synced_at":"2025-09-22T03:32:31.191Z","repository":{"id":43188203,"uuid":"350381582","full_name":"boxuk/dictator","owner":"boxuk","description":"Dictator controls the State of WordPress","archived":false,"fork":false,"pushed_at":"2022-12-01T09:59:37.000Z","size":188,"stargazers_count":32,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-02T00:34:58.481Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boxuk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-22T14:51:31.000Z","updated_at":"2024-07-18T01:01:36.000Z","dependencies_parsed_at":"2023-01-22T14:00:08.753Z","dependency_job_id":null,"html_url":"https://github.com/boxuk/dictator","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fdictator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fdictator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fdictator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fdictator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boxuk","download_url":"https://codeload.github.com/boxuk/dictator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249928600,"owners_count":21346999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T00:27:32.111Z","updated_at":"2025-09-22T03:32:26.123Z","avatar_url":"https://github.com/boxuk.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dictator\n\n[![Linting status](https://github.com/boxuk/dictator/actions/workflows/linting.yml/badge.svg)](https://github.com/boxuk/dictator/actions/workflows/linting.yml)\n[![Testing status](https://github.com/boxuk/dictator/actions/workflows/testing.yml/badge.svg)](https://github.com/boxuk/dictator/actions/workflows/testing.yml)\n\n## Attribution\n\n- This package was forked from\n  [Dictator](https://danielbachhuber.com/2014/03/31/introducing-dictator/)\n  with permission due to it seemingly falling into abandonment.\n  \n## Overview\n\nDictator controls the State of WordPress. Strongly influenced by [Salt](http://www.saltstack.com/), Dictator permits configuration attributes stored in YAML state files to be *imposed* upon WordPress.\n\nDictator's primary concern is to permit the expression of how WordPress is configured as YAML state files. It understands WordPress in terms of *states*. States are collections of *regions*. Each state file has the state declaration, and any tracked configuration details for each region.\n\nFor example, the `site` state includes the `settings`, `users`, and `terms` regions. Running `wp dictator export site site-state.yml` against production data will export the production state into a human-readable state file:\n\n\tstate: site\n\tsettings:\n\t  title: Dictator\n\t  description: Just another WordPress site controlled by Dictator\n\t  date_format: F j, Y\n\t  time_format: g:i a\n\t  active_theme: twentyfourteen\n\nApply the state file locally with `wp dictator impose site-state.yml` and you've replicated production without having to download the database.\n\n## Installation\n\n### WP-CLI package\n\n`wp package install boxuk/dictator`\n\n### Composer package\n\n`composer req boxuk/dictator`\n\n## Usage\n\nDictator comprises these WP-CLI commands:\n\n* `wp dictator compare \u003cfile\u003e` - Compare a given state file to the State of WordPress. Produces a colorized diff if differences, otherwise empty output.\n* `wp dictator export \u003cstate\u003e \u003cfile\u003e [--regions=\u003cregions\u003e] [--force]` - Export the State of WordPress to a state file.\n* `wp dictator impose \u003cfile\u003e [--regions=\u003cregions\u003e]` - Impose a given state file onto WordPress.\n* `wp dictator validate \u003cfile\u003e` - Validate the provided state file against each region's schema.\n\nFirst time user? Try Dictator out by calling `wp dictator export site site-state.yml`, making a change to the state file, and seeing a colorized diff of how it compares with `wp dictator compare site-state.yml`.\n\n## Extending\n\nEven though Dictator is in its infancy, it was written with extensibility in mind. New states can be registered with `Dictator::addState();`, and can comprise a selection of existing or custom regions. Write a state / region for your plugin / theme to make it easy for your users to export / impose settings.\n\n### Existing extensions\n\n* [Dictator WooCommerce](https://github.com/boxuk/dictator-woocommerce)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxuk%2Fdictator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboxuk%2Fdictator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxuk%2Fdictator/lists"}