mcpField
A
asc-init

asc-init

github.com/tddworksDevelopment584 installsUpdated 5w ago
Repository

About asc-init

A project-context initialization command for asc-cli that saves an app's identifiers and optional review contact details in `.asc/project.json`. It helps app developers and agents reuse the project context across sessions without repeatedly listing apps.

Key features

  1. 01Save app ID and name
  2. 02Detect context from Xcode projects
  3. 03Search apps by name
  4. 04Store optional review contact details
  5. 05Expose follow-up command affordances

Use cases

  1. 01Initialize context in an app project
  2. 02Reuse app identifiers across sessions
  3. 03Prepare review contact information

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tddworks/asc-cli-skills --skill asc-init

After installing, type/asc-initin Claude Code to confirm it loaded.

Details

From the project README

asc init — Project Context Initialisation

Saves the app ID, name, bundle ID, and optional review contact info to .asc/project.json in the current directory. Future commands and agents read this file instead of calling asc apps list every session.

Commands

init — pin project context
# Direct (no API list call)
asc init --app-id <id> [--pretty]

# By name (case-insensitive search)
asc init --name "My App" [--pretty]

# Auto-detect from *.xcodeproj/project.pbxproj in cwd
asc init [--pretty]

# With review contact info
asc init --app-id <id> \
  --contact-first-name "Jane" \
  --contact-last-name "Smith" \
  --contact-email "[email protected]" \
  --contact-phone "+1-555-0100" \
  [--pretty]

Priority: --app-id > --name > auto-detect. Contact flags are optional and can be combined with any detection mode.

What Gets Saved

./.asc/project.json (contact fields omitted when not set):

{
  "appId":    "1234567890",
  "appName":  "My App",
  "bundleId": "com.example.myapp",
  "contactEmail": "[email protected]",
  "contactFirstName": "Jane",
  "contactLastName": "Smith",
  "contactPhone": "+1-555-0100"
}

JSON Output

When contact info is saved, the output includes contact fields and an updateReviewContact affordance. Without contact info, a setReviewContact affordance is shown instead.

{
  "data": [
    {
      "affordances": {
        "checkReadiness": "asc versions check-readiness --version-id <id>",
        "listAppInfos":   "asc app-infos list --app-id 1234567890",
        "listBuilds":     "asc builds list --app-id 1234567890",
        "listVersions":   "asc versions list --app-id 1234567890",
        "updateReviewContact": "asc init --app-id 1234567890 --contact-email ... --contact-phone ..."
      },
      "appId":    "1234567890",
      "appName":  "My App",
      "bundleId": "com.example.myapp",
      "contactEmail": "[email protected]",
      "contactFirstName": "Jane",
      "contactLastName": "Smith",
      "contactPhone": "+1-555-0100"
    }
  ]
}

Typical Workflow

# 1. Run once per project directory
cd /path/to/MyApp
asc init --pretty

# 2. In subsequent sessions, read the saved context
APP_ID=$(jq -r '.appId' .asc/project.json)

# 3. Use normally — no need for asc apps list
asc versions list --app-id "$APP_ID"
asc builds list   --app-id "$APP_ID"

Auto-detect Logic

When no flags are given, asc init scans *.xcodeproj/project.pbxproj files in the current directory and extracts PRODUCT_BUNDLE_IDENTIFIER values. It then matches those bundle IDs against your App Store Connect apps.

Variable references like $(PRODUCT_BUNDLE_IDENTIFIER) are skipped — only literal values are matched.

Error Cases

SituationError
--name given but no app matchesNo app named '…'. Run asc apps list to see available apps.
Auto-detect: no .xcodeproj foundNo Xcode project found. Use --app-id or --name.
Auto-detect: bundle IDs don't match any ASC appNo ASC app matched bundle IDs: com.example.app

See Also

  • Full feature doc: docs/features/init.md
  • Follow affordances from the output to list versions, builds, or app infos without knowing the app ID

Comments

Markdown supported