# handie-cua

A shell package for machine and session management.

## Installation

```bash
npm install handie-cua
```

## Usage

```javascript
const handie = require('handie-cua');

// Spawn a new machine
const machine = await handie.spawnMachine({ apiKey: 'your_handie_api_key' });

console.log('Machine ID:', machine.id);
console.log('Live stream:', machine.streamUrl);

// Create a new session
const session = await machine.runNewSession({
	task: 'Apply to 10 apartments in Berlin under 1000€ a month with a balcony and a parking space',
	apiKey: 'your_handie_api_key',
});

// Listen for updates
session.on('update', (update) => {
	console.log('Update:', update);
});

// Create a new task
await session.newTask({
	task: "Create a spreadsheet to keep track of the apartments I've applied to and the ones that I should consider applying to.",
	useBrowserCookies: true,
	allowApplications: ['chrome', 'excel'],
	apiKey: 'your_handie_api_key',
});
```

## License

MIT
