Configuration File
Create a norrix.config.ts file in your project root for persistent configuration. This eliminates the need to pass common options on every command.
Quick Start
import { defineConfig } from '@norrix/cli';
export default defineConfig({
ios: {
teamId: 'ABC123XYZ0',
distributionType: 'appstore',
},
android: {
keystorePath: './signing/release.keystore',
keyAlias: 'my-app-key',
},
defaultPlatform: 'ios',
defaultConfiguration: 'release',
});Supported File Names
The CLI looks for configuration in this order:
norrix.config.tsnorrix.config.jsnorrix.config.mjsnorrix.config.cjs
Configuration Options
iOS Configuration
ios: {
// Apple Developer Team ID (10 alphanumeric characters)
teamId: 'ABC123XYZ0',
// Default distribution type for release builds
distributionType: 'appstore' | 'adhoc' | 'enterprise',
// Manual certificate (instead of Fastlane Match)
p12Path: './certs/distribution.p12',
// Manual provisioning profile
provisioningProfilePath: './profiles/AppStore.mobileprovision',
// App Store Connect API Key (for auto-provisioning)
ascApiKeyId: 'ABC123DEF4',
ascIssuerId: '12345678-1234-1234-1234-123456789012',
ascPrivateKeyPath: './AuthKey_ABC123.p8',
}| Property | Type | Description |
|---|---|---|
teamId | string | Apple Developer Team ID |
distributionType | 'appstore' | 'adhoc' | 'enterprise' | Default distribution type |
p12Path | string | Path to .p12 certificate |
provisioningProfilePath | string | Path to .mobileprovision |
ascApiKeyId | string | App Store Connect API Key ID |
ascIssuerId | string | App Store Connect Issuer ID |
ascPrivateKeyPath | string | Path to .p8 private key |
Android Configuration
android: {
// Path to keystore file for release signing
keystorePath: './signing/release.keystore',
// Key alias within the keystore
keyAlias: 'my-app-key',
}| Property | Type | Description |
|---|---|---|
keystorePath | string | Path to keystore file |
keyAlias | string | Key alias within keystore |
Environment Configuration
Declare environment variables and files that should be injected at build time:
env: {
// Environment variable names to inject
variables: ['API_KEY', 'DATABASE_URL', 'SENTRY_DSN'],
// File paths to inject
files: ['.env.production', 'config/firebase.json'],
}| Property | Type | Description |
|---|---|---|
variables | string[] | Env var names to inject at build time |
files | string[] | File paths to inject at build time |
Note: This declares which variables are expected. You must set the actual values via
norrix env set.
General Options
{
// Default platform for build/update commands
defaultPlatform: 'ios' | 'android' | 'visionos',
// Default build configuration
defaultConfiguration: 'debug' | 'release',
// Enable verbose logging by default
verbose: true,
}| Property | Type | Default | Description |
|---|---|---|---|
defaultPlatform | 'ios' | 'android' | 'visionos' | - | Default platform |
defaultConfiguration | 'debug' | 'release' | 'debug' | Default build config |
verbose | boolean | false | Enable verbose logging |
Complete Example
import { defineConfig } from '@norrix/cli';
export default defineConfig({
// iOS configuration
ios: {
teamId: 'ABC123XYZ0',
distributionType: 'enterprise',
ascApiKeyId: 'ABC123DEF4',
ascIssuerId: '12345678-1234-1234-1234-123456789012',
ascPrivateKeyPath: './AuthKey_ABC123.p8',
},
// Android configuration
android: {
keystorePath: './signing/release.keystore',
keyAlias: 'my-app-key',
},
// Environment variables to inject
env: {
variables: ['API_KEY', 'ANALYTICS_ID'],
files: ['.env.production', 'google-services.json'],
},
// Defaults
defaultPlatform: 'ios',
defaultConfiguration: 'release',
verbose: false,
});Auto-Generated Configuration
When you run norrix build interactively, the CLI offers to save your choices to norrix.config.ts:
? Would you like to save these settings to norrix.config.ts? (Y/n)This creates a configuration file based on your selections.
TypeScript Support
The defineConfig function provides full TypeScript IntelliSense:
import { defineConfig } from '@norrix/cli';
import type { NorrixConfig } from '@norrix/cli';
// Option 1: Using defineConfig helper
export default defineConfig({
ios: { teamId: 'ABC123XYZ0' },
});
// Option 2: Using type annotation
const config: NorrixConfig = {
ios: { teamId: 'ABC123XYZ0' },
};
export default config;Gitignore Recommendations
Add sensitive paths to .gitignore:
# Signing credentials (if stored locally)
*.p12
*.mobileprovision
*.p8
*.keystore
*.jks
# Don't ignore norrix.config.ts - it doesn't contain secretsStore actual secrets in Norrix using norrix env set rather than in version control.