Skip to content

Conversation

ben-fornefeld
Copy link
Member

@ben-fornefeld ben-fornefeld commented Aug 1, 2025

This PR updates the sandbox spawn process to print the inspect URL to the console when a new sandbox is created using e2b sbx spawn or e2b sbx create. This makes it easier for users to access and debug new sandboxes directly after creation.

Screenshot 2025-09-15 at 2 54 22 PM

Copy link

linear bot commented Aug 1, 2025

Copy link

changeset-bot bot commented Aug 1, 2025

🦋 Changeset detected

Latest commit: 32a2abb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@e2b/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ben-fornefeld ben-fornefeld self-assigned this Aug 1, 2025
@ben-fornefeld ben-fornefeld changed the title Feat: Print sandbox inspect url on e2b sbx spawn e2b 2592 Feat: Print sandbox inspect url on sandbox spawn Aug 1, 2025
@ben-fornefeld ben-fornefeld marked this pull request as ready for review August 1, 2025 15:14
@mlejva mlejva self-requested a review August 1, 2025 16:31
@mlejva
Copy link
Member

mlejva commented Aug 1, 2025

@ben-fornefeld can you use team slug instead of team ID?

@ben-fornefeld
Copy link
Member Author

@ben-fornefeld can you use team slug instead of team ID?

that would probably require a re-auth. will check tomorrow!

@mishushakov
Copy link
Member

The auth command needs to be changed in order to retrieve the slug as well as the team id, but currently signed teams will see the their team id in the link (since the slug was not fetched before).

@ValentaTomas ValentaTomas added Improvement Improvement for current functionality cli Improvements or additions to CLI labels Aug 7, 2025
@ben-fornefeld ben-fornefeld marked this pull request as draft September 2, 2025 15:38
@ben-fornefeld
Copy link
Member Author

ben-fornefeld commented Sep 3, 2025

@mishushakov i have an idea how to make this logic not dependent on the client side at all.

i will just check in the dashboard via /dashboard/inspect/$sbxId if the user has access to the sandbox and route him to the correct team / url from there. no need for slug on the client side.

wdyt?

@mishushakov
Copy link
Member

we should try this!

- Introduced a new utility function `printDashboardSandboxInspectUrl` to streamline the process of generating and printing the sandbox inspection URL.
- Updated the `createCommand` function to utilize the new utility instead of the previous direct URL construction method.
- Added a new constant `DASHBOARD_BASE` for better URL management.
@ben-fornefeld
Copy link
Member Author

we should try this!

done. tested on the following pr/preview: e2b-dev/dashboard#141

@ben-fornefeld ben-fornefeld marked this pull request as ready for review September 16, 2025 10:04
@ben-fornefeld
Copy link
Member Author

NOTE:

this pr can be reviewed already, but merging needs to be blocked until e2b-dev/dashboard#141 is deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Improvements or additions to CLI Improvement Improvement for current functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants