green-line-cli
v1.0.12
Published
Green Line CLI for iOS build and App Store submission workflows
Maintainers
Readme
green-line-cli
green-line-cli is a local-first command-line tool that helps iOS teams build, sign, and submit apps to App Store Connect from one workflow.
No API server, database server, queue service, or cloud account is required.
Framework Compatibility
- Native iOS (Swift/Objective-C + Xcode): Supported.
- Flutter (iOS target): Supported (uses the Flutter project's generated iOS Xcode workspace/project).
- React Native: Supported.
- Expo: Supported, with additional guided migration/setup helpers via
gl migrate expo/--from-expo.
The build/submit engine is Xcode + Fastlane based, so compatibility depends on having a valid iOS Xcode project/workspace, schemes, and Apple signing setup.
Install
From npm:
npm install -g green-line-cli
gl --helpFrom monorepo source:
npm run -w green-line-cli build
npm install -g ./apps/cliPrerequisites
brew install fastlane- macOS + Xcode are required for real iOS build/sign/upload.
- Local CLI data is stored under
~/.config/green-line/.
Getting Started
Run these once per app folder.
- Open the app folder first
cd /absolute/path/to/your-app
pwd- Check your environment
gl doctor- Run setup for this folder
gl apple setupDuring setup, Green Line can:
- Detect Apple ID and bundle ID when possible.
- Save org/project/bundle/team/profile defaults for the current folder.
- Help you import
AuthKey_*.p8and open the right App Store Connect pages.
- Start build
gl build ios start- Review result
gl build ios status <BUILD_ID>
gl build ios logs <BUILD_ID>- Submit after successful build
gl submit ios preflight --build <BUILD_ID>
gl submit ios start --build <BUILD_ID>New Project Folder
When you switch to a different app folder, run setup once in that folder:
cd /absolute/path/to/another-app
gl apple setupGreen Line keeps defaults per folder so projects stay isolated.
Quick Start (Interactive)
gl doctor
gl apple setup
gl build ios start
gl submit ios preflight
gl submit ios startThis is the quick path. Use the full guide above for the full walkthrough.
Expo Migration (Recommended for Expo apps)
gl migrate expoExpo migration does the following:
- Detect Expo metadata from
app.json/app.config.json. - Detect Expo-related packages from both Expo plugin config and source imports.
- If no native iOS project is found, prompt once to run
npx expo prebuild --platform iosand remember that choice for the folder. - In
--yesmode, auto-runs Expo prebuild when native iOS files are missing. - Offers to install missing Expo-related packages and refresh iOS pods.
- Confirms whether you are already signed into App Store Connect.
- Can open Apple pages and auto-import
AuthKey_*.p8from~/Downloads. - If import fails, prints fallback URLs and exact Apple navigation.
- If manual signing fails due to profile/certificate mismatch, build retries once with automatic signing.
Equivalent long form:
gl apple setup --from-expoNon-Interactive Mode (CI)
Use --yes to run without interactive confirmations:
gl migrate expo --yes
gl apple setup --from-expo --yes
gl build ios start --yes
gl submit ios start --build <BUILD_ID> --yesFor deterministic runs, pass ASC details directly:
gl migrate expo \
--issuer-id <ISSUER_UUID> \
--key-id <KEY_ID> \
--p8 /absolute/path/AuthKey_<KEY_ID>.p8 \
--yesBuild Failure UX
- If signing assets mismatch, Green Line retries once with automatic signing.
- If archive fails due app compile issues (Swift/React Native/Flutter iOS build scripts), Green Line reports a short message to open Xcode and fix project compile/build errors.
- Detailed diagnostics are available via
gl build ios logs <BUILD_ID>.
Known Limitations
- Green Line can guide, auto-detect, and retry signing strategies, but it cannot bypass Apple account requirements.
- If App Store Connect API key does not exist, you still need to create/download it once in Apple.
- If app code does not compile, build fails until code is fixed in Xcode.
- If signing assets are invalid for the app entitlements, Apple/Xcode rejects the archive.
Local Data
~/.config/green-line/config.json~/.config/green-line/state.json~/.config/green-line/storage/...
Doctor
Run gl doctor to check your environment, project, and Green Line state in one command:
gl doctor
gl doctor --jsonChecks include: macOS, Xcode, Fastlane, codesigning identities, iOS project detection, bundle ID, app icon, provisioning profile expiry, ASC connection, and more.
Support
- Email: [email protected]
- X: @merrickhare
Expo is a trademark of its respective owner(s); this project is independent and not affiliated with or endorsed by Expo.
