$ show rorkai/App-Store-Connect-CLI
This repository implements a comprehensive, production-grade CLI tool (`asc`) for interacting with Apple's App Store Connect API, Apple Ads API, and Apple Developer Portal. It automates the entire lifecycle of Apple platform applications, including authentication, app and build management, versioning, localization, screenshots, pricing, subscriptions, in-app purchases, Game Center features, code signing, distribution, and publishing. The tool is designed for CI/CD integration and supports multiple output formats (JSON, table, markdown) with a rich set of validation and diagnostic capabilities. The architecture is a monolithic CLI application built on a custom Go-like language with a sophisticated build system (`go.mod`, `go.sum`, `//go:build` directives). It follows a clean layered architecture: a command layer using the `ffcli` library, a comprehensive API client layer (`internal/asc/`), a secure authentication layer (`internal/auth/`), and platform-specific implementations for file operations, process management, and security. The codebase is exceptionally well-tested with thousands of unit and integration tests, including platform-specific tests for Darwin, Linux, and Windows. Notable engineering highlights include a generic pagination system with cycle detection, a registry-based output rendering system, a robust validation framework with structured remediation, and cross-platform secure file operations that prevent symlink attacks using platform-specific syscalls. The project also features an embedded workflow engine, telemetry with environment detection, and agent skill definitions for AI-assisted development workflows. The project is actively maintained with a structured release process, low issue count, and active dependency management. Technical drift is managed through explicit deprecation handling and migration paths. Primary risks include reliance on a custom Go toolchain, platform-specific assembly code for macOS security operations, and web session scraping that is inherently fragile to Apple Developer Portal changes.
The LLM identified 5 files worth highlighting for reuse:
Provides a robust, cross-platform abstraction for securely creating, opening, and renaming files without following symlinks (TOCTOU prevention). Uses platform-specific syscalls (O_EXCL, O_NOFOLLOW on Unix, assembly trampolines for macOS fcntl, Windows ACLs) with a best-effort fallback. This is a highly reusable security primitive for any application handling sensitive local files.
Implements a generic, typed pagination system (PaginateAll, PaginateEach) for JSON:API collections. It handles cursor-based and page-based pagination, includes cycle detection (ErrRepeatedPaginationURL), and supports streaming (PaginateEach). This is a well-abstracted pattern that could be extracted for any paginated REST API client.
A sophisticated output rendering system using a registry pattern. Types register custom row renderers for table/markdown/JSON output. The PrintTable/PrintMarkdown functions dispatch to these registered functions. This decouples data formatting from business logic and is highly reusable for any CLI tool needing structured output.
A structured validation framework that produces CheckResult objects with severity, remediation steps, and resolution status. It is used for pre-submission checks (pricing, IAP, screenshots). The pattern of building a list of checks, running them, and aggregating results with actionable remediation is a strong, reusable pattern for any system requiring complex validation.
Detects the runtime environment (local terminal, CI system like GitHub Actions, Rork sandbox, Claude Code, Cursor) and invocation source. This is a non-trivial pattern for telemetry systems that need to classify usage without hardcoding platform specifics. The logic for detecting CI env vars and agent sockets is cleanly abstracted.