id = "wp"
name = "WP-CLI"
homepage = "https://wp-cli.org"
description = "The command line for WordPress. No browser required."
icon = "SimpleIcons:wordpress"
executables = ["wp"]
[dotfiles]
paths = ["~/.wp-cli/config.yml"]
exclude = ["~/.wp-cli/cache/", "~/.wp-cli/packages/"]
secret = []
side_effect = false
[[dotfiles.machine_lines]]
file = "~/.wp-cli/config.yml"
match = { key_path = ["path", "require"] }
scope = "backup"
[[dotfiles.secret_paths]]
file = "~/.wp-cli/config.yml"
match = { key_path = ["config create.dbpass", "core config.dbpass"] }
[commands]
format = 1
label = "WP-CLI"
description = "Manage plugins and run database search-replace for a WordPress site. Run from the site directory or set the WordPress path. Other command groups are left out."
quality = "ai-draft"
base = "fig:wp"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/wp.ts"
license = "MIT"
[[commands.subcommand]]
path = ["plugin", "list"]
label = "List plugins"
description = "Show installed plugins."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/wp.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "status"
label = "Status"
type = "string"
option = ["--status"]
value_style = "equals"
suggestions = [{ value = "active", label = "active" }, { value = "inactive", label = "inactive" }, { value = "must-use", label = "must-use" }, { value = "dropin", label = "dropin" }, { value = "active-network", label = "active-network" }]
sources = ["fig"]
[[commands.subcommand.field]]
id = "format"
label = "Output format"
type = "string"
option = ["--format"]
value_style = "equals"
suggestions = [{ value = "table", label = "table" }, { value = "csv", label = "csv" }, { value = "json", label = "json" }, { value = "count", label = "count" }, { value = "yaml", label = "yaml" }]
sources = ["fig"]
[[commands.subcommand.field]]
id = "field"
label = "Single field"
type = "string"
option = ["--field"]
value_style = "equals"
sources = ["fig"]
[[commands.subcommand.field]]
id = "fields"
label = "Fields"
description = "Comma-separated list of fields."
type = "string"
option = ["--fields"]
value_style = "equals"
sources = ["fig"]
[[commands.subcommand.task]]
id = "list"
label = "List plugins"
fields = ["status", "format"]
[[commands.subcommand.task]]
id = "active"
label = "Active plugins"
fields = ["status", "format"]
set = { status = ["active"] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["status", "format"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["field", "fields"]
[[commands.subcommand]]
path = ["plugin", "install"]
label = "Install plugins"
description = "Install from wordpress.org, a zip or a URL."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/wp.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "plugin"
label = "Plugin slug, zip or URL"
type = "string"
position = 0
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "version"
label = "Version"
type = "string"
option = ["--version"]
value_style = "equals"
sources = ["fig"]
[[commands.subcommand.field]]
id = "force"
label = "Overwrite installed version"
type = "boolean"
option = ["--force"]
effect = "overwrite"
sources = ["fig"]
[[commands.subcommand.field]]
id = "activate"
label = "Activate after install"
type = "boolean"
option = ["--activate"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "install"
label = "Install and activate"
fields = ["plugin", "activate"]
required = ["plugin"]
set = { activate = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["plugin", "activate"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["version", "force"]
[[commands.subcommand]]
path = ["plugin", "activate"]
label = "Activate plugins"
description = "Activate one or all plugins."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/wp.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "plugin"
label = "Plugins"
type = "string"
position = 0
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "all"
label = "All plugins"
type = "boolean"
option = ["--all"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "network"
label = "Network-wide"
type = "boolean"
option = ["--network"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "activate"
label = "Activate plugin"
fields = ["plugin"]
required = ["plugin"]
[[commands.subcommand.task]]
id = "all"
label = "Activate all"
fields = ["all"]
set = { all = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["plugin", "all"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["network"]
[[commands.subcommand]]
path = ["search-replace"]
label = "Search and replace"
description = "Replace strings in the database. Preview with a dry run first."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/wp.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "old"
label = "Search for"
type = "string"
position = 0
sources = ["fig"]
[[commands.subcommand.field]]
id = "new"
label = "Replace with"
type = "string"
position = 1
sources = ["fig"]
[[commands.subcommand.field]]
id = "table"
label = "Tables"
description = "Restrict to these tables; wildcards allowed."
type = "string"
position = 2
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "dry_run"
label = "Dry run"
type = "boolean"
option = ["--dry-run"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "all_tables"
label = "All tables"
type = "boolean"
option = ["--all-tables"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "skip_tables"
label = "Skip tables"
description = "Comma-separated list."
type = "string"
option = ["--skip-tables"]
value_style = "equals"
sources = ["fig"]
[[commands.subcommand.field]]
id = "skip_columns"
label = "Skip columns"
description = "Comma-separated list."
type = "string"
option = ["--skip-columns"]
value_style = "equals"
sources = ["fig"]
[[commands.subcommand.field]]
id = "regex"
label = "Treat as regex"
type = "boolean"
option = ["--regex"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "precise"
label = "Use PHP for thorough replacement"
type = "boolean"
option = ["--precise"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "export"
label = "Export to SQL file instead"
type = "path"
option = ["--export"]
path = { kind = "file", role = "output" }
value_style = "equals"
effect = "overwrite"
sources = ["fig"]
[[commands.subcommand.field]]
id = "path"
label = "WordPress path"
type = "path"
option = ["--path"]
path = { kind = "directory", role = "input" }
value_style = "equals"
sources = ["fig"]
[[commands.subcommand.task]]
id = "dry"
label = "Preview replacement"
fields = ["old", "new", "table", "dry_run"]
required = ["old", "new"]
set = { dry_run = [true] }
[[commands.subcommand.task]]
id = "run"
label = "Run replacement"
fields = ["old", "new", "table"]
required = ["old", "new"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["old", "new", "table", "dry_run"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["all_tables", "skip_tables", "skip_columns", "regex", "precise", "export", "path"]