[GH-ISSUE #156] Add Custom Product Pages & Product Page Optimization CLI support #37

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

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

Overview

Add CLI support for Custom Product Pages and Product Page Optimization (experiments/treatments) using the App Store Connect API. This should enable full lifecycle management via JSON-first commands.

Scope (OpenAPI resources)

Custom Product Pages:

  • appCustomProductPages
  • appCustomProductPageVersions
  • appCustomProductPageLocalizations

Product Page Optimization:

  • appStoreVersionExperiments (v1/v2)
  • appStoreVersionExperimentTreatments
  • appStoreVersionExperimentTreatmentLocalizations

Proposed CLI

Top-level group:

  • asc product-pages <subcommand> [flags]

Subcommands:

  • product-pages custom-pages list|get|create|update|delete
  • product-pages custom-pages localizations list|get|create|update|delete
  • product-pages custom-pages versions list|get|create|update|delete (if API uses version resources)
  • product-pages experiments list|get|create|update|delete
  • product-pages experiments treatments list|get|create|update|delete
  • product-pages experiments treatments localizations list|get|create|update|delete

Examples:

  • asc product-pages custom-pages list --app APP_ID
  • asc product-pages custom-pages create --app APP_ID --name "Summer Campaign"
  • asc product-pages experiments create --version-id VERSION_ID --name "Icon Test"
  • asc product-pages experiments treatments create --experiment-id EXP_ID --name "Variant A"

Flag patterns

Common:

  • --app, --output, --pretty, --limit, --next, --paginate, --confirm

Resource-specific examples:

  • --custom-page-id, --custom-page-version-id, --localization-id
  • --experiment-id, --treatment-id
  • --name, --state, --traffic-proportion
  • --locale, --short-description, --long-description

Output

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

Acceptance criteria

  • Commands appear in asc product-pages --help
  • CRUD works for custom product pages and localizations
  • CRUD works for experiments and treatments
  • Pagination and --next validation works
  • Delete requires --confirm
  • JSON-first output and table/markdown output for lists

Tests

  • Command flag validation tests
  • HTTP client tests for list/get/create/update/delete
  • Output tests for table/markdown

Implementation notes

  • Add cmd/product_pages*.go and internal/asc/client_product_pages*.go
  • Add output helpers in internal/asc/output_product_pages.go
  • Register command in cmd/root.go
  • Add resource type constants in internal/asc/client_types.go
  • Follow patterns in cmd/versions.go, cmd/apps.go, internal/asc/output_*
Originally created by @rudrankriyam on GitHub (Jan 25, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/156 # Overview Add CLI support for Custom Product Pages and Product Page Optimization (experiments/treatments) using the App Store Connect API. This should enable full lifecycle management via JSON-first commands. # Scope (OpenAPI resources) Custom Product Pages: - `appCustomProductPages` - `appCustomProductPageVersions` - `appCustomProductPageLocalizations` Product Page Optimization: - `appStoreVersionExperiments` (v1/v2) - `appStoreVersionExperimentTreatments` - `appStoreVersionExperimentTreatmentLocalizations` # Proposed CLI Top-level group: - `asc product-pages <subcommand> [flags]` Subcommands: - `product-pages custom-pages list|get|create|update|delete` - `product-pages custom-pages localizations list|get|create|update|delete` - `product-pages custom-pages versions list|get|create|update|delete` (if API uses version resources) - `product-pages experiments list|get|create|update|delete` - `product-pages experiments treatments list|get|create|update|delete` - `product-pages experiments treatments localizations list|get|create|update|delete` Examples: - `asc product-pages custom-pages list --app APP_ID` - `asc product-pages custom-pages create --app APP_ID --name "Summer Campaign"` - `asc product-pages experiments create --version-id VERSION_ID --name "Icon Test"` - `asc product-pages experiments treatments create --experiment-id EXP_ID --name "Variant A"` # Flag patterns Common: - `--app`, `--output`, `--pretty`, `--limit`, `--next`, `--paginate`, `--confirm` Resource-specific examples: - `--custom-page-id`, `--custom-page-version-id`, `--localization-id` - `--experiment-id`, `--treatment-id` - `--name`, `--state`, `--traffic-proportion` - `--locale`, `--short-description`, `--long-description` # Output - JSON minified by default - `--pretty` for JSON - `--output table/markdown` for list commands # Acceptance criteria - [ ] Commands appear in `asc product-pages --help` - [ ] CRUD works for custom product pages and localizations - [ ] CRUD works for experiments and treatments - [ ] Pagination and `--next` validation works - [ ] Delete requires `--confirm` - [ ] JSON-first output and table/markdown output for lists # Tests - Command flag validation tests - HTTP client tests for list/get/create/update/delete - Output tests for table/markdown # Implementation notes - Add `cmd/product_pages*.go` and `internal/asc/client_product_pages*.go` - Add output helpers in `internal/asc/output_product_pages.go` - Register command in `cmd/root.go` - Add resource type constants in `internal/asc/client_types.go` - Follow patterns in `cmd/versions.go`, `cmd/apps.go`, `internal/asc/output_*`
kerem closed this issue 2026-02-26 21:32:56 +03:00
Author
Owner

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

@cursor Please implement this issue.

Guidance (same expectations as for me):

  • Follow docs/GO_STANDARDS.md and docs/TESTING.md.
  • Use docs/openapi/paths.txt + docs/openapi/latest.json for endpoints and schemas.
  • Keep CLI behavior consistent: explicit flags, JSON-first output, no interactive prompts, --confirm for destructive actions.
  • Implement asc product-pages group covering custom product pages + experiments/treatments/localizations per issue scope.
  • Add table/markdown output for list commands and wire output in internal/asc/output_* + output_core.go.
  • Add HTTP client tests for CRUD + CLI validation tests + output tests.
  • No live credentials are available. Do not run network tests; rely on mocks.
  • When done, run make build, make lint, make test, and create a PR.

Thanks!

<!-- gh-comment-id:3820976340 --> @rudrankriyam commented on GitHub (Jan 29, 2026): @cursor Please implement this issue. Guidance (same expectations as for me): - Follow `docs/GO_STANDARDS.md` and `docs/TESTING.md`. - Use `docs/openapi/paths.txt` + `docs/openapi/latest.json` for endpoints and schemas. - Keep CLI behavior consistent: explicit flags, JSON-first output, no interactive prompts, `--confirm` for destructive actions. - Implement `asc product-pages` group covering custom product pages + experiments/treatments/localizations per issue scope. - Add table/markdown output for list commands and wire output in `internal/asc/output_*` + `output_core.go`. - Add HTTP client tests for CRUD + CLI validation tests + output tests. - No live credentials are available. Do not run network tests; rely on mocks. - When done, run `make build`, `make lint`, `make test`, and create a PR. Thanks!
Author
Owner

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

Summary:

  • I added the asc product-pages command group with custom pages, versions, localizations, experiments (v1/v2 via --v2), treatments, and treatment localizations, plus full client support, pagination handling, and table/markdown output.
  • I added CLI validation tests, CRUD client tests, and output table/markdown tests for the new resources.

Tests:

  • make build
  • make lint
  • make test

Artifacts / notes:

  • Walkthrough video: product_pages_help/recording_demo.mp4 (shows ./asc product-pages --help with the new subcommands).
  • I did not add an update command for experiment treatment localizations because the OpenAPI snapshot has no PATCH endpoint for that resource.
  • I did not open a PR here since this environment manages PRs separately.

View PR
Open in Cursor Open in Web

<!-- gh-comment-id:3820976625 --> @cursor[bot] commented on GitHub (Jan 29, 2026): Summary: - I added the `asc product-pages` command group with custom pages, versions, localizations, experiments (v1/v2 via `--v2`), treatments, and treatment localizations, plus full client support, pagination handling, and table/markdown output. - I added CLI validation tests, CRUD client tests, and output table/markdown tests for the new resources. Tests: - `make build` - `make lint` - `make test` Artifacts / notes: - Walkthrough video: `product_pages_help/recording_demo.mp4` (shows `./asc product-pages --help` with the new subcommands). - I did **not** add an update command for experiment treatment localizations because the OpenAPI snapshot has no PATCH endpoint for that resource. - I did not open a PR here since this environment manages PRs separately. <a href="https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/310"><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-1b901048-c432-4b24-b75f-b70edbfbf4d8"><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-1b901048-c432-4b24-b75f-b70edbfbf4d8"><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 30, 2026):

Fixed by #310.

<!-- gh-comment-id:3822507079 --> @rudrankriyam commented on GitHub (Jan 30, 2026): Fixed by #310.
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#37
No description provided.