eas-profile
v1.0.10
Published
CLI to manage Expo/EAS build profiles — one codebase, multiple distributions
Readme
eas-profile
CLI to manage Expo/EAS build profiles — one codebase, multiple distributions.
Install
bun install -g eas-profile
# or
npm install -g eas-profileQuick start
# Create profiles from current app.json
easp create main
easp create dth
# List profiles
easp list
# Switch profile
easp use dth
# Preview changes
easp use dth --dry-run
# Build with profile
easp build dth -p production -t iosCommands
| Command | Description |
|---------|-------------|
| easp list | List all profiles, highlight active one |
| easp use <name> | Apply profile to app.json and eas.json |
| easp current | Show currently active profile name |
| easp create <name> | Create a new profile (interactive) |
| easp build [name] | Apply profile then run eas build |
| easp migrate | Migrate from build-profile/ to .eas-profiles/ |
| easp global <subcommand> | Manage global profiles in ~/.eas-profiles/config.json |
Profile structure
Profiles are stored in .eas-profiles/ at the project root.
.eas-profiles/
├── main.json
└── dth.jsonEach profile:
{
"name": "App Name",
"slug": "app-slug",
"scheme": "app-scheme",
"ios": {
"appId": 6760159429,
"bundleIdentifier": "com.example.app",
"buildNumber": "12"
},
"android": {
"package": "com.example.app",
"versionCode": 12
},
"env": {
"EXPO_PUBLIC_BASE_API_URL": "https://api.example.com"
}
}Fields applied
| Target | Field | Source |
|--------|-------|--------|
| app.json | expo.name | profile.name |
| app.json | expo.slug | profile.slug |
| app.json | expo.scheme | profile.scheme |
| app.json | expo.ios.bundleIdentifier | profile.ios.bundleIdentifier |
| app.json | expo.ios.buildNumber | profile.ios.buildNumber |
| app.json | expo.android.package | profile.android.package |
| app.json | expo.android.versionCode | profile.android.versionCode |
| eas.json | submit.production.ios.ascAppId | profile.ios.appId |
| eas.json | build.*.env | profile.env (with --hard-env) |
Options
easp use
easp use <name> [options]
Options:
--dry-run Preview changes (git diff style)
--backup Create .bak files before overwriting
--hard-env Write profile env into all eas.json build profileseasp build
easp build [name] [options]
Options:
-p, --profile <profile> EAS build profile: production|preview|development (default: production)
-t, --target <platform> Target platform: ios|android
--local Run build locally
--backup Create .bak before applying
--hard-env Write profile env into eas.jsonIf [name] is omitted, uses the currently active profile.
easp create
easp create <name> [options]
Options:
--from-current Copy from current app.json, skip prompts
--name <value> App display name
--slug <value> Expo slug
--scheme <value> Deep link scheme
--bundle-id <v> iOS bundle identifier
--package <v> Android package name
--app-id <v> App Store Connect App IDGlobal profiles
Store profiles per-user in ~/.eas-profiles/config.json for sensitive env or shared configs.
# Import all local profiles to global
easp global import
# Add a single profile
easp global add dth --from-local
# List global profiles
easp global list
# Remove
easp global remove dth
# Show config path
easp global pathResolution order: local .eas-profiles/ first, then global ~/.eas-profiles/config.json.
Version tracking
buildNumber (iOS) and versionCode (Android) are saved per-profile. When switching from profile A to B:
- Current
buildNumber/versionCodefromapp.jsonsaved back to profile A - Profile B's
buildNumber/versionCoderestored toapp.json
Non-interactive mode
All commands support --non-interactive for JSON output (scripts/LLM):
easp list --non-interactive
easp use dth --non-interactive
easp current --non-interactiveProgrammatic API
import {
applyProfile,
listProfiles,
getCurrentProfile,
createProfile,
} from "eas-profile";
const profiles = await listProfiles();
const current = await getCurrentProfile();
await applyProfile("dth", { hardEnv: true });License
MIT
