feat(plugins): add default start commands for better discoverability#47
Open
feat(plugins): add default start commands for better discoverability#47
Conversation
Add convenience commands to plugin.json files: - Android: 'devbox run start:android' - Full workflow (start emulator, build, deploy) - iOS: 'devbox run start:ios' - Full workflow (start simulator, build, deploy) - React Native: 'devbox run start:metro/stop:metro' - Metro bundler management - React Native: Includes start:android and start:ios from composed plugins These commands provide better discoverability via 'devbox run --list' and work out-of-the-box for simple projects while remaining overridable. Error handling: - android.sh run and ios.sh run already provide clear error messages - When no build:android/build:ios script exists, shows: 'No build:android or build script found in devbox.json' - When no APK/.app artifact found, shows detailed resolution paths and suggests IOS_APP_ARTIFACT/ANDROID_APP_APK env vars - Build detection tries platform-specific scripts first (build:android, build:ios), then falls back to generic 'build' Benefits: - Works immediately for projects with build scripts defined - Consistent command names across all plugin users - Still fully overridable for complex workflows (e.g., process-compose orchestration) - Better developer experience via clear, predictable command names
Update quickstart examples to use the new default commands: - start:android (was start-android) - start:ios (new) - start:metro / stop:metro (new) Clarify that these commands require build scripts defined in devbox.json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds convenience
devbox runcommands to all plugins for better out-of-the-box developer experience:Android Plugin:
devbox run start:android- Full workflow (start emulator, build, deploy)iOS Plugin:
devbox run start:ios- Full workflow (start simulator, build, deploy)React Native Plugin:
devbox run start:metro- Start Metro bundlerdevbox run stop:metro- Stop Metro bundlerdevbox run start:android- Full Android workflowdevbox run start:ios- Full iOS workflowProblem
Previously, users had to:
devbox.jsonandroid.sh run,ios.sh run,metro.sh start)devbox run --listSolution
Plugin-Provided Defaults
Commands are now built into the plugins and work immediately for simple projects:
Still Overridable
Projects can override for custom workflows:
{ "shell": { "scripts": { "start:android": [ "process-compose -f dev-android.yaml --tui=${DEVBOX_TUI:-false}" ] } } }Clear Error Messages
Already implemented in the CLI scripts:
When no build script exists:
When no APK/.app artifact found:
Build Detection
The commands automatically detect and use:
build:android,build:iosbuildBenefits
devbox run --listTesting
android.sh runandios.sh runDocumentation Updates
plugins/android/README.mdquickstartplugins/ios/README.mdquickstartplugins/react-native/README.mdwith full command reference🤖 Generated with Claude Code