TS/JS SDK Overview
Contributions are welcome at https://github.com/CloudCruise/cloudcruise-js. Report bugs via GitHub issues or Discord. The CloudCruise TypeScript/JavaScript SDK provides a simple way to integrate browser automation workflows into your applications. Execute workflows, manage credentials, and monitor runs programmatically.Installation
Install the latest version:1. Creating a Run
2. Listening to run events
Use typed per-event listeners for the best DX. Alternatively, you can attach a single'run.event' listener and switch on message.data.event.
Other available events
- ‘open’: connection established
- ‘ping’: heartbeat messages
- ‘reconnect’: reconnect attempts with
{ attemptDelayMs } - ‘message’: catch-all mirror of
'run.event'and'ping' - ‘close’: connection closed (informational)
- ‘error’: SSE errors
- ‘end’: terminal status for the session
Async iteration (streaming)
If you prefer a loop:- Tip: Use Option A for strongly-typed handlers when you know the events you care about. Use Option B for centralized routing/logging. Both can be combined (e.g., typed listeners for your primary events plus a catch-all logger).
3. Wait for Completion
You can wait for the run to finish, but keep in mind if your run is long, this can be a very long time:Next Steps
- Explore the Run API for detailed workflow execution options
- Learn about Vault API for secure credential management
- Check out Workflow API to manage your workflows
- Set up Webhooks for event notifications

