CLI Documentation
Create a session
The create
command in MarinaBox CLI is used to create a new session in a secure and isolated sandbox environment. This command supports multiple environment types and additional configuration options.
Video Tutorial
Command Syntax
Options:
--env-type
: Specifies the type of environment for the session. Supported values:browser
: Creates a sandboxed browser environment.desktop
: Creates a sandboxed desktop environment.
--tag
: (Optional) Assigns a custom tag to the session for easier identification.--kiosk
: (Optional) Launches Chrome in kiosk mode (browser environment only). Removes tab controls and runs in fullscreen.--initial-url
: (Optional) Specifies the initial URL to open when the browser starts (browser environment only).
Examples
1. Create a Browser Session
This creates a browser session with default resolution and no tag.
2. Create a Desktop Session with Custom Resolution
3. Create a Tagged Session
This creates a desktop session with a custom tag TestSession
.
4. Create a Kiosk Mode Browser Session
This creates a browser session in kiosk mode, ideal for presentations or public displays.
5. Create a Browser Session with Initial URL
This creates a browser session that automatically opens example.com on startup.
Command Behavior
- Environment Validation: Ensures the specified
env-type
is valid (browser
ordesktop
). - Port Allocation: Dynamically assigns ports for the sandbox environment to avoid conflicts.
- Container Spin-Up: Creates the sandbox environment using the specified options and returns session details upon success.
Expected Output
Upon successful execution, the command returns details of the created session in JSON format:
Use the session ID for subsequent commands to manage or view the session.
Get Support & Join Our Community
- Discord: https://discord.gg/nAyFBSSU87
- Email: askmarinabox@gmail.com