Initialize Project (init)
Set up local project configuration with buildshare init, auto-detecting platform build paths and Git branches.
The buildshare init command links your local workspace to a BuildShare project. It creates a local project configuration file (buildshare.json or .buildshare.yaml) that stores your project identifier and platform build paths, enabling zero-config platform-based uploads like buildshare upload android and buildshare upload ios.
Interactive Initialization
Running buildshare init without flags starts an interactive terminal wizard that guides you through linking or creating your application:
buildshare initSelect or Create Project
The CLI fetches your workspace applications and prompts you to select an existing project or create a new one.
Configure Platform Build Folders
init prompts for the directories containing your compiled mobile builds, offering intelligent auto-detection:
- Android Build Folder: Auto-detects
./android/app/build/outputs/apk/releaseif present. - iOS Build Folder: Auto-detects
./ios/buildsif present.
Configure Default Branch
The CLI inspects your local Git repository and auto-detects your active branch (e.g. main, master, or bugs/flow).
Configuration File Created
The settings are saved to your project root. By default, it saves as buildshare.json (or .buildshare.yaml if an existing YAML configuration file is detected).
Generated Configuration File
After initialization, a configuration file with strict camelCase properties is created in your workspace root:
{
"projectId": "bfb72395-2527-42f8-8de8-5ec67e552510",
"projectName": "Jobma Interview",
"androidPath": "/path/to/android/app/build/outputs/apk/release",
"iosPath": "/path/to/ios/builds",
"defaultBranch": "bugs/flow"
}Automatic File Discovery
Once initialized, any CLI command automatically discovers buildshare.json, buildshare.yaml, .buildshare.json, or .buildshare.yaml in the current working directory or by traversing parent directories.
Non-Interactive Automation Flags
For automated CI/CD environments or scripts, provide paths and options using flags to bypass interactive prompts:
buildshare init \
--app bfb72395-2527-42f8-8de8-5ec67e552510 \
--android ./android/app/build/outputs/apk/release \
--ios ./ios/builds \
--branch mainFlags & Options
| Flag | Description |
|---|---|
--app <projectId> | Link to an existing project ID directly |
--name <projectName> | Project name when creating a new project |
--android <path> | Android build folder path |
--ios <path> | iOS build folder path |
--branch <branch> | Default Git branch name |
--json | Output initialization result as JSON |
-c, --config <path> | Target custom configuration file destination |
What to Do Next
Once buildshare init has created your configuration file, you no longer need to pass long file paths or project IDs manually:
# Upload the latest Android APK automatically discovered in androidPath
buildshare upload android
# Upload the latest iOS IPA automatically discovered in iosPath
buildshare upload ios