mirror of
https://github.com/trycua/computer.git
synced 2026-02-16 19:39:20 -06:00
Add the CLI to the quickstart
This commit is contained in:
@@ -27,10 +27,45 @@ Choose how you want to run your Cua computer. This will be the environment where
|
||||
|
||||
You can run your Cua computer in the cloud (recommended for easiest setup), locally on macOS with Lume, locally on Windows with a Windows Sandbox, or in a Docker container on any platform. Choose the option that matches your system and needs.
|
||||
|
||||
<Tabs items={['Cloud Sandbox', 'Linux on Docker', 'macOS Sandbox', 'Windows Sandbox']}>
|
||||
<Tab value="Cloud Sandbox">
|
||||
<Tabs items={['Cloud Sandbox (CLI)', 'Cloud Sandbox (Website)', 'Linux on Docker', 'macOS Sandbox', 'Windows Sandbox']}>
|
||||
<Tab value="Cloud Sandbox (CLI)">
|
||||
|
||||
Cua Cloud Sandbox provides sandboxes that run Linux (Ubuntu), Windows, or macOS.
|
||||
Use the CUA CLI to quickly create and manage cloud sandboxes that run Linux (Ubuntu), Windows, or macOS.
|
||||
|
||||
1. Install the CUA CLI:
|
||||
```bash
|
||||
# macOS/Linux
|
||||
curl -LsSf https://cua.ai/cli/install.sh | sh
|
||||
|
||||
# Windows
|
||||
powershell -ExecutionPolicy ByPass -c "irm https://cua.ai/cli/install.ps1 | iex"
|
||||
```
|
||||
|
||||
2. Login to your CUA account:
|
||||
```bash
|
||||
cua login
|
||||
```
|
||||
|
||||
3. Create a cloud sandbox:
|
||||
```bash
|
||||
# Linux sandbox (recommended)
|
||||
cua create --os linux --configuration small --region north-america
|
||||
|
||||
# Or Windows sandbox
|
||||
cua create --os windows --configuration small --region north-america
|
||||
|
||||
# Or macOS sandbox
|
||||
cua create --os macos --configuration small --region north-america
|
||||
```
|
||||
|
||||
4. Note your sandbox name and password from the output
|
||||
|
||||
Your Cloud Sandbox will be automatically configured and ready to use.
|
||||
|
||||
</Tab>
|
||||
<Tab value="Cloud Sandbox (Website)">
|
||||
|
||||
Use the CUA website dashboard to create and manage cloud sandboxes that run Linux (Ubuntu), Windows, or macOS.
|
||||
|
||||
1. Go to [cua.ai/signin](https://cua.ai/signin)
|
||||
2. Navigate to **Dashboard > Containers > Create Instance**
|
||||
@@ -111,8 +146,21 @@ Connect to your Cua computer and perform basic interactions, such as taking scre
|
||||
|
||||
Then, connect to your desired computer environment:
|
||||
|
||||
<Tabs items={['Cloud Sandbox', 'Linux on Docker', 'macOS Sandbox', 'Windows Sandbox', 'Your host desktop']}>
|
||||
<Tab value="Cloud Sandbox">
|
||||
<Tabs items={['Cloud Sandbox (CLI)', 'Cloud Sandbox (Website)', 'Linux on Docker', 'macOS Sandbox', 'Windows Sandbox', 'Your host desktop']}>
|
||||
<Tab value="Cloud Sandbox (CLI)">
|
||||
```python
|
||||
from computer import Computer
|
||||
|
||||
computer = Computer(
|
||||
os_type="linux", # or "windows" or "macos"
|
||||
provider_type="cloud",
|
||||
name="your-sandbox-name", # from CLI output
|
||||
api_key="your-api-key"
|
||||
)
|
||||
await computer.run() # Connect to the sandbox
|
||||
```
|
||||
</Tab>
|
||||
<Tab value="Cloud Sandbox (Website)">
|
||||
```python
|
||||
from computer import Computer
|
||||
|
||||
@@ -203,8 +251,20 @@ Connect to your Cua computer and perform basic interactions, such as taking scre
|
||||
|
||||
Then, connect to your desired computer environment:
|
||||
|
||||
<Tabs items={['Cloud Sandbox', 'Linux on Docker', 'macOS Sandbox', 'Windows Sandbox', 'Your host desktop']}>
|
||||
<Tab value="Cloud Sandbox">
|
||||
<Tabs items={['Cloud Sandbox (CLI)', 'Cloud Sandbox (Website)', 'Linux on Docker', 'macOS Sandbox', 'Windows Sandbox', 'Your host desktop']}>
|
||||
<Tab value="Cloud Sandbox (CLI)">
|
||||
```typescript
|
||||
import { Computer, OSType } from '@trycua/computer';
|
||||
|
||||
const computer = new Computer({
|
||||
osType: OSType.LINUX, // or OSType.WINDOWS or OSType.MACOS
|
||||
name: "your-sandbox-name", // from CLI output
|
||||
apiKey: "your-api-key"
|
||||
});
|
||||
await computer.run(); // Connect to the sandbox
|
||||
```
|
||||
</Tab>
|
||||
<Tab value="Cloud Sandbox (Website)">
|
||||
```typescript
|
||||
import { Computer, OSType } from '@trycua/computer';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user