{"id":36266360,"url":"https://github.com/wp-cli/block-command","last_synced_at":"2026-04-01T18:33:14.045Z","repository":{"id":328215324,"uuid":"1113395273","full_name":"wp-cli/block-command","owner":"wp-cli","description":"Manages WordPress block editor blocks and related entities.","archived":false,"fork":false,"pushed_at":"2026-03-26T20:02:18.000Z","size":85,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-27T08:32:54.841Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"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/wp-cli.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-12-09T23:20:52.000Z","updated_at":"2026-03-26T20:02:22.000Z","dependencies_parsed_at":"2026-03-12T10:00:04.700Z","dependency_job_id":null,"html_url":"https://github.com/wp-cli/block-command","commit_stats":null,"previous_names":["wp-cli/block-command"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wp-cli/block-command","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fblock-command","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fblock-command/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fblock-command/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fblock-command/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wp-cli","download_url":"https://codeload.github.com/wp-cli/block-command/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fblock-command/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-11T08:04:09.010Z","updated_at":"2026-04-01T18:33:14.036Z","avatar_url":"https://github.com/wp-cli.png","language":"PHP","readme":"wp-cli/block-command\n====================\n\nManages block types, patterns, styles, bindings, and templates.\n\n[![Testing](https://github.com/wp-cli/block-command/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/block-command/actions/workflows/testing.yml) [![Code Coverage](https://codecov.io/gh/wp-cli/block-command/branch/main/graph/badge.svg)](https://codecov.io/gh/wp-cli/block-command/tree/main)\n\nQuick links: [Using](#using) | [Installing](#installing) | [Contributing](#contributing) | [Support](#support)\n\n## Using\n\nThis package implements the following commands:\n\n### wp block\n\nManages WordPress block editor blocks and related entities.\n\n~~~\nwp block\n~~~\n\n**EXAMPLES**\n\n    # List all registered block types\n    $ wp block type list\n\n    # Get a specific block pattern\n    $ wp block pattern get my-theme/hero\n\n    # List block styles for a specific block\n    $ wp block style list --block=core/button\n\n    # Export a block template\n    $ wp block template export twentytwentyfour//single --stdout\n\n    # Create a synced pattern\n    $ wp block synced-pattern create --title=\"My Pattern\" --content='\u003c!-- wp:paragraph --\u003e\u003cp\u003eHello\u003c/p\u003e\u003c!-- /wp:paragraph --\u003e'\n\n\n\n### wp block type\n\nRetrieves details on registered block types.\n\n~~~\nwp block type\n~~~\n\nGet information on WordPress' built-in and custom block types from the\nWP_Block_Type_Registry.\n\n**EXAMPLES**\n\n    # List all registered block types\n    $ wp block type list\n\n    # Get details about a specific block type\n    $ wp block type get core/paragraph --format=json\n\n    # List all core blocks\n    $ wp block type list --namespace=core\n\n\n\n### wp block type exists\n\nChecks whether a block type is registered.\n\n~~~\nwp block type exists \u003cname\u003e\n~~~\n\nExits with return code 0 if the block type exists, 1 if it does not.\n\n**OPTIONS**\n\n\t\u003cname\u003e\n\t\tThe block type name, including namespace.\n\n**EXAMPLES**\n\n    # Check if a block type exists.\n    $ wp block type exists core/paragraph\n    Success: Block type 'core/paragraph' is registered.\n\n    # Check for a non-existent block type.\n    $ wp block type exists core/nonexistent\n    $ echo $?\n    1\n\n\n\n### wp block type list\n\nLists registered block types.\n\n~~~\nwp block type list [--namespace=\u003cnamespace\u003e] [--dynamic] [--static] [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t[--namespace=\u003cnamespace\u003e]\n\t\tFilter by block namespace (e.g., 'core', 'my-plugin').\n\n\t[--dynamic]\n\t\tOnly show dynamic blocks (blocks with render_callback).\n\n\t[--static]\n\t\tOnly show static blocks (blocks without render_callback).\n\n\t[--field=\u003cfield\u003e]\n\t\tPrints the value of a single field for each block type.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific block type fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - count\n\t\t  - yaml\n\t\t  - ids\n\t\t---\n\n**AVAILABLE FIELDS**\n\nThese fields will be displayed by default for each block type:\n\n* name\n* title\n* description\n* category\n* is_dynamic\n\nThese fields are optionally available:\n\n* icon\n* keywords\n* parent\n* ancestor\n* supports\n* attributes\n* provides_context\n* uses_context\n* block_hooks\n* editor_script_handles\n* script_handles\n* view_script_handles\n* editor_style_handles\n* style_handles\n* view_style_handles\n* api_version\n\n**EXAMPLES**\n\n    # List all registered block types\n    $ wp block type list\n\n    # List all core blocks\n    $ wp block type list --namespace=core --fields=name,title,category\n\n    # List only dynamic blocks\n    $ wp block type list --dynamic --format=json\n\n    # Get count of registered block types\n    $ wp block type list --format=count\n\n\n\n### wp block type get\n\nGets details about a registered block type.\n\n~~~\nwp block type get \u003cname\u003e [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t\u003cname\u003e\n\t\tBlock type name (e.g., 'core/paragraph').\n\n\t[--field=\u003cfield\u003e]\n\t\tInstead of returning the whole block type, returns the value of a single field.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific fields. Defaults to all fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - yaml\n\t\t---\n\n**EXAMPLES**\n\n    # Get details about the paragraph block\n    $ wp block type get core/paragraph\n\n    # Get the supports field as JSON\n    $ wp block type get core/paragraph --field=supports --format=json\n\n    # Get specific fields\n    $ wp block type get core/image --fields=name,title,supports --format=json\n\n\n\n### wp block pattern\n\nRetrieves details on registered block patterns.\n\n~~~\nwp block pattern\n~~~\n\nGet information on WordPress' built-in and custom block patterns from the\nWP_Block_Patterns_Registry.\n\n**EXAMPLES**\n\n    # List all registered block patterns\n    $ wp block pattern list\n\n    # Get details about a specific pattern\n    $ wp block pattern get core/query-standard-posts --format=json\n\n    # List patterns in a specific category\n    $ wp block pattern list --category=featured\n\n\n\n### wp block pattern list\n\nLists registered block patterns.\n\n~~~\nwp block pattern list [--category=\u003ccategory\u003e] [--search=\u003csearch\u003e] [--inserter] [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t[--category=\u003ccategory\u003e]\n\t\tFilter by pattern category.\n\n\t[--search=\u003csearch\u003e]\n\t\tSearch patterns by title or keywords.\n\n\t[--inserter]\n\t\tOnly show patterns visible in the inserter.\n\n\t[--field=\u003cfield\u003e]\n\t\tPrints the value of a single field for each pattern.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific pattern fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - count\n\t\t  - yaml\n\t\t  - ids\n\t\t---\n\n**AVAILABLE FIELDS**\n\nThese fields will be displayed by default for each pattern:\n\n* name\n* title\n* description\n* categories\n\nThese fields are optionally available:\n\n* content\n* keywords\n* blockTypes\n* postTypes\n* templateTypes\n* inserter\n* viewportWidth\n\n**EXAMPLES**\n\n    # List all registered patterns\n    $ wp block pattern list\n\n    # List patterns in the 'buttons' category\n    $ wp block pattern list --category=buttons\n\n    # Search for hero patterns\n    $ wp block pattern list --search=hero\n\n    # Export all patterns to JSON\n    $ wp block pattern list --format=json \u003e patterns.json\n\n\n\n### wp block pattern get\n\nGets details about a registered block pattern.\n\n~~~\nwp block pattern get \u003cname\u003e [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t\u003cname\u003e\n\t\tPattern name including namespace (e.g., 'core/query-standard-posts').\n\n\t[--field=\u003cfield\u003e]\n\t\tInstead of returning the whole pattern, returns the value of a single field.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific fields. Defaults to all fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - yaml\n\t\t---\n\n**EXAMPLES**\n\n    # Get a pattern's content\n    $ wp block pattern get core/query-standard-posts --field=content\n\n    # Get full pattern details as JSON\n    $ wp block pattern get my-theme/hero --format=json\n\n\n\n### wp block pattern-category\n\nRetrieves details on registered block pattern categories.\n\n~~~\nwp block pattern-category\n~~~\n\nGet information on block pattern categories from the\nWP_Block_Pattern_Categories_Registry.\n\n**EXAMPLES**\n\n    # List all registered pattern categories\n    $ wp block pattern-category list\n\n    # Get details about a specific category\n    $ wp block pattern-category get featured --format=json\n\n\n\n### wp block pattern-category list\n\nLists registered block pattern categories.\n\n~~~\nwp block pattern-category list [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t[--field=\u003cfield\u003e]\n\t\tPrints the value of a single field for each category.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific category fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - count\n\t\t  - yaml\n\t\t  - ids\n\t\t---\n\n**AVAILABLE FIELDS**\n\nThese fields will be displayed by default for each category:\n\n* name\n* label\n* description\n\n**EXAMPLES**\n\n    # List all pattern categories\n    $ wp block pattern-category list\n\n    # Get category names only\n    $ wp block pattern-category list --field=name\n\n    # Export categories to JSON\n    $ wp block pattern-category list --format=json\n\n\n\n### wp block pattern-category get\n\nGets details about a registered block pattern category.\n\n~~~\nwp block pattern-category get \u003cname\u003e [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t\u003cname\u003e\n\t\tCategory name (e.g., 'buttons', 'columns').\n\n\t[--field=\u003cfield\u003e]\n\t\tInstead of returning the whole category, returns the value of a single field.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific fields. Defaults to all fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - yaml\n\t\t---\n\n**EXAMPLES**\n\n    # Get details about the 'buttons' category\n    $ wp block pattern-category get buttons\n\n    # Get as JSON\n    $ wp block pattern-category get featured --format=json\n\n\n\n### wp block style\n\nRetrieves details on registered block styles.\n\n~~~\nwp block style\n~~~\n\nGet information on block style variations from the WP_Block_Styles_Registry.\n\n**EXAMPLES**\n\n    # List all registered block styles\n    $ wp block style list\n\n    # List styles for a specific block\n    $ wp block style list --block=core/button\n\n    # Get details about a specific style\n    $ wp block style get core/button outline\n\n\n\n### wp block style list\n\nLists registered block styles.\n\n~~~\nwp block style list [--block=\u003cblock\u003e] [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t[--block=\u003cblock\u003e]\n\t\tFilter by block type name (e.g., 'core/button').\n\n\t[--field=\u003cfield\u003e]\n\t\tPrints the value of a single field for each style.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific style fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - count\n\t\t  - yaml\n\t\t---\n\n**AVAILABLE FIELDS**\n\nThese fields will be displayed by default for each style:\n\n* block_name\n* name\n* label\n* is_default\n\nThese fields are optionally available:\n\n* style_handle\n* inline_style\n\n**EXAMPLES**\n\n    # List all block styles\n    $ wp block style list\n\n    # List styles for the button block\n    $ wp block style list --block=core/button\n\n    # List all styles as JSON\n    $ wp block style list --format=json\n\n\n\n### wp block style get\n\nGets details about a registered block style.\n\n~~~\nwp block style get \u003cblock\u003e \u003cstyle\u003e [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t\u003cblock\u003e\n\t\tBlock type name (e.g., 'core/button').\n\n\t\u003cstyle\u003e\n\t\tStyle name (e.g., 'outline').\n\n\t[--field=\u003cfield\u003e]\n\t\tInstead of returning the whole style, returns the value of a single field.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific fields. Defaults to all fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - yaml\n\t\t---\n\n**EXAMPLES**\n\n    # Get the outline style for buttons\n    $ wp block style get core/button outline\n\n    # Get as JSON\n    $ wp block style get core/button outline --format=json\n\n\n\n### wp block binding\n\nRetrieves details on registered block binding sources.\n\n~~~\nwp block binding\n~~~\n\nGet information on block binding sources from the WP_Block_Bindings_Registry.\nBlock bindings allow dynamic data to be connected to block attributes.\n\n**EXAMPLES**\n\n    # List all registered binding sources\n    $ wp block binding list\n\n    # Get details about the post-meta binding\n    $ wp block binding get core/post-meta --format=json\n\n\n\n### wp block binding list\n\nLists registered block binding sources.\n\n~~~\nwp block binding list [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t[--field=\u003cfield\u003e]\n\t\tPrints the value of a single field for each source.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific source fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - count\n\t\t  - yaml\n\t\t  - ids\n\t\t---\n\n**AVAILABLE FIELDS**\n\nThese fields will be displayed by default for each source:\n\n* name\n* label\n\nThese fields are optionally available:\n\n* uses_context\n\n**EXAMPLES**\n\n    # List all binding sources\n    $ wp block binding list\n\n    # Get source names only\n    $ wp block binding list --field=name\n\n    # Export sources to JSON\n    $ wp block binding list --format=json\n\n\n\n### wp block binding get\n\nGets details about a registered block binding source.\n\n~~~\nwp block binding get \u003cname\u003e [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t\u003cname\u003e\n\t\tBinding source name (e.g., 'core/post-meta').\n\n\t[--field=\u003cfield\u003e]\n\t\tInstead of returning the whole source, returns the value of a single field.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific fields. Defaults to all fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - yaml\n\t\t---\n\n**EXAMPLES**\n\n    # Get details about the post-meta binding\n    $ wp block binding get core/post-meta\n\n    # Get as JSON\n    $ wp block binding get core/post-meta --format=json\n\n\n\n### wp block template\n\nRetrieves details on block templates and template parts.\n\n~~~\nwp block template\n~~~\n\nGet information on block templates used in Full Site Editing (FSE) themes.\n\n**EXAMPLES**\n\n    # List all templates\n    $ wp block template list\n\n    # List template parts for the header area\n    $ wp block template list --type=wp_template_part --area=header\n\n    # Get a specific template\n    $ wp block template get twentytwentyfour//single\n\n\n\n### wp block template list\n\nLists block templates or template parts.\n\n~~~\nwp block template list [--type=\u003ctype\u003e] [--slug=\u003cslug\u003e] [--area=\u003carea\u003e] [--post-type=\u003cpost-type\u003e] [--source=\u003csource\u003e] [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t[--type=\u003ctype\u003e]\n\t\tTemplate type.\n\t\t---\n\t\tdefault: wp_template\n\t\toptions:\n\t\t  - wp_template\n\t\t  - wp_template_part\n\t\t---\n\n\t[--slug=\u003cslug\u003e]\n\t\tFilter by template slug(s). Accepts a single slug or comma-separated list.\n\n\t[--area=\u003carea\u003e]\n\t\tFor template parts, filter by area (header, footer, sidebar, uncategorized).\n\n\t[--post-type=\u003cpost-type\u003e]\n\t\tFilter templates by post type they apply to.\n\n\t[--source=\u003csource\u003e]\n\t\tFilter by source (theme, plugin, custom).\n\n\t[--field=\u003cfield\u003e]\n\t\tPrints the value of a single field for each template.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific template fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - count\n\t\t  - yaml\n\t\t  - ids\n\t\t---\n\n**AVAILABLE FIELDS**\n\nThese fields will be displayed by default for each template:\n\n* id\n* slug\n* title\n* source\n* type\n\nThese fields are optionally available:\n\n* theme\n* description\n* status\n* origin\n* is_custom\n* has_theme_file\n* author\n* area (template parts only)\n* content\n\n**EXAMPLES**\n\n    # List all templates\n    $ wp block template list\n\n    # List template parts for the header area\n    $ wp block template list --type=wp_template_part --area=header\n\n    # List templates from the theme\n    $ wp block template list --source=theme\n\n    # List specific templates by slug\n    $ wp block template list --slug=single,archive\n\n    # List templates for a specific post type\n    $ wp block template list --post-type=page\n\n    # Export templates as JSON\n    $ wp block template list --format=json\n\n\n\n### wp block template get\n\nGets details about a block template.\n\n~~~\nwp block template get \u003cid\u003e [--type=\u003ctype\u003e] [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t\u003cid\u003e\n\t\tTemplate ID in format 'theme//slug' (e.g., 'twentytwentyfour//single').\n\n\t[--type=\u003ctype\u003e]\n\t\tTemplate type.\n\t\t---\n\t\tdefault: wp_template\n\t\toptions:\n\t\t  - wp_template\n\t\t  - wp_template_part\n\t\t---\n\n\t[--field=\u003cfield\u003e]\n\t\tInstead of returning the whole template, returns the value of a single field.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific fields. Defaults to all fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - yaml\n\t\t---\n\n**EXAMPLES**\n\n    # Get the single post template\n    $ wp block template get twentytwentyfour//single\n\n    # Get template content only\n    $ wp block template get twentytwentyfour//single --field=content\n\n    # Get as JSON\n    $ wp block template get twentytwentyfour//single --format=json\n\n\n\n### wp block template export\n\nExports a block template to a file.\n\n~~~\nwp block template export \u003cid\u003e [--type=\u003ctype\u003e] [--file=\u003cfile\u003e] [--dir=\u003cdirectory\u003e] [--stdout]\n~~~\n\n**OPTIONS**\n\n\t\u003cid\u003e\n\t\tTemplate ID to export.\n\n\t[--type=\u003ctype\u003e]\n\t\tTemplate type.\n\t\t---\n\t\tdefault: wp_template\n\t\toptions:\n\t\t  - wp_template\n\t\t  - wp_template_part\n\t\t---\n\n\t[--file=\u003cfile\u003e]\n\t\tFile path to export to. Parent directories will be created if needed.\n\n\t[--dir=\u003cdirectory\u003e]\n\t\tDirectory to export to. Defaults to current directory. Creates directory if needed.\n\n\t[--stdout]\n\t\tOutput to stdout instead of file.\n\n**EXAMPLES**\n\n    # Export template to file\n    $ wp block template export twentytwentyfour//single\n\n    # Export to stdout\n    $ wp block template export twentytwentyfour//single --stdout\n\n    # Export to specific directory\n    $ wp block template export twentytwentyfour//single --dir=./templates/\n\n    # Export to specific file path\n    $ wp block template export twentytwentyfour//single --file=exports/templates/single.html\n\n\n\n### wp block synced-pattern\n\nManages synced patterns (reusable blocks).\n\n~~~\nwp block synced-pattern\n~~~\n\nSynced patterns are stored as the 'wp_block' post type and can be either\nsynced (changes reflect everywhere) or not synced (regular patterns).\n\n**EXAMPLES**\n\n    # List all synced patterns\n    $ wp block synced-pattern list\n\n    # Create a synced pattern\n    $ wp block synced-pattern create --title=\"My Pattern\" --content='\u003c!-- wp:paragraph --\u003e\u003cp\u003eHello\u003c/p\u003e\u003c!-- /wp:paragraph --\u003e'\n\n    # Delete a synced pattern\n    $ wp block synced-pattern delete 123\n\n\n\n### wp block synced-pattern list\n\nLists synced patterns.\n\n~~~\nwp block synced-pattern list [--sync-status=\u003cstatus\u003e] [--search=\u003csearch\u003e] [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t[--sync-status=\u003cstatus\u003e]\n\t\tFilter by sync status.\n\t\t---\n\t\tdefault: all\n\t\toptions:\n\t\t  - synced\n\t\t  - unsynced\n\t\t  - all\n\t\t---\n\n\t[--search=\u003csearch\u003e]\n\t\tSearch by title.\n\n\t[--field=\u003cfield\u003e]\n\t\tPrints the value of a single field for each pattern.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - count\n\t\t  - yaml\n\t\t  - ids\n\t\t---\n\n**AVAILABLE FIELDS**\n\nThese fields will be displayed by default for each pattern:\n\n* ID\n* post_title\n* post_name\n* sync_status\n* post_date\n\nThese fields are optionally available:\n\n* post_content\n* post_status\n* post_author\n\n**EXAMPLES**\n\n    # List all synced patterns\n    $ wp block synced-pattern list --sync-status=synced\n\n    # Search for patterns by title\n    $ wp block synced-pattern list --search=hero\n\n    # Export all synced patterns to JSON\n    $ wp block synced-pattern list --format=json \u003e synced-patterns.json\n\n\n\n### wp block synced-pattern get\n\nGets details about a synced pattern.\n\n~~~\nwp block synced-pattern get \u003cid\u003e [--field=\u003cfield\u003e] [--fields=\u003cfields\u003e] [--format=\u003cformat\u003e]\n~~~\n\n**OPTIONS**\n\n\t\u003cid\u003e\n\t\tThe synced pattern ID.\n\n\t[--field=\u003cfield\u003e]\n\t\tInstead of returning the whole pattern, returns the value of a single field.\n\n\t[--fields=\u003cfields\u003e]\n\t\tLimit the output to specific fields. Defaults to all fields.\n\n\t[--format=\u003cformat\u003e]\n\t\tRender output in a particular format.\n\t\t---\n\t\tdefault: table\n\t\toptions:\n\t\t  - table\n\t\t  - csv\n\t\t  - json\n\t\t  - yaml\n\t\t---\n\n**EXAMPLES**\n\n    # Get a synced pattern\n    $ wp block synced-pattern get 123\n\n    # Get pattern content only\n    $ wp block synced-pattern get 123 --field=post_content\n\n\n\n### wp block synced-pattern create\n\nCreates a synced pattern.\n\n~~~\nwp block synced-pattern create [--title=\u003ctitle\u003e] [--slug=\u003cslug\u003e] [--content=\u003ccontent\u003e] [--sync-status=\u003cstatus\u003e] [--status=\u003cstatus\u003e] [\u003cfile\u003e] [--porcelain]\n~~~\n\n**OPTIONS**\n\n\t[--title=\u003ctitle\u003e]\n\t\tThe pattern title.\n\n\t[--slug=\u003cslug\u003e]\n\t\tThe pattern slug. Default: sanitized title.\n\n\t[--content=\u003ccontent\u003e]\n\t\tThe block content.\n\n\t[--sync-status=\u003cstatus\u003e]\n\t\tSync status.\n\t\t---\n\t\tdefault: synced\n\t\toptions:\n\t\t  - synced\n\t\t  - unsynced\n\t\t---\n\n\t[--status=\u003cstatus\u003e]\n\t\tPost status.\n\t\t---\n\t\tdefault: publish\n\t\t---\n\n\t[\u003cfile\u003e]\n\t\tRead content from file. Pass '-' for STDIN.\n\n\t[--porcelain]\n\t\tOutput only the new pattern ID.\n\n**EXAMPLES**\n\n    # Create a synced pattern from content\n    $ wp block synced-pattern create --title=\"My Hero\" --content='\u003c!-- wp:paragraph --\u003e\u003cp\u003eHello\u003c/p\u003e\u003c!-- /wp:paragraph --\u003e'\n\n    # Create from file\n    $ wp block synced-pattern create --title=\"Header\" header.html\n\n    # Create an unsynced pattern\n    $ wp block synced-pattern create --title=\"Footer\" --sync-status=unsynced footer.html\n\n    # Create from STDIN\n    $ cat content.html | wp block synced-pattern create --title=\"From STDIN\" -\n\n\n\n### wp block synced-pattern update\n\nUpdates a synced pattern.\n\n~~~\nwp block synced-pattern update \u003cid\u003e [--title=\u003ctitle\u003e] [--content=\u003ccontent\u003e] [--sync-status=\u003cstatus\u003e] [\u003cfile\u003e]\n~~~\n\n**OPTIONS**\n\n\t\u003cid\u003e\n\t\tThe synced pattern ID.\n\n\t[--title=\u003ctitle\u003e]\n\t\tThe pattern title.\n\n\t[--content=\u003ccontent\u003e]\n\t\tThe block content.\n\n\t[--sync-status=\u003cstatus\u003e]\n\t\tSync status.\n\t\t---\n\t\toptions:\n\t\t  - synced\n\t\t  - unsynced\n\t\t---\n\n\t[\u003cfile\u003e]\n\t\tRead content from file. Pass '-' for STDIN.\n\n**EXAMPLES**\n\n    # Update pattern title\n    $ wp block synced-pattern update 123 --title=\"Updated Hero\"\n\n    # Update content from file\n    $ wp block synced-pattern update 123 updated-content.html\n\n    # Change sync status\n    $ wp block synced-pattern update 123 --sync-status=unsynced\n\n\n\n### wp block synced-pattern delete\n\nDeletes one or more synced patterns.\n\n~~~\nwp block synced-pattern delete \u003cid\u003e... [--force]\n~~~\n\n**OPTIONS**\n\n\t\u003cid\u003e...\n\t\tOne or more synced pattern IDs.\n\n\t[--force]\n\t\tSkip trash and permanently delete.\n\n**EXAMPLES**\n\n    # Delete a synced pattern (to trash)\n    $ wp block synced-pattern delete 123\n\n    # Permanently delete\n    $ wp block synced-pattern delete 123 --force\n\n    # Delete multiple\n    $ wp block synced-pattern delete 123 456 789\n\n## Installing\n\nThis package is included with WP-CLI itself, no additional installation necessary.\n\nTo install the latest version of this package over what's included in WP-CLI, run:\n\n    wp package install git@github.com:wp-cli/block-command.git\n\n## Contributing\n\nWe appreciate you taking the initiative to contribute to this project.\n\nContributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.\n\nFor a more thorough introduction, [check out WP-CLI's guide to contributing](https://make.wordpress.org/cli/handbook/contributing/). This package follows those policy and guidelines.\n\n### Reporting a bug\n\nThink you’ve found a bug? We’d love for you to help us get it fixed.\n\nBefore you create a new issue, you should [search existing issues](https://github.com/wp-cli/block-command/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.\n\nOnce you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/wp-cli/block-command/issues/new). Include as much detail as you can, and clear steps to reproduce if possible. For more guidance, [review our bug report documentation](https://make.wordpress.org/cli/handbook/bug-reports/).\n\n### Creating a pull request\n\nWant to contribute a new feature? Please first [open a new issue](https://github.com/wp-cli/block-command/issues/new) to discuss whether the feature is a good fit for the project.\n\nOnce you've decided to commit the time to seeing your pull request through, [please follow our guidelines for creating a pull request](https://make.wordpress.org/cli/handbook/pull-requests/) to make sure it's a pleasant experience. See \"[Setting up](https://make.wordpress.org/cli/handbook/pull-requests/#setting-up)\" for details specific to working on this package locally.\n\n### License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Support\n\nGitHub issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support\n\n\n*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-cli%2Fblock-command","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwp-cli%2Fblock-command","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-cli%2Fblock-command/lists"}