From 356590b7e9fa1b77f620c1ee069f54bbf9acd8da Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 19 Aug 2026 12:12:17 +0000 Subject: [PATCH] Use "uninstalled" instead of "not installed" for connector status Multi-word `--status` filter values force users to quote the argument (`--status="not installed"`) and break WP-CLI conventions, where flag choices are single tokens. `wp language plugin list` already uses `installed`/`uninstalled`, so follow that precedent. The status value itself is renamed, keeping the filter and the rendered output consistent. Fixes https://github.com/wp-cli/ai-command/issues/26 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_018gv3vaaHBM91Kv9ijuueSV --- README.md | 16 ++++++++-------- features/connectors.feature | 8 ++++---- src/Connectors_Command.php | 20 ++++++++++---------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 2df28c8..814810b 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,7 @@ wp connectors list [--status=] [--fields=] [--format=] - connected - active - installed - - not installed + - uninstalled --- [--fields=] @@ -324,13 +324,13 @@ wp connectors list [--status=] [--fields=] [--format=] # List all connectors $ wp connectors list - +-----------+-----------+-----------------------------------------------+---------------+ - | id | name | description | status | - +-----------+-----------+-----------------------------------------------+---------------+ - | anthropic | Anthropic | Text generation with Claude. | not installed | - | google | Google | Text and image generation with Gemini... | not installed | - | openai | OpenAI | Text and image generation with GPT and Dall-E | connected | - +-----------+-----------+-----------------------------------------------+---------------+ + +-----------+-----------+-----------------------------------------------+-------------+ + | id | name | description | status | + +-----------+-----------+-----------------------------------------------+-------------+ + | anthropic | Anthropic | Text generation with Claude. | uninstalled | + | google | Google | Text and image generation with Gemini... | uninstalled | + | openai | OpenAI | Text and image generation with GPT and Dall-E | connected | + +-----------+-----------+-----------------------------------------------+-------------+ # List only connected connectors $ wp connectors list --status=connected diff --git a/features/connectors.feature b/features/connectors.feature index e65f985..a38b8b0 100644 --- a/features/connectors.feature +++ b/features/connectors.feature @@ -41,7 +41,7 @@ Feature: List and get AI connectors """ @require-wp-7.0 - Scenario: List connectors shows not-installed status when plugins are absent + Scenario: List connectors shows uninstalled status when plugins are absent When I run `wp connectors list --format=json` Then STDOUT should contain: """ @@ -49,7 +49,7 @@ Feature: List and get AI connectors """ And STDOUT should contain: """ - "status":"not installed" + "status":"uninstalled" """ @require-wp-7.0 @@ -62,7 +62,7 @@ Feature: List and get AI connectors @require-wp-7.0 Scenario: List connectors supports --status filter - When I run `wp connectors list --status="not installed" --format=json` + When I run `wp connectors list --status=uninstalled --format=json` Then STDOUT should contain: """ "name":"OpenAI" @@ -85,7 +85,7 @@ Feature: List and get AI connectors When I run `wp connectors get openai --format=json` Then STDOUT should be JSON containing: """ - {"id":"openai","name":"OpenAI","description":"Text and image generation with GPT and Dall-E.","status":"not installed","credentials_url":"https://platform.openai.com/api-keys","api_key":""} + {"id":"openai","name":"OpenAI","description":"Text and image generation with GPT and Dall-E.","status":"uninstalled","credentials_url":"https://platform.openai.com/api-keys","api_key":""} """ # TODO: Depends on https://core.trac.wordpress.org/ticket/64819. diff --git a/src/Connectors_Command.php b/src/Connectors_Command.php index 4889626..e87ebf4 100644 --- a/src/Connectors_Command.php +++ b/src/Connectors_Command.php @@ -41,7 +41,7 @@ class Connectors_Command extends WP_CLI_Command { * - connected * - active * - installed - * - not installed + * - uninstalled * --- * * [--fields=] @@ -62,13 +62,13 @@ class Connectors_Command extends WP_CLI_Command { * * # List all connectors * $ wp connectors list - * +-----------+-----------+-----------------------------------------------+---------------+ - * | id | name | description | status | - * +-----------+-----------+-----------------------------------------------+---------------+ - * | anthropic | Anthropic | Text generation with Claude. | not installed | - * | google | Google | Text and image generation with Gemini... | not installed | - * | openai | OpenAI | Text and image generation with GPT and Dall-E | connected | - * +-----------+-----------+-----------------------------------------------+---------------+ + * +-----------+-----------+-----------------------------------------------+-------------+ + * | id | name | description | status | + * +-----------+-----------+-----------------------------------------------+-------------+ + * | anthropic | Anthropic | Text generation with Claude. | uninstalled | + * | google | Google | Text and image generation with Gemini... | uninstalled | + * | openai | OpenAI | Text and image generation with GPT and Dall-E | connected | + * +-----------+-----------+-----------------------------------------------+-------------+ * * # List only connected connectors * $ wp connectors list --status=connected @@ -214,7 +214,7 @@ private function build_connector_item( string $connector_id, array $connector ): /** * Returns the status of a connector. * - * Possible values: 'connected', 'active', 'installed', 'not installed'. + * Possible values: 'connected', 'active', 'installed', 'uninstalled'. * * @param string $connector_id The connector ID. * @param mixed[] $connector Connector settings from wp_get_connectors(). @@ -245,7 +245,7 @@ private function get_connector_status( string $connector_id, array $connector ): return 'installed'; } - return 'not installed'; + return 'uninstalled'; } /**