|
| 1 | +--- |
| 2 | +title: Command Line Interface |
| 3 | +hide: |
| 4 | + - navigation |
| 5 | +--- |
| 6 | + |
| 7 | +# AppBox Command Line Interface (CLI) |
| 8 | + |
| 9 | +AppBox provides a powerful command-line interface that allows you to automate your iOS app deployment workflow. The CLI tool integrates seamlessly with your existing development process and CI/CD pipelines. |
| 10 | + |
| 11 | +## Prerequisites |
| 12 | + |
| 13 | +Before installing/using the AppBox CLI tool, ensure that: |
| 14 | +1. The AppBox application must be installed in `/Applications/AppBox.app` |
| 15 | +2. You must have linked your Dropbox account with AppBox |
| 16 | + |
| 17 | +## Installation |
| 18 | +The AppBox CLI tool can be installed directly from the AppBox application using the built-in installation manager. |
| 19 | + |
| 20 | +1. Open the AppBox application |
| 21 | +2. Click on CLI menu options |
| 22 | +3. Click "Install CLI Tool" |
| 23 | +  |
| 24 | +4. System will prompt for authentication. Enter your system password to proceed. |
| 25 | +  |
| 26 | +5. AppBox will install the CLI tool and display a success message once the installation is complete. |
| 27 | +  |
| 28 | +6. After installation, you can verify that the CLI tool is properly installed by running: |
| 29 | + |
| 30 | + ```bash |
| 31 | + appboxcli -h |
| 32 | + ``` |
| 33 | +  |
| 34 | + |
| 35 | +The installation process will: |
| 36 | +- Create a symbolic link to the CLI tool in `/usr/local/bin/` |
| 37 | +- Make the `appboxcli` command available system-wide |
| 38 | +- Configure proper permissions for command execution |
| 39 | + |
| 40 | +This authentication is required because the CLI tool installation process needs administrative privileges to: |
| 41 | +- Create symbolic links in system directories |
| 42 | +- Set appropriate file permissions |
| 43 | +- Configure the CLI environment |
| 44 | + |
| 45 | +### Uninstallation |
| 46 | + |
| 47 | +To uninstall the CLI tool, AppBox provides an easy uninstallation process: |
| 48 | + |
| 49 | +1. Open AppBox application |
| 50 | +2. Click on CLI menu options |
| 51 | +3. Click "Uninstall CLI Tool" |
| 52 | +4. Confirm the uninstallation when prompted |
| 53 | +  |
| 54 | +5. The system will remove the CLI tool and display a success message |
| 55 | +  |
| 56 | + |
| 57 | + |
| 58 | +## Command Reference |
| 59 | + |
| 60 | +The AppBox CLI tool provides comprehensive options for uploading and distributing your iOS applications. |
| 61 | + |
| 62 | +### Basic Syntax |
| 63 | + |
| 64 | +```bash |
| 65 | +appboxcli --ipa <path-to-ipa-file> [options] |
| 66 | +``` |
| 67 | + |
| 68 | +### Required Parameters |
| 69 | + |
| 70 | +#### `--ipa <path>` |
| 71 | +**Required** - Specifies the path to the IPA file you want to upload. |
| 72 | + |
| 73 | +```bash |
| 74 | +appboxcli --ipa /path/to/your/app.ipa |
| 75 | +``` |
| 76 | + |
| 77 | +### Optional Parameters |
| 78 | + |
| 79 | +#### `--emails <email-list>` |
| 80 | +Comma-separated list of email addresses that should receive the application installation link. |
| 81 | + |
| 82 | +```bash |
| 83 | +appboxcli --ipa app.ipa --emails "tester1@company.com,tester2@company.com" |
| 84 | +``` |
| 85 | + |
| 86 | +#### `--message <message>` |
| 87 | +Attach a personal message to the distribution email. You can use the following keywords in your message: |
| 88 | +- `{BUILD_NAME}` - Application name |
| 89 | +- `{BUILD_VERSION}` - Application version |
| 90 | +- `{BUILD_NUMBER}` - Build number |
| 91 | + |
| 92 | +```bash |
| 93 | +appboxcli --ipa app.ipa --message "New build {BUILD_NAME} v{BUILD_VERSION} is ready for testing!" |
| 94 | +``` |
| 95 | + |
| 96 | +#### `--keepsamelink` |
| 97 | +Keep the same short URL for all future uploads of IPAs with the same bundle identifier. This is useful for maintaining consistent installation links. |
| 98 | + |
| 99 | +```bash |
| 100 | +appboxcli --ipa app.ipa --keepsamelink |
| 101 | +``` |
| 102 | + |
| 103 | +#### `--dbfolder <folder-name>` |
| 104 | +Specify a custom Dropbox folder name. By default, the folder name will be the application's bundle identifier. This is used with keepsamelink option. |
| 105 | +
|
| 106 | +```bash |
| 107 | +appboxcli --ipa app.ipa --keepsamelink --dbfolder "MyCustomFolder" |
| 108 | +``` |
| 109 | +
|
| 110 | +#### `--webhookmessage <message>` |
| 111 | +Custom message to send along with Slack or Microsoft Teams notifications. You can use the following keywords in your message: |
| 112 | +- `{BUILD_NAME}` - Application name |
| 113 | +- `{BUILD_VERSION}` - Application version |
| 114 | +- `{BUILD_NUMBER}` - Build number |
| 115 | +- `{SHARE_URL}` - Installation link URL |
| 116 | +
|
| 117 | +```bash |
| 118 | +appboxcli --ipa app.ipa --webhookmessage "🚀 New build available: {SHARE_URL}" |
| 119 | +``` |
| 120 | +
|
| 121 | +#### `--slackwebhook <webhook-url>` |
| 122 | +Slack Incoming Webhook URL to send notifications to a Slack channel. |
| 123 | +
|
| 124 | +```bash |
| 125 | +appboxcli --ipa app.ipa --slackwebhook "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK" |
| 126 | +``` |
| 127 | +
|
| 128 | +#### `--msteamswebhook <webhook-url>` |
| 129 | +Microsoft Teams Incoming Webhook URL to send notifications to a Teams channel. |
| 130 | +
|
| 131 | +```bash |
| 132 | +appboxcli --ipa app.ipa --msteamswebhook "https://outlook.office.com/webhook/YOUR/TEAMS/WEBHOOK" |
| 133 | +``` |
| 134 | +
|
| 135 | +## Usage Examples |
| 136 | +
|
| 137 | +### Simple Upload |
| 138 | +Upload an IPA file with minimal configuration: |
| 139 | +
|
| 140 | +```bash |
| 141 | +appboxcli --ipa MyApp.ipa |
| 142 | +``` |
| 143 | +
|
| 144 | +### Upload with Email Distribution |
| 145 | +Upload and automatically send installation links to specific email addresses: |
| 146 | +
|
| 147 | +```bash |
| 148 | +appboxcli --ipa MyApp.ipa \ |
| 149 | + --emails "dev-team@company.com,qa-team@company.com" \ |
| 150 | + --message "New build {BUILD_NAME} v{BUILD_VERSION} is ready for testing. Please test the new features and report any issues." |
| 151 | +``` |
| 152 | +
|
| 153 | +### Complete CI/CD Example |
| 154 | +Full example with all options for a comprehensive CI/CD pipeline: |
| 155 | +
|
| 156 | +```bash |
| 157 | +appboxcli --ipa builds/MyApp.ipa \ |
| 158 | + --emails "beta-testers@company.com" \ |
| 159 | + --message "🎉 New beta build {BUILD_NAME} v{BUILD_VERSION} ({BUILD_NUMBER}) is now available!" \ |
| 160 | + --keepsamelink \ |
| 161 | + --dbfolder "MyApp-Beta" \ |
| 162 | + --slackwebhook "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX" \ |
| 163 | + --webhookmessage "📱 New iOS build deployed: {BUILD_NAME} v{BUILD_VERSION}\n🔗 Install: {SHARE_URL}" |
| 164 | +``` |
| 165 | +
|
| 166 | +### Team Collaboration Example |
| 167 | +Upload with notifications to multiple platforms: |
| 168 | +
|
| 169 | +```bash |
| 170 | +appboxcli --ipa MyApp.ipa \ |
| 171 | + --emails "mobile-team@company.com" \ |
| 172 | + --message "Daily build {BUILD_NAME} ready for testing" \ |
| 173 | + --slackwebhook "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK" \ |
| 174 | + --msteamswebhook "https://outlook.office.com/webhook/YOUR/TEAMS/WEBHOOK" \ |
| 175 | + --webhookmessage "Daily build available: {SHARE_URL}" |
| 176 | +``` |
| 177 | +
|
| 178 | +## Error Handling |
| 179 | +
|
| 180 | +The CLI tool provides comprehensive error handling and logging: |
| 181 | +- **Exit Code 0**: Success |
| 182 | +- **Exit Code 111**: Email sending failed |
| 183 | +- **Exit Code 118**: Unable to create manifest file |
| 184 | +- **Exit Code 119**: IPA file not found |
| 185 | +- **Exit Code 120**: Info.plist not found in IPA |
| 186 | +- **Exit Code 121**: Unable to unzip IPA file |
| 187 | +- **Exit Code 124**: Upload failed |
| 188 | +- **Exit Code 127**: Invalid command |
| 189 | +
|
| 190 | +## Troubleshooting |
| 191 | +
|
| 192 | +### Common Issues |
| 193 | +
|
| 194 | +1. **Command Not Found** |
| 195 | + ```bash |
| 196 | + # Verify installation |
| 197 | + which appboxcli |
| 198 | + # Reinstall if necessary through AppBox GUI |
| 199 | + ``` |
| 200 | +
|
| 201 | +2. **Permission Denied** |
| 202 | + ```bash |
| 203 | + # Check file permissions |
| 204 | + ls -la /usr/local/bin/appboxcli |
| 205 | + # Reinstall CLI tool if permissions are incorrect |
| 206 | + ``` |
| 207 | +
|
| 208 | +3. **AppBox Not Found Error** |
| 209 | + - Ensure AppBox.app is installed in `/Applications/` folder |
| 210 | + - Verify AppBox is properly configured with Dropbox access |
| 211 | +
|
| 212 | +4. **Upload Failures** |
| 213 | + - Check internet connection |
| 214 | + - Verify Dropbox account has sufficient storage |
| 215 | + - Ensure IPA file is valid and not corrupted |
| 216 | +
|
| 217 | +### Getting Help |
| 218 | +
|
| 219 | +For additional help and support: |
| 220 | +
|
| 221 | +- Run `appboxcli --help` for command-line options |
| 222 | +- Visit the [AppBox Documentation](https://docs.getappbox.com) |
| 223 | +- Report issues on [GitHub](https://github.com/getappbox/AppBox-iOSAppsWirelessInstallation/issues) |
| 224 | +
|
| 225 | +
|
| 226 | +The AppBox CLI tool provides a powerful and flexible way to automate your iOS app distribution workflow, making it easy to integrate with any development and deployment process. |
| 227 | +
|
0 commit comments