Project Initialization
Link your workspace to a BuildShare project using interactive or non-interactive flow
📋 Project Initialization
To initialize your project and configure BuildShare, run the initialization command:
buildshare initThis starts an interactive configuration wizard to link your workspace to a BuildShare project. It creates a .buildshare/project.json file in your root folder:
{
"projectId": "proj_abc123",
"projectName": "My App",
"androidPath": "./app/build/outputs/apk/release/app.apk",
"iosPath": "./build/MyApp.ipa",
"defaultBranch": "main"
}🔄 Interactive Flow
When running buildshare init interactively, the CLI leads you through the setup wizard step-by-step:
- Existing Config Detection: Prompts if you want to overwrite
.buildshare/project.jsonif it already exists. - Project Link or Creation:
- Lists existing projects associated with your account so you can select one, or
- Offers to create a new project by prompting you for the Project Name and a unique Package/Bundle Identifier (e.g.,
com.example.myapp).
- Build Path Presets: Asks for local relative paths to your Android builds (
.apk/.aab) and iOS builds (.ipa) to save time on future uploads. - Git Integration: Automatically detects if the project is a Git repository and offers to add
.buildshareto your.gitignoreto keep local state out of source control.
🔧 Options
You can bypass the interactive wizard using these options:
--project-id <id>: Link to an existing project by its ID--project-name <name>: Auto-create a new project with the given name during setup--package-name <name>: Package/bundle identifier (required when using--project-name)--android-path <path>: Local file path to Android APK/AAB builds--ios-path <path>: Local file path to iOS IPA builds-y, --yes: Accept all default answers (non-interactive mode)
💡 Examples
# Link to an existing project non-interactively
buildshare init --project-id proj_abc123 --android-path ./app.apk --ios-path ./app.ipa -y
# Create and link a new project non-interactively
buildshare init --project-name "My App" --package-name "com.example.myapp" --android-path ./app.apk -y