playwriter session new
Create a new session and print the session ID. A session is required to execute code with the-e flag.
Options
Remote relay server host to connect to (or use
PLAYWRITER_HOST env var)Stable browser key when multiple browsers are connected. Use this to select which browser to create the session for.
Returns
Prints the session ID to stdout:Exit Codes
0- Session created successfully1- No connected browsers detected or invalid browser key specified
Examples
playwriter session list
List all active sessions with their metadata.Options
Remote relay server host to connect to (or use
PLAYWRITER_HOST env var)Returns
Prints a table with session details:Exit Codes
0- Successfully listed sessions1- Error connecting to relay server
Examples
playwriter session delete
Delete a session and clear its state.Arguments
The ID of the session to delete
Options
Remote relay server host to connect to (or use
PLAYWRITER_HOST env var)Returns
Exit Codes
0- Session deleted successfully1- Session not found or error during deletion
Examples
playwriter session reset
Reset the browser connection for a session. This reconnects to the browser and reports available pages.Arguments
The ID of the session to reset
Options
Remote relay server host to connect to (or use
PLAYWRITER_HOST env var)Returns
Exit Codes
0- Connection reset successfully1- Session not found or error during reset