Add site browse command #169
Draft
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.
Note
Description
Adds a new
site browsecommand that opens the published site URL in the user's browser. This PR also refactors the site command structure by introducing a parentsitecommand withdeployandbrowseas subcommands, making the CLI more organized and following a consistent pattern with other command groups.Related Issue
None
Type of Change
Changes Made
site browsecommand that fetches and opens the published site URLgetSiteUrl()utility function insrc/cli/utils/urls.tsthat calls the Base44 API to retrieve the published URLsrc/cli/commands/site/index.tsas the parent commandgetSiteDeployCommand()to return just the deploy subcommand instead of the entire site commandopenpackage integration to open URLs in the browser (skipped in CI environments)Testing
npm test)Checklist
Additional Notes
The
browsecommand will not attempt to open a browser in CI environments (checksprocess.env.CI). The command uses the new/api/apps/platform/{id}/published-urlendpoint to fetch the live site URL dynamically.🤖 Generated by Claude | 2026-02-01 20:00 UTC