Last Verified: 2025-01-27
Package:
@hopx-ai/sdk on npm
Overview
TheDesktop resource provides desktop automation capabilities for sandboxes with GUI support.
Desktop features require a desktop-enabled template. Not all templates support desktop operations.
Methods
VNC Methods
async desktop.startVnc(): Promise<VNCInfo>async desktop.stopVnc(): Promise<void>async desktop.getVncInfo(): Promise<VNCInfo>async desktop.getVncUrl(): Promise<string>
Mouse Methods
async desktop.mouseClick(x: number, y: number, options?: MouseClickOptions): Promise<void>async desktop.mouseMove(x: number, y: number): Promise<void>async desktop.mouseDrag(fromX: number, fromY: number, toX: number, toY: number): Promise<void>async desktop.mouseScroll(x: number, y: number, deltaY: number): Promise<void>
Keyboard Methods
async desktop.keyboardType(text: string): Promise<void>async desktop.keyboardPress(key: string): Promise<void>async desktop.keyboardCombination(keys: string[]): Promise<void>
Screenshot Methods
async desktop.screenshot(): Promise<ScreenshotResponse>async desktop.screenshotRegion(x: number, y: number, width: number, height: number): Promise<Buffer>
Related Classes
- Sandbox - Main sandbox class
Related
- Python SDK: Desktop - Python SDK desktop automation
- VNC Server - Learn about VNC access
- Screenshots - Capture screenshots
Next Steps
- Learn about VNC Server for remote desktop access
- Explore Screenshots for visual verification
- Review Mouse Control and Keyboard Control for GUI automation
- Types - TypeScript type definitions
- CLI System Commands - System operations from CLI
See Also
- Core Concepts: Desktop - Learn about desktop automation
- Sandbox Class - Access desktop via
sandbox.desktop

