[GH-ISSUE #249] Add CLI support for Marketplace #81

Closed
opened 2026-02-26 21:33:13 +03:00 by kerem · 3 comments
Owner

Originally created by @rudrankriyam on GitHub (Jan 28, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/249

Overview

Add CLI support for Marketplace resources including search details and marketplace webhooks using the App Store Connect API. This enables full management of marketplace configuration and webhooks from the CLI with JSON-first output and explicit flags.

Scope

Primary resources from the OpenAPI spec:

  • marketplaceSearchDetails (GET instance, POST create, PATCH update, DELETE)
  • marketplaceWebhooks (GET list, POST create, PATCH update, DELETE)
  • App relationships: apps/{id}/marketplaceSearchDetail

Endpoints:

  • GET /v1/marketplaceSearchDetails/{id} (via app relationship)
  • POST /v1/marketplaceSearchDetails
  • PATCH /v1/marketplaceSearchDetails/{id}
  • DELETE /v1/marketplaceSearchDetails/{id}
  • GET /v1/marketplaceWebhooks
  • POST /v1/marketplaceWebhooks
  • PATCH /v1/marketplaceWebhooks/{id}
  • DELETE /v1/marketplaceWebhooks/{id}
  • GET /v1/apps/{id}/marketplaceSearchDetail

Proposed CLI

Top-level group:

  • asc marketplace <subcommand> [flags]

Subcommands (all support list/get/create/update/delete unless noted):

  • marketplace search-details (get/create/update/delete)
  • marketplace webhooks (list/get/create/update/delete)

Examples:

  • asc marketplace search-details get --app APP_ID
  • asc marketplace search-details create --app APP_ID --keywords "app,game,fun"
  • asc marketplace search-details update --search-detail-id DETAIL_ID --keywords "updated,keywords"
  • asc marketplace search-details delete --search-detail-id DETAIL_ID --confirm
  • asc marketplace webhooks list
  • asc marketplace webhooks get --webhook-id WEBHOOK_ID
  • asc marketplace webhooks create --url https://example.com/webhook --secret secret123 --events MARKETPLACE.SEARCH_UPDATED
  • asc marketplace webhooks update --webhook-id WEBHOOK_ID --enabled false
  • asc marketplace webhooks delete --webhook-id WEBHOOK_ID --confirm

Flag patterns

Common:

  • --app, --output, --pretty, --limit, --next, --paginate
  • --confirm for destructive operations

Resource-specific examples:

  • --search-detail-id, --keywords (comma-separated or space-separated)
  • --webhook-id, --url, --secret, --enabled
  • --events (comma-separated list of marketplace event types)

Output

  • JSON minified by default
  • --pretty for JSON
  • --output table/markdown for list commands

Acceptance criteria

  • Commands appear in asc --help and asc marketplace --help
  • CRUD works for marketplace search details
  • CRUD works for marketplace webhooks
  • App relationship works for search details
  • Pagination flags work (--paginate, --next, --limit)
  • Delete requires --confirm
  • JSON-first output matches existing conventions
  • Table and markdown output for list commands
  • Keywords handling works correctly (parsing, formatting)

Tests

  • Unit tests for command flag validation and error cases
  • HTTP client tests for list/get/create/update/delete
  • Output tests for table/markdown
  • App relationship tests for search details
  • Keywords parsing and formatting tests

Implementation notes

  • Add cmd/marketplace*.go and internal/asc/client_marketplace*.go
  • Add output helpers in internal/asc/output_marketplace.go
  • Register command in cmd/root.go
  • Add resource type constants in internal/asc/client_types.go
  • Follow patterns in cmd/apps.go, cmd/webhooks.go (once created), and output helpers in internal/asc/output_*
  • Note: Marketplace search details are typically accessed via app relationship, marketplace webhooks are global
Originally created by @rudrankriyam on GitHub (Jan 28, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/249 # Overview Add CLI support for Marketplace resources including search details and marketplace webhooks using the App Store Connect API. This enables full management of marketplace configuration and webhooks from the CLI with JSON-first output and explicit flags. # Scope Primary resources from the OpenAPI spec: - `marketplaceSearchDetails` (GET instance, POST create, PATCH update, DELETE) - `marketplaceWebhooks` (GET list, POST create, PATCH update, DELETE) - App relationships: `apps/{id}/marketplaceSearchDetail` Endpoints: - GET /v1/marketplaceSearchDetails/{id} (via app relationship) - POST /v1/marketplaceSearchDetails - PATCH /v1/marketplaceSearchDetails/{id} - DELETE /v1/marketplaceSearchDetails/{id} - GET /v1/marketplaceWebhooks - POST /v1/marketplaceWebhooks - PATCH /v1/marketplaceWebhooks/{id} - DELETE /v1/marketplaceWebhooks/{id} - GET /v1/apps/{id}/marketplaceSearchDetail # Proposed CLI Top-level group: - `asc marketplace <subcommand> [flags]` Subcommands (all support list/get/create/update/delete unless noted): - `marketplace search-details` (get/create/update/delete) - `marketplace webhooks` (list/get/create/update/delete) Examples: - `asc marketplace search-details get --app APP_ID` - `asc marketplace search-details create --app APP_ID --keywords "app,game,fun"` - `asc marketplace search-details update --search-detail-id DETAIL_ID --keywords "updated,keywords"` - `asc marketplace search-details delete --search-detail-id DETAIL_ID --confirm` - `asc marketplace webhooks list` - `asc marketplace webhooks get --webhook-id WEBHOOK_ID` - `asc marketplace webhooks create --url https://example.com/webhook --secret secret123 --events MARKETPLACE.SEARCH_UPDATED` - `asc marketplace webhooks update --webhook-id WEBHOOK_ID --enabled false` - `asc marketplace webhooks delete --webhook-id WEBHOOK_ID --confirm` # Flag patterns Common: - `--app`, `--output`, `--pretty`, `--limit`, `--next`, `--paginate` - `--confirm` for destructive operations Resource-specific examples: - `--search-detail-id`, `--keywords` (comma-separated or space-separated) - `--webhook-id`, `--url`, `--secret`, `--enabled` - `--events` (comma-separated list of marketplace event types) # Output - JSON minified by default - `--pretty` for JSON - `--output table/markdown` for list commands # Acceptance criteria - [ ] Commands appear in `asc --help` and `asc marketplace --help` - [ ] CRUD works for marketplace search details - [ ] CRUD works for marketplace webhooks - [ ] App relationship works for search details - [ ] Pagination flags work (`--paginate`, `--next`, `--limit`) - [ ] Delete requires `--confirm` - [ ] JSON-first output matches existing conventions - [ ] Table and markdown output for list commands - [ ] Keywords handling works correctly (parsing, formatting) # Tests - Unit tests for command flag validation and error cases - HTTP client tests for list/get/create/update/delete - Output tests for table/markdown - App relationship tests for search details - Keywords parsing and formatting tests # Implementation notes - Add `cmd/marketplace*.go` and `internal/asc/client_marketplace*.go` - Add output helpers in `internal/asc/output_marketplace.go` - Register command in `cmd/root.go` - Add resource type constants in `internal/asc/client_types.go` - Follow patterns in `cmd/apps.go`, `cmd/webhooks.go` (once created), and output helpers in `internal/asc/output_*` - Note: Marketplace search details are typically accessed via app relationship, marketplace webhooks are global
kerem closed this issue 2026-02-26 21:33:14 +03:00
Author
Owner

@rudrankriyam commented on GitHub (Jan 29, 2026):

@cursor Please implement #249 (Marketplace CLI) end-to-end.

Requirements:

  • Use OpenAPI in docs/openapi/latest.json and docs/openapi/paths.txt to drive endpoints.
  • Follow docs/GO_STANDARDS.md and existing CLI patterns.
  • Commands should live in internal/cli/marketplace (or a new marketplace domain), registered in internal/cli/registry/registry.go.
  • JSON-first output, explicit flags, --confirm for deletes.
  • Pagination flags (--limit, --next, --paginate) for list endpoints.
  • Add client types in internal/asc, output formatters, and tests:
    • HTTP client tests (mocked)
    • CLI flag validation tests
    • output table/markdown tests

Only open a PR after make build, make lint, and make test pass.

<!-- gh-comment-id:3820318520 --> @rudrankriyam commented on GitHub (Jan 29, 2026): @cursor Please implement #249 (Marketplace CLI) end-to-end. Requirements: - Use OpenAPI in docs/openapi/latest.json and docs/openapi/paths.txt to drive endpoints. - Follow docs/GO_STANDARDS.md and existing CLI patterns. - Commands should live in internal/cli/marketplace (or a new marketplace domain), registered in internal/cli/registry/registry.go. - JSON-first output, explicit flags, --confirm for deletes. - Pagination flags (--limit, --next, --paginate) for list endpoints. - Add client types in internal/asc, output formatters, and tests: - HTTP client tests (mocked) - CLI flag validation tests - output table/markdown tests Only open a PR after make build, make lint, and make test pass.
Author
Owner

@cursor[bot] commented on GitHub (Jan 29, 2026):

Summary:

  • I added --fields support to marketplace search-details get, wired it through the ASC client query builder, and added validation plus HTTP/CLI tests to cover the new fields handling.
  • I kept the marketplace search details/webhooks flags aligned to the OpenAPI snapshot (catalogUrl/endpointUrl/secret). The snapshot doesn’t define keywords/events, so I did not add those flags.

Tests:

  • make build
  • make lint
  • make test

Walkthrough artifact:

  • marketplace_search_details_get_help/recording_demo.mp4 — shows ./asc marketplace search-details get --help with the new --fields catalogUrl flag displayed.

View PR
Open in Cursor Open in Web

<!-- gh-comment-id:3820318780 --> @cursor[bot] commented on GitHub (Jan 29, 2026): Summary: - I added `--fields` support to `marketplace search-details get`, wired it through the ASC client query builder, and added validation plus HTTP/CLI tests to cover the new fields handling. - I kept the marketplace search details/webhooks flags aligned to the OpenAPI snapshot (catalogUrl/endpointUrl/secret). The snapshot doesn’t define keywords/events, so I did not add those flags. Tests: - `make build` - `make lint` - `make test` Walkthrough artifact: - `marketplace_search_details_get_help/recording_demo.mp4` — shows `./asc marketplace search-details get --help` with the new `--fields catalogUrl` flag displayed. <a href="https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/307"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/view-pr-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/view-pr-light.png"><img alt="View PR" width="86" height="28" src="https://cursor.com/assets/images/view-pr-light.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-04fa3513-8425-482c-9fb0-dabcf749ef15"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-04fa3513-8425-482c-9fb0-dabcf749ef15"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>
Author
Owner

@rudrankriyam commented on GitHub (Jan 29, 2026):

Marketplace CLI was already implemented; #307 added missing fields support for search-details.

<!-- gh-comment-id:3820459972 --> @rudrankriyam commented on GitHub (Jan 29, 2026): Marketplace CLI was already implemented; #307 added missing fields support for search-details.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#81
No description provided.