[GH-ISSUE #44] Add TestFlight apps list/read commands #6

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

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

Summary

Add a TestFlight namespace for apps while reusing the Apps API: asc testflight apps list and asc testflight apps get.

API endpoints

Query support

  • filter[bundleId], filter[name], filter[sku]
  • sort (name, -name, bundleId, -bundleId)
  • limit, links.next, --paginate

CLI

  • asc testflight apps list [--bundle-id ...] [--name ...] [--sku ...] [--sort ...] [--limit ...] [--next ...] [--paginate]
  • asc testflight apps get --app "APP_ID"

Output

  • JSON minified default; --output table|markdown; --pretty for JSON.

Tests

  • internal/asc client query tests
  • cmd/commands_test.go for flag parsing + output
Originally created by @rudrankriyam on GitHub (Jan 23, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/44 ## Summary Add a TestFlight namespace for apps while reusing the Apps API: `asc testflight apps list` and `asc testflight apps get`. ## API endpoints - `GET /v1/apps` (list) — https://developer.apple.com/documentation/appstoreconnectapi/list_apps - `GET /v1/apps/{id}` (read) — https://developer.apple.com/documentation/appstoreconnectapi/read_app_information ## Query support - `filter[bundleId]`, `filter[name]`, `filter[sku]` - `sort` (name, -name, bundleId, -bundleId) - `limit`, `links.next`, `--paginate` ## CLI - `asc testflight apps list [--bundle-id ...] [--name ...] [--sku ...] [--sort ...] [--limit ...] [--next ...] [--paginate]` - `asc testflight apps get --app "APP_ID"` ## Output - JSON minified default; `--output table|markdown`; `--pretty` for JSON. ## Tests - `internal/asc` client query tests - `cmd/commands_test.go` for flag parsing + output
kerem closed this issue 2026-02-26 21:32:43 +03:00
Author
Owner

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

@cursor Please implement this issue.

Implementation Guide

1. Create cmd/testflight.go

Create a new testflight command group that wraps existing apps functionality under a TestFlight namespace:

// TestFlightCommand returns the testflight command with subcommands.
func TestFlightCommand() *ffcli.Command {
    // Add "apps" as a subcommand with list and get
}

// TestFlightAppsListCommand - reuse existing apps logic
// TestFlightAppsGetCommand - add new get by ID

2. Add Client Method in internal/asc/client.go

Add GetApp(ctx, appID) method:

func (c *Client) GetApp(ctx context.Context, appID string) (*AppResponse, error) {
    // GET /v1/apps/{id}
}

3. Register Command

In cmd/commands.go, add TestFlightCommand() to RootCommand.Subcommands.

4. Flags Required

For list:

  • --bundle-id (filter)
  • --name (filter)
  • --sku (filter)
  • --sort (name, -name, bundleId, -bundleId)
  • --limit, --next, --paginate
  • --output, --pretty

For get:

  • --app (required, the app ID)
  • --output, --pretty

5. Testing

Unit tests in cmd/commands_test.go:

{"testflight apps list missing app", []string{"testflight", "apps", "list"}, ...}
{"testflight apps get missing id", []string{"testflight", "apps", "get"}, ...}

Live API test (use FoundationLab app ID 6747745091):

./asc testflight apps list --limit 1
./asc testflight apps get --app 6747745091
./asc testflight apps list --output table

6. Code Standards (from Agents.md)

  • Use strings.TrimSpace() on all ID inputs
  • Use ffcli pattern from existing commands (see BetaGroupsCommand)
  • Output JSON minified by default
  • Always validate required flags before creating client
  • Use contextWithTimeout(ctx) for API calls
  • Run make format && make lint && make test before committing

7. PR Guidelines

  • Branch from main
  • One logical change per commit
  • Run all tests before pushing
<!-- gh-comment-id:3792260925 --> @rudrankriyam commented on GitHub (Jan 23, 2026): @cursor Please implement this issue. ## Implementation Guide ### 1. Create `cmd/testflight.go` Create a new `testflight` command group that wraps existing apps functionality under a TestFlight namespace: ```go // TestFlightCommand returns the testflight command with subcommands. func TestFlightCommand() *ffcli.Command { // Add "apps" as a subcommand with list and get } // TestFlightAppsListCommand - reuse existing apps logic // TestFlightAppsGetCommand - add new get by ID ``` ### 2. Add Client Method in `internal/asc/client.go` Add `GetApp(ctx, appID)` method: ```go func (c *Client) GetApp(ctx context.Context, appID string) (*AppResponse, error) { // GET /v1/apps/{id} } ``` ### 3. Register Command In `cmd/commands.go`, add `TestFlightCommand()` to `RootCommand.Subcommands`. ### 4. Flags Required For `list`: - `--bundle-id` (filter) - `--name` (filter) - `--sku` (filter) - `--sort` (name, -name, bundleId, -bundleId) - `--limit`, `--next`, `--paginate` - `--output`, `--pretty` For `get`: - `--app` (required, the app ID) - `--output`, `--pretty` ### 5. Testing **Unit tests** in `cmd/commands_test.go`: ```go {"testflight apps list missing app", []string{"testflight", "apps", "list"}, ...} {"testflight apps get missing id", []string{"testflight", "apps", "get"}, ...} ``` **Live API test** (use FoundationLab app ID `6747745091`): ```bash ./asc testflight apps list --limit 1 ./asc testflight apps get --app 6747745091 ./asc testflight apps list --output table ``` ### 6. Code Standards (from Agents.md) - Use `strings.TrimSpace()` on all ID inputs - Use `ffcli` pattern from existing commands (see `BetaGroupsCommand`) - Output JSON minified by default - Always validate required flags before creating client - Use `contextWithTimeout(ctx)` for API calls - Run `make format && make lint && make test` before committing ### 7. PR Guidelines - Branch from `main` - One logical change per commit - Run all tests before pushing
Author
Owner

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

Summary:

  • Added testflight command group with apps list/get, including filters/sort/pagination and JSON/table/markdown output.
  • Extended ASC client with app filters + GetApp, plus table/markdown handling for single app responses.
  • Added client/query tests and command validation coverage for the new TestFlight apps commands.

Tests:

  • make format && make lint && make test

Note:

  • The “testflight apps list missing app” test asserts the missing-auth error since list has no required app ID.

View PR
Open in Cursor Open in Web

<!-- gh-comment-id:3792261420 --> @cursor[bot] commented on GitHub (Jan 23, 2026): Summary: - Added `testflight` command group with `apps list/get`, including filters/sort/pagination and JSON/table/markdown output. - Extended ASC client with app filters + `GetApp`, plus table/markdown handling for single app responses. - Added client/query tests and command validation coverage for the new TestFlight apps commands. Tests: - `make format && make lint && make test` Note: - The “testflight apps list missing app” test asserts the missing-auth error since list has no required app ID. <a href="https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/60"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/view-pr-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/view-pr-light.svg"><img alt="View PR" src="https://cursor.com/view-pr-light.svg"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-c8c65567-6c4c-4c57-b7ca-6a31a71f4619"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-c8c65567-6c4c-4c57-b7ca-6a31a71f4619"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web" src="https://cursor.com/open-in-web.svg"></picture></a>
Author
Owner

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

Implemented in PR #60 - testflight apps list and get commands.

<!-- gh-comment-id:3792501789 --> @rudrankriyam commented on GitHub (Jan 23, 2026): Implemented in PR #60 - testflight apps list and get commands.
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#6
No description provided.