Core
Computer
Core interface for interacting with virtual computers
Overview
The Computer class is the core interface for interacting with virtual computers in cuse. It provides access to system-level controls for display, mouse, keyboard, bash commands, and file editing capabilities.
Configuration
When creating a new Computer instance, you can configure its properties:
Configuration Options
Property | Type | Default | Description |
---|---|---|---|
baseUrl | string | required | The base URL for the computer’s API endpoint |
display.number | number | 1 | Display number to control |
display.width | number | 1024 | Display width in pixels |
display.height | number | 768 | Display height in pixels |
System Interface
The Computer provides access to several system-level interfaces through computer.system
:
Display Control
Control the computer’s display:
Mouse Control
Control mouse movements and clicks:
Keyboard Control
Simulate keyboard input:
Bash Commands
Execute shell commands:
File Editor
Manipulate files on the computer:
Keychain
The Computer class includes a Keychain
app that allows you to manage your passwords and credentials.
Lifecycle Methods
The Computer class includes methods for managing the computer’s lifecycle: