Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 8, 2025

Users are confused by synopsis syntax conventions like --dbname=<dbname> (required), [--dbhost=<dbhost>] (optional with value), and [--force] (boolean flag). See wp-cli/config-command#120.

Changes

  • New reference page (references/argument-syntax.md) - Comprehensive guide explaining:

    • Required vs optional arguments (<arg> vs [<arg>])
    • Value arguments vs boolean flags
    • Flag negation with --no- prefix
    • Associative, repeatable, and variadic argument patterns
    • Practical examples using real WP-CLI commands
  • Command generation (bin/command.php) - Auto-inject link after OPTIONS heading:

    ### OPTIONS
    
    See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used.
    
    --dbname=<dbname>
    : Set the database name.
  • Navigation - Added "Argument Syntax" to references section in index.md, references.md, and handbook manifest

When command pages are regenerated, all will include the link to the syntax reference.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/Behat/Behat/zipball/1b6b08efa995fe4135901b862d112adc7e95ecbb
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/Behat/Gherkin/zipball/05a7459283e8e6af0d46ec25b8bb5960ca3cfa7b
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/8e89a01c7b8fed84a12a2a7f5a23a44cdbe4f62e
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/8b8e17615d04f2fc2cd46fc1d2fd888fa21b3cf9
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/d2421de7cec3274ae622c22c744de9a62c7925af
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/1a6aecc9ebe4a9cea4e1047d0e6c496e52314c27
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/7adfefd530aa2d7570ba87100a99e2483a543b88
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/php-parallel-lint/PHP-Console-Highlighter/zipball/5b4803384d3303cf8e84141039ef56c8a123138d
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e24fb46da450d8e6a5788670513c1af1424f16ca
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/console/zipball/c28ad91448f86c5f6d9d2c70f0cf68bf135f252a
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/dependency-injection/zipball/98af8bb46c56aedd9dd5a7f0414fc72bf2dcfe69
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/event-dispatcher/zipball/b7dc69e71de420ac04bc9ab830cf3ffebba48191
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/finder/zipball/9f696d2f1e340484b4683f7853b273abff94421f
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/translation-contracts/zipball/65a8bc82080447fae78373aa10f8d13b38338977
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/translation/zipball/ec25870502d0c7072d086e8ffba1420c85965174
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/var-exporter/zipball/0f020b544a30a7fe8ba972e53ee48a74c0bc87f4
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/yaml/zipball/90208e2fc6f68f613eae7ca25a2458a931b1bacc
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/wp-cli/eval-command/zipball/20ec428a7b9bc604fab0bd33ee8fa20662650455
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/wp-cli/mustache.php/zipball/ca23b97ac35fbe01c160549eb634396183d04a59
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/wp-cli/php-cli-tools/zipball/f12b650d3738e471baed6dd47982d53c5c0ab1c3
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/wp-cli/spyc/zipball/6aa0b4da69ce9e9a2c8402dab8d43cf32c581cc7
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/wp-cli/wp-cli-tests/zipball/f81af5773bd40962fb973e238acd26b39b1b7341
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/wp-cli/wp-cli/zipball/03d30d4138d12b4bffd8b507b82e56e129e0523f
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/axjNzr /usr/bin/composer install --no-interaction (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add synopsis explanation to command reference</issue_title>
<issue_description>The handbook should contain a detailed explanation of what the different styles of syntax mean as they are used by the command synopsis, and the individual pages of the command reference should then contain a link to this explanation.

This could avoid misunderstandings like wp-cli/config-command#120.</issue_description>

<agent_instructions>Examples of different types of arguments:

  • --dbname=<dbname>: required argument; pass a value
  • [--dbhost=<dbhost>]: square brackets means it's an optional argument; pass a value; there may be a default value.
  • [--force]: optional argument; boolean flag. Can be "reversed" with --no-force</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add synopsis explanation to command reference Add argument syntax reference to command documentation Nov 8, 2025
Copilot AI requested a review from swissspidy November 8, 2025 10:55
Copilot finished work on behalf of swissspidy November 8, 2025 10:55
@swissspidy swissspidy requested a review from Copilot November 8, 2025 14:22

This comment was marked as resolved.

@swissspidy swissspidy marked this pull request as ready for review November 9, 2025 11:27
@swissspidy swissspidy requested a review from a team as a code owner November 9, 2025 11:27
@ernilambar ernilambar merged commit d888f75 into main Nov 9, 2025
12 of 18 checks passed
@ernilambar ernilambar deleted the copilot/add-command-syntax-explanation branch November 9, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add synopsis explanation to command reference

3 participants