### Install computer-cli using curl script Source: https://github.com/agentcomputerai/computer-cli/blob/main/README.md Install the computer-cli by downloading and executing an installation script via curl. This is an alternative to Nix installation. ```bash curl -fsSL https://agentcomputer.ai/install.sh | bash ``` -------------------------------- ### Public API Client - Start Computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Starts a specified computer. ```APIDOC ## Start Computer ### Description Starts a specified computer. ### Method `client.startComputer(computerId)` ### Parameters #### Path Parameters - **computerId** (string) - Required - The ID of the computer to start. ``` -------------------------------- ### Start or stop a computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Use `power-on` to start a computer and `power-off` to stop it. The CLI waits for the operation to complete. ```bash computer power-on my-dev-box computer power-off my-dev-box --json ``` -------------------------------- ### Install computer-cli to Nix profile Source: https://github.com/agentcomputerai/computer-cli/blob/main/README.md Install the computer-cli tool into your user's Nix profile for global access. This command requires Nix to be installed. ```bash nix profile install github:AgentComputerAI/computer-cli ``` -------------------------------- ### Run computer-cli with Nix Source: https://github.com/agentcomputerai/computer-cli/blob/main/README.md Execute the computer-cli tool directly using Nix to display help or version information. Ensure Nix is installed and configured. ```bash nix run github:AgentComputerAI/computer-cli -- --help ``` ```bash nix run github:AgentComputerAI/computer-cli -- --version ``` -------------------------------- ### power-on / power-off Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Start or stop a computer's virtual machine without deleting its disk. The CLI waits for the operation to complete. ```APIDOC ## `power-on` / `power-off` — Start or stop a computer Stops the VM without deleting its disk. The CLI waits for the operation to complete before returning. ### Usage ```bash computer power-on my-dev-box computer power-off my-dev-box --json ``` ``` -------------------------------- ### Start, stop, and delete a computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Starts, stops, or deletes a computer by its ID. Deleting a computer returns an operation that can be waited upon. ```typescript // Start / stop await client.startComputer(computer.id); await client.stopComputer(computer.id); // Delete (returns immediately; operation may still be pending) const { operation } = await client.deleteComputer(computer.id); if (operation) { await client.waitForOperation(operation.id, { timeoutMs: 120_000 }); } ``` -------------------------------- ### Get Current User and Usage Info Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Display authenticated user details and resource usage. Use --json for machine-readable output suitable for scripting. ```bash computer whoami ``` ```bash computer whoami --json ``` -------------------------------- ### Upgrade CLI Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Updates the CLI to the latest version by downloading and re-running the official install script (macOS/Linux only). ```APIDOC ## Upgrade CLI ### Description Updates the CLI to the latest version. ### Method CLI Command ### Endpoint computer upgrade ``` -------------------------------- ### Get Detailed Computer Information Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Fetch detailed information for a specific computer using its handle or UUID. The --json flag provides output in a machine-readable format. ```bash computer get my-dev-box ``` ```bash computer get comp_abc123 ``` ```bash computer get my-dev-box --json ``` -------------------------------- ### image get Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Show details for a specific computer image. ```APIDOC ## `image get` — Show details for a specific image ### Usage ```bash computer image get img_abc123 computer image get img_abc123 --json ``` ### Response Example (Success) ```json { "image": { "id": "img_abc123", "display_name": "Ubuntu 22.04 LTS", "status": "active", "description": "Default managed worker image", "created_at": "2024-01-01T00:00:00Z" } } ``` ``` -------------------------------- ### aicomputer CLI Authentication Commands Source: https://github.com/agentcomputerai/computer-cli/blob/main/apps/cli/README.md Commands for logging in and out of the aicomputer service. 'computer login' can use an API key or initiate a browser-based login flow. 'claude-login' and 'codex-login' are used after initial login to install specific credentials. ```bash computer login --api-key ``` ```bash computer login ``` ```bash computer logout ``` ```bash computer claude-login ``` ```bash computer codex-login ``` -------------------------------- ### Create a New Virtual Computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Provision a new virtual computer with options for size presets or custom memory/storage. Interactive mode prompts for details, while --json provides machine-readable output. ```bash computer create ``` ```bash computer create my-dev-box --size ram-4g ``` ```bash computer create --name "ML Workbench" --memory 8 --storage 50 ``` ```bash computer create ci-runner --size ram-2g --json ``` ```bash computer create --interactive ``` -------------------------------- ### Manage computer snapshots Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Create point-in-time disk snapshots that can be restored into new computers. Use `ls` to list and `create` to generate. ```bash # List snapshots for a computer computer snapshot ls my-dev-box computer snapshot ls my-dev-box --json # Create a snapshot computer snapshot create my-dev-box ``` -------------------------------- ### List and create computers Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Lists existing computers and creates a new one with specified handle, display name, and size preset. The source image ID can be resolved server-side. ```typescript // --- Computers --- const { computers } = await client.listComputers(); console.log(computers.map(c => `${c.handle}: ${c.state}`)); const { computer } = await client.createComputer({ handle: "my-bot", display_name: "My Bot", size_preset: "ram-4g", source: { kind: "image", image_id: "" }, // image_id resolved server-side when empty }); ``` -------------------------------- ### Open a computer in the browser Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Creates a temporary browser access session and opens the URL. Use `--vnc` to open the VNC desktop instead. ```bash # Open the primary web surface computer open my-dev-box # Open the VNC desktop instead computer open my-dev-box --vnc ``` -------------------------------- ### Public API Client - Create Computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Creates a new computer with specified configuration. ```APIDOC ## Create Computer ### Description Creates a new computer. ### Method `client.createComputer(options)` ### Parameters #### Request Body - **handle** (string) - Required - The handle for the new computer. - **display_name** (string) - Required - The display name for the new computer. - **size_preset** (string) - Required - The size preset for the computer (e.g., 'ram-4g'). - **source** (object) - Required - The source for the computer image. - **kind** (string) - Required - The kind of source ('image'). - **image_id** (string) - Optional - The ID of the image to use (resolved server-side if empty). ``` -------------------------------- ### Public API Client - Create Snapshot Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Creates a snapshot of a computer. ```APIDOC ## Create Snapshot ### Description Creates a snapshot of a computer. ### Method `client.createSnapshot(computerId)` ### Parameters #### Path Parameters - **computerId** (string) - Required - The ID of the computer to snapshot. ``` -------------------------------- ### open Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Open a computer in the browser by creating a temporary browser access session and opening the URL. ```APIDOC ## `open` — Open a computer in the browser Creates a temporary browser access session and opens the URL. ### Usage ```bash # Open the primary web surface computer open my-dev-box # Open the VNC desktop instead computer open my-dev-box --vnc ``` ``` -------------------------------- ### Create and restore a snapshot Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Creates a snapshot of the current computer state and then restores it into a new computer with a specified handle and display name. ```typescript // --- Snapshots --- const { snapshot } = await client.createSnapshot(computer.id); await client.waitForOperation(snapshot.id); const { computer: restored } = await client.restoreSnapshot(snapshot.id, { handle: "restored-box", display_name: "Restored", }); ``` -------------------------------- ### Run aicomputer CLI from source Source: https://github.com/agentcomputerai/computer-cli/blob/main/apps/cli/README.md Executes the aicomputer CLI directly from a local checkout using Nix. ```bash nix run path:./apps/cli -- --version ``` -------------------------------- ### snapshot create Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Create point-in-time disk snapshots that can later be restored into new computers. ```APIDOC ## `snapshot create` — Manage computer snapshots Create point-in-time disk snapshots that can later be restored into new computers. ### Usage ```bash computer snapshot create my-dev-box ``` ``` -------------------------------- ### ssh Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Open an SSH session by provisioning ephemeral SSH credentials via the platform API and invoking the system `ssh` binary. ```APIDOC ## `ssh` — Open an SSH session Provisions ephemeral SSH credentials via the platform API (TLS edge proxy, no gateway MITM), writes a per-computer `ssh_config` fragment, and invokes the system `ssh` binary. ### Usage ```bash # Interactive shell computer ssh my-dev-box # Interactive picker if no handle is specified computer ssh # Pass arbitrary SSH flags (port-forward, verbose) computer ssh my-dev-box -L 8080:localhost:8080 -v # Run a one-shot remote command (supports pipes on the local side) computer ssh my-dev-box -- ls -la /home/node computer ssh my-dev-box -- 'tail -n 50 /var/log/syslog' | grep error # Run a command via --cmd (no need for -- quoting) computer ssh my-dev-box --cmd "cat /etc/os-release" # Attach to (or create) a persistent tmux session computer ssh my-dev-box --tmux ``` ``` -------------------------------- ### Create a FUSE mount Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Creates a FUSE mount point within the computer, connecting to an external storage service like R2. Requires bucket name and access credentials. ```typescript // --- FUSE mounts --- await client.createFuseMount(computer.id, { kind: "r2", bucket: "my-bucket", access_key_id: "AKID", secret_access_key: "SECRET", target_path: "/home/node/mnt", }); ``` -------------------------------- ### Create and manage share links Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Generate time-limited URLs for browser or VNC access without login. Use `ls` to list, `create` to generate, and `rm` to revoke. ```bash # List existing shares computer shares ls my-dev-box computer shares ls my-dev-box --json # Create a share link valid for 24 hours computer shares create my-dev-box --expires 24h # Create a share link with VNC access that expires in 7 days computer shares create my-dev-box --vnc --expires 7d # Output: # share_xyz789 link # URL https://share.agentcomputer.ai/s/token123 # Expires 2024-11-08T12:00:00.000Z # Revoke a share computer shares rm my-dev-box share_xyz789 ``` -------------------------------- ### Public API Client - Create FUSE Mount Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Creates a FUSE mount on a computer, connecting to external storage. ```APIDOC ## Create FUSE Mount ### Description Creates a FUSE mount on a computer. ### Method `client.createFuseMount(computerId, options)` ### Parameters #### Path Parameters - **computerId** (string) - Required - The ID of the computer. #### Request Body - **kind** (string) - Required - The kind of FUSE mount (e.g., 'r2'). - **bucket** (string) - Required - The bucket name for the storage. - **access_key_id** (string) - Required - The access key ID for authentication. - **secret_access_key** (string) - Required - The secret access key for authentication. - **target_path** (string) - Required - The path on the computer where the mount will be created. ``` -------------------------------- ### snapshot ls Source: https://context7.com/agentcomputerai/computer-cli/llms.txt List snapshots for a computer. ```APIDOC ## `snapshot ls` — List computer snapshots ### Usage ```bash computer snapshot ls my-dev-box computer snapshot ls my-dev-box --json ``` ``` -------------------------------- ### Public API Client - Restore Snapshot Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Restores a snapshot into a new computer. ```APIDOC ## Restore Snapshot ### Description Restores a snapshot into a new computer. ### Method `client.restoreSnapshot(snapshotId, options)` ### Parameters #### Path Parameters - **snapshotId** (string) - Required - The ID of the snapshot to restore. #### Request Body - **handle** (string) - Required - The handle for the new computer. - **display_name** (string) - Required - The display name for the new computer. ### Response #### Success Response (200) - **computer** (object) - The newly created computer object. ``` -------------------------------- ### List All Computers Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Retrieve a list of all managed computers. Supports both a human-readable table view and JSON output for scripting purposes. ```bash computer ls ``` ```bash computer ls --json ``` -------------------------------- ### Instantiate Public API Client Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Instantiates the public API client with a base URL and access token. An optional custom fetch implementation can be provided. ```typescript import { createPublicApiClient, PublicApiError } from "@microagentcomputer/public-api-client"; // Instantiate the client const client = createPublicApiClient({ baseUrl: "https://api.agentcomputer.ai", accessToken: "ak_live_abc123", // or an async function: () => Promise fetch, // optional custom fetch implementation }); ``` -------------------------------- ### Manage published app ports Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Expose internal VM ports as public or private URLs. Use `ls` to list, `publish` to expose, and `rm` to unpublish. ```bash # List published ports computer ports ls my-dev-box # Publish port 3000 publicly computer ports publish my-dev-box 3000 --name "web-app" # Publish port 5432 as private computer ports publish my-dev-box 5432 --name "postgres" --private # Unpublish a port computer ports rm my-dev-box 3000 ``` -------------------------------- ### aicomputer CLI Utility Commands Source: https://github.com/agentcomputerai/computer-cli/blob/main/apps/cli/README.md Utility commands for user identification, opening connections, and synchronizing files. ```bash computer whoami ``` ```bash computer open my-box ``` ```bash computer ssh my-box ``` ```bash computer sync ./my-project ``` -------------------------------- ### shares create Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Create time-limited URLs that grant browser (and optionally VNC) access to a computer without requiring a login. ```APIDOC ## `shares create` — Create a share link Generate time-limited URLs that grant browser (and optionally VNC) access to a computer without requiring a login. ### Usage ```bash # Create a share link valid for 24 hours computer shares create my-dev-box --expires 24h # Create a share link with VNC access that expires in 7 days computer shares create my-dev-box --vnc --expires 7d ``` ### Response Example (Success) ``` share_xyz789 link URL https://share.agentcomputer.ai/s/token123 Expires 2024-11-08T12:00:00.000Z ``` ``` -------------------------------- ### mount attach Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Attach cloud storage buckets (S3, GCS, R2, WebDAV) as filesystem paths inside a running computer via rclone FUSE. ```APIDOC ## `mount attach` — Attach cloud storage Attach S3-compatible, GCS, Cloudflare R2, or WebDAV buckets as filesystem paths inside a running computer via rclone FUSE. ### Usage ```bash # Attach a Cloudflare R2 bucket (default kind) computer mount attach my-dev-box \ --bucket my-r2-bucket \ --access-key AKID_xxx \ --secret-key SECRET_xxx # Attach an S3 bucket with custom path and region computer mount attach my-dev-box \ --kind s3 \ --bucket my-s3-bucket \ --access-key AKID_xxx \ --secret-key SECRET_xxx \ --region us-east-1 \ --path /home/node/data \ --read-only # Attach a WebDAV remote computer mount attach my-dev-box \ --kind webdav \ --bucket / \ --access-key user \ --secret-key pass \ --endpoint https://webdav.example.com ``` ``` -------------------------------- ### Restore a snapshot into a new computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Restores a snapshot into a new computer, optionally specifying a handle and name. Can also output in JSON format. ```bash computer snapshot restore snap_abc123 computer snapshot restore snap_abc123 restored-box --name "Restored Dev Box" computer snapshot restore snap_abc123 --json ``` -------------------------------- ### Create an access session Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Creates a new access session for a computer, returning a URL to access it via a browser. ```typescript // --- Access sessions --- const { session } = await client.createAccessSession(computer.id, { kind: "browser" }); console.log(session.access_url); // open in browser ``` -------------------------------- ### Move a computer to another workspace Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Transfers ownership of a computer to a different Clerk organization. Use `--json` for JSON output. ```bash computer transfer my-dev-box --to org_clerkOrgId123 computer transfer comp_abc123 --to org_clerkOrgId123 --json ``` -------------------------------- ### aicomputer CLI Computer Management Commands Source: https://github.com/agentcomputerai/computer-cli/blob/main/apps/cli/README.md Commands for managing computer resources, including creation, listing, retrieval, and power control. ```bash computer create my-box ``` ```bash computer ls ``` ```bash computer get my-box ``` ```bash computer power-off my-box ``` ```bash computer power-on my-box ``` -------------------------------- ### Public API Client - Create Link Share Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Creates a shareable link for a computer. ```APIDOC ## Create Link Share ### Description Creates a shareable link for a computer. ### Method `client.createLinkShare(computerId, options)` ### Parameters #### Path Parameters - **computerId** (string) - Required - The ID of the computer to share. #### Request Body - **allow_browser** (boolean) - Optional - Whether to allow access via browser. - **allow_vnc** (boolean) - Optional - Whether to allow access via VNC. - **expires_at** (string) - Optional - The ISO 8601 timestamp when the share expires. ### Response #### Success Response (200) - **share** (object) - The share object. - **share_url** (string) - The URL to access the share. ``` -------------------------------- ### Create a link share Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Creates a shareable link for accessing the computer, with options to allow browser access and set an expiration time. ```typescript // --- Shares --- const { share } = await client.createLinkShare(computer.id, { allow_browser: true, allow_vnc: false, expires_at: new Date(Date.now() + 24 * 60 * 60_000).toISOString(), }); console.log(share.share_url); ``` -------------------------------- ### Set API Key environment variable Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Sets the API key for authentication using the COMPUTER_API_KEY environment variable. An alias AGENTCOMPUTER_API_KEY is also provided. ```bash # API key (takes precedence over stored key in ~/.computer/config.json) export COMPUTER_API_KEY="ak_live_abc123" export AGENTCOMPUTER_API_KEY="ak_live_abc123" # alias ``` -------------------------------- ### Execute a command Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Executes a command within the computer's environment. The command is provided as an array of strings. Standard output is returned. ```typescript // --- Exec --- const exec = await client.execCommand(computer.id, { command: ["bash", "-c", "echo $HOSTNAME"], }); console.log(exec.stdout.trim()); ``` -------------------------------- ### mount ls Source: https://context7.com/agentcomputerai/computer-cli/llms.txt List current FUSE mounts for a computer. ```APIDOC ## `mount ls` — List current mounts ### Usage ```bash computer mount ls my-dev-box computer mount ls my-dev-box --json ``` ``` -------------------------------- ### Inspect computer images Source: https://context7.com/agentcomputerai/computer-cli/llms.txt List all available images or show details for a specific image. Use `--json` for JSON output. ```bash # List all available images computer image ls computer image ls --json # Show details for a specific image computer image get img_abc123 computer image get img_abc123 --json ``` -------------------------------- ### Restore a snapshot into a new computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Restores a snapshot into a new computer, optionally specifying a handle and display name, or outputting in JSON format. ```APIDOC ## Restore Snapshot ### Description Restores a snapshot into a new computer. ### Method CLI Command ### Endpoint computer snapshot restore ### Parameters #### Path Parameters - **snapshot_id** (string) - Required - The ID of the snapshot to restore. - **handle** (string) - Optional - The handle for the new computer. #### Query Parameters - **name** (string) - Optional - The display name for the new computer. - **json** (boolean) - Optional - Output in JSON format. ``` -------------------------------- ### shares ls Source: https://context7.com/agentcomputerai/computer-cli/llms.txt List existing share links for a computer. ```APIDOC ## `shares ls` — List existing shares ### Usage ```bash computer shares ls my-dev-box computer shares ls my-dev-box --json ``` ``` -------------------------------- ### Public API Client - Create Access Session Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Creates an access session for a computer, allowing connection via browser. ```APIDOC ## Create Access Session ### Description Creates an access session for a computer. ### Method `client.createAccessSession(computerId, options)` ### Parameters #### Path Parameters - **computerId** (string) - Required - The ID of the computer for which to create a session. #### Request Body - **kind** (string) - Required - The kind of session ('browser'). ### Response #### Success Response (200) - **session** (object) - The access session object. - **access_url** (string) - The URL to access the session. ``` -------------------------------- ### Public API Client - List Computers Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Retrieves a list of all computers associated with the account. ```APIDOC ## List Computers ### Description Retrieves a list of all computers. ### Method `client.listComputers()` ### Response #### Success Response (200) - **computers** (array) - An array of computer objects. ``` -------------------------------- ### Public API Client - Exec Command Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Executes a command on a computer. ```APIDOC ## Exec Command ### Description Executes a command on a computer. ### Method `client.execCommand(computerId, options)` ### Parameters #### Path Parameters - **computerId** (string) - Required - The ID of the computer. #### Request Body - **command** (array) - Required - The command and its arguments to execute (e.g., `['bash', '-c', 'echo $HOSTNAME']`). ### Response #### Success Response (200) - **stdout** (string) - The standard output of the command. ``` -------------------------------- ### Login to Agent Computer CLI Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Authenticate the CLI using various methods: browser-based OAuth, explicit API key, or reading from stdin. Use --force to overwrite existing credentials. ```bash computer login ``` ```bash computer login --api-key ak_live_abc123 ``` ```bash echo "ak_live_abc123" | computer login --stdin ``` ```bash computer login --force --api-key ak_live_newkey ``` -------------------------------- ### Stored Config Location (API Key) Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Indicates the default location for the configuration file, which stores the API key. The file is written with mode 0600 and the directory with mode 0700 for security. ```bash # ~/.computer/config.json — written with mode 0600, directory with mode 0700 ``` -------------------------------- ### Manage FUSE mounts Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Attach cloud storage buckets (S3, GCS, R2, WebDAV) as filesystem paths inside a computer using rclone FUSE. Use `ls` to list and `detach` to remove. ```bash # List current mounts computer mount ls my-dev-box computer mount ls my-dev-box --json # Attach a Cloudflare R2 bucket (default kind) computer mount attach my-dev-box \ --bucket my-r2-bucket \ --access-key AKID_xxx \ --secret-key SECRET_xxx # Attach an S3 bucket with custom path and region computer mount attach my-dev-box \ --kind s3 \ --bucket my-s3-bucket \ --access-key AKID_xxx \ --secret-key SECRET_xxx \ --region us-east-1 \ --path /home/node/data \ --read-only # Attach a WebDAV remote computer mount attach my-dev-box \ --kind webdav \ --bucket / \ --access-key user \ --secret-key pass \ --endpoint https://webdav.example.com # Detach a mount computer mount detach my-dev-box mnt_abc123 ``` -------------------------------- ### Override configuration directory Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Sets a custom directory for storing configuration and state files using the AGENTCOMPUTER_CONFIG_DIR environment variable. ```bash # Override SSH config/state directory (default: ~/.agentcomputer) export AGENTCOMPUTER_CONFIG_DIR="$HOME/.agentcomputer" ``` -------------------------------- ### Copy a local file or directory to a computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Uses SCP over SSH to sync files or directories. Destination is `/home/node/`. A picker is shown if `--computer` is omitted. ```bash # Sync a file to a specific computer computer sync ./my-script.sh --computer my-dev-box # Sync a directory; picker shown if --computer is omitted computer sync ./my-project/ ``` -------------------------------- ### Shell tab-completion Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Generates shell completion scripts for bash, zsh, and fish. ```APIDOC ## Shell Completion ### Description Generates shell completion scripts for various shells. ### Method CLI Command ### Endpoint computer completion ### Parameters #### Path Parameters - **shell** (string) - Required - The shell for which to generate completion script (e.g., bash, zsh, fish). ``` -------------------------------- ### sync Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Copy a local file or directory to a computer using SCP over the same edge-proxy SSH path. The destination is `/home/node/`. ```APIDOC ## `sync` — Copy a local file or directory to a computer Uses SCP over the same edge-proxy SSH path. Destination is `/home/node/`. ### Usage ```bash # Sync a file to a specific computer computer sync ./my-script.sh --computer my-dev-box # Sync a directory; picker shown if --computer is omitted computer sync ./my-project/ ``` ``` -------------------------------- ### aicomputer CLI Image Management Commands Source: https://github.com/agentcomputerai/computer-cli/blob/main/apps/cli/README.md Commands for managing computer images, including listing and retrieving image details. ```bash computer image ls ``` ```bash computer image get ``` -------------------------------- ### Public API Client - Create Published Port Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Publishes a port on a computer to be accessible externally. ```APIDOC ## Create Published Port ### Description Publishes a port on a computer. ### Method `client.createPublishedPort(computerId, options)` ### Parameters #### Path Parameters - **computerId** (string) - Required - The ID of the computer. #### Request Body - **port** (number) - Required - The port number to publish. - **name** (string) - Required - A name for the published port. - **visibility** (string) - Required - The visibility of the port ('public'). ``` -------------------------------- ### Public API Client - Delete Computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Deletes a specified computer. Returns immediately, but the operation may still be pending. ```APIDOC ## Delete Computer ### Description Deletes a specified computer. ### Method `client.deleteComputer(computerId)` ### Parameters #### Path Parameters - **computerId** (string) - Required - The ID of the computer to delete. ### Response #### Success Response (200) - **operation** (object) - An object representing the delete operation. ``` -------------------------------- ### Generate shell completion scripts Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Generates shell completion scripts for bash, zsh, and fish. The output should be redirected to the appropriate configuration file for your shell. ```bash computer completion bash >> ~/.bashrc computer completion zsh >> ~/.zshrc computer completion fish >> ~/.config/fish/completions/computer.fish ``` -------------------------------- ### image ls Source: https://context7.com/agentcomputerai/computer-cli/llms.txt List all available computer images. ```APIDOC ## `image ls` — List all available images ### Usage ```bash computer image ls computer image ls --json ``` ``` -------------------------------- ### Open an SSH session Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Provisions ephemeral SSH credentials and invokes the system `ssh` binary. Supports interactive shells, one-shot commands, and tmux sessions. ```bash # Interactive shell computer ssh my-dev-box # Interactive picker if no handle is specified computer ssh # Pass arbitrary SSH flags (port-forward, verbose) computer ssh my-dev-box -L 8080:localhost:8080 -v # Run a one-shot remote command (supports pipes on the local side) computer ssh my-dev-box -- ls -la /home/node computer ssh my-dev-box -- 'tail -n 50 /var/log/syslog' | grep error # Run a command via --cmd (no need for -- quoting) computer ssh my-dev-box --cmd "cat /etc/os-release" # Attach to (or create) a persistent tmux session computer ssh my-dev-box --tmux ``` -------------------------------- ### Authenticate OpenAI Codex on a Computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Authenticate OpenAI Codex on a specified computer, mirroring the functionality of `claude-login` for OpenAI's service. ```bash computer codex-login --computer my-dev-box ``` -------------------------------- ### Upgrade aicomputer CLI Source: https://github.com/agentcomputerai/computer-cli/blob/main/apps/cli/README.md Upgrades the aicomputer CLI to the latest version. ```bash computer upgrade ``` -------------------------------- ### Authenticate Claude Code on a Computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Set up Claude Code authentication on a target computer via SSH. Supports direct computer targeting or using a temporary helper computer. Use --verbose for diagnostics. ```bash computer claude-login --computer my-dev-box ``` ```bash computer claude-login ``` ```bash computer claude-login --keep-helper ``` ```bash computer claude-login --computer my-dev-box --verbose ``` -------------------------------- ### transfer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Move a computer to another workspace by transferring ownership to a different Clerk organization. ```APIDOC ## `transfer` — Move a computer to another workspace Transfers ownership to a different Clerk organization. ### Usage ```bash computer transfer my-dev-box --to org_clerkOrgId123 computer transfer comp_abc123 --to org_clerkOrgId123 --json ``` ``` -------------------------------- ### rm Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Permanently delete a computer and its storage. Prompts for confirmation unless `-y` is passed. ```APIDOC ## `rm` — Delete a computer Permanently deletes a computer and its storage. Prompts for confirmation unless `-y` is passed. ### Usage ```bash computer rm my-dev-box computer rm my-dev-box -y # skip confirmation computer -y rm my-dev-box # global --yes flag ``` ``` -------------------------------- ### Public API Client - Operate Computer Files Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Performs file operations (write, read, grep) on a computer. ```APIDOC ## Operate Computer Files ### Description Performs file operations on a computer. ### Method `client.operateComputerFiles(computerId, options)` ### Parameters #### Path Parameters - **computerId** (string) - Required - The ID of the computer. #### Request Body - **operation** (string) - Required - The file operation to perform ('write_text', 'read_text', 'grep'). - **path** (string) - Required - The path to the file or directory. - **content** (string) - Required for 'write_text' - The content to write to the file. - **pattern** (string) - Required for 'grep' - The pattern to search for. - **recursive** (boolean) - Optional for 'grep' - Whether to search recursively. ``` -------------------------------- ### Publish a port Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Publishes a port on the computer, making it accessible externally. The visibility can be set to 'public'. ```typescript // --- Published ports --- await client.createPublishedPort(computer.id, { port: 3000, name: "web", visibility: "public", }); ``` -------------------------------- ### ports Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Manage published app ports by exposing internal VM ports as public or private URLs. ```APIDOC ## `ports` — Manage published app ports Expose internal VM ports as public (or private) URLs. ### Usage ```bash # List published ports computer ports ls my-dev-box # Publish port 3000 publicly computer ports publish my-dev-box 3000 --name "web-app" # Publish port 5432 as private computer ports publish my-dev-box 5432 --name "postgres" --private # Unpublish a port computer ports rm my-dev-box 3000 ``` ``` -------------------------------- ### Grep inside a VM Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Performs a recursive grep operation within a specified directory on the computer. Returns an array of matches including path, line number, and the matched text. ```typescript // Grep inside the VM const grep = await client.operateComputerFiles(computer.id, { operation: "grep", path: "/home/node", pattern: "Hello", recursive: true, }); console.log(grep.matches); // [{ path: "...", line: 1, match: "Hello from the API!" }] ``` -------------------------------- ### Public API Client - Stop Computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Stops a specified computer. ```APIDOC ## Stop Computer ### Description Stops a specified computer. ### Method `client.stopComputer(computerId)` ### Parameters #### Path Parameters - **computerId** (string) - Required - The ID of the computer to stop. ``` -------------------------------- ### Override SSH/SCP binary paths Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Specifies custom paths for the SSH and SCP binaries using environment variables. ```bash # Override SSH/SCP binary paths export COMPUTER_SSH_BINARY="/usr/local/bin/ssh" export COMPUTER_SCP_BINARY="/usr/local/bin/scp" ``` -------------------------------- ### Handle API errors Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Demonstrates how to catch and handle API errors using a try-catch block. It checks if the error is an instance of PublicApiError and logs relevant details. ```typescript // --- Error handling --- try { await client.getComputer("nonexistent-id"); } catch (err) { if (err instanceof PublicApiError) { console.error(`API error ${err.status}: ${err.message} (code: ${err.code})`); } } ``` -------------------------------- ### Logout from Agent Computer CLI Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Remove stored API key credentials from the local configuration file. ```bash computer logout ``` -------------------------------- ### Delete a computer Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Permanently deletes a computer and its storage. Use `-y` or the global `--yes` flag to skip confirmation. ```bash computer rm my-dev-box computer rm my-dev-box -y # skip confirmation computer -y rm my-dev-box # global --yes flag ``` -------------------------------- ### aicomputer CLI Port Management Commands Source: https://github.com/agentcomputerai/computer-cli/blob/main/apps/cli/README.md Commands for managing network ports on computers. Ports are public by default, but can be made private requiring an access session. ```bash computer ports ls my-box ``` ```bash computer ports publish my-box 3000 --name my-app ``` ```bash computer ports publish my-box 3000 --name my-app --private ``` ```bash computer ports rm my-box 3000 ``` -------------------------------- ### Write text to a file Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Writes text content to a specified file path within the computer. Ensure the path and content are correctly formatted. ```typescript // --- File operations --- const result = await client.operateComputerFiles(computer.id, { operation: "write_text", path: "/home/node/hello.txt", content: "Hello from the API!\n", }); ``` -------------------------------- ### Override API base URL Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Overrides the default API base URL using the COMPUTER_API_URL environment variable. Useful for self-hosted or staging environments. ```bash # Override API base URL (useful for self-hosted or staging environments) export COMPUTER_API_URL="https://api.agentcomputer.ai" export AGENTCOMPUTER_API_URL="https://api.staging.agentcomputer.ai" ``` -------------------------------- ### Read text from a file Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Reads text content from a specified file path within the computer. The content will be available in the 'content' property of the result. ```typescript const read = await client.operateComputerFiles(computer.id, { operation: "read_text", path: "/home/node/hello.txt", }); console.log(read.content); // "Hello from the API!\n" ``` -------------------------------- ### Override ControlMaster Socket Directory Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Sets the directory for the ControlMaster socket. Useful for overcoming macOS path length limits. ```bash export AGENTCOMPUTER_CONTROL_DIR="/tmp" ``` -------------------------------- ### Override web dashboard URL Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Overrides the default web dashboard URL using the COMPUTER_WEB_URL environment variable. ```bash # Override web dashboard URL export COMPUTER_WEB_URL="https://agentcomputer.ai" ``` -------------------------------- ### aicomputer CLI Removal Command Source: https://github.com/agentcomputerai/computer-cli/blob/main/apps/cli/README.md Command to remove a computer resource. ```bash computer rm my-box ``` -------------------------------- ### mount detach Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Detach a FUSE mount from a computer. ```APIDOC ## `mount detach` — Detach a mount ### Usage ```bash computer mount detach my-dev-box mnt_abc123 ``` ``` -------------------------------- ### Override Remote Terminal Type Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Specifies the TERM environment variable forwarded to the remote VM. Defaults to auto-detected. ```bash export AGENTCOMPUTER_REMOTE_TERM="xterm-256color" ``` -------------------------------- ### Delete a snapshot Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Deletes a specified snapshot. ```bash computer snapshot rm snap_abc123 ``` -------------------------------- ### shares rm Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Revoke a share link for a computer. ```APIDOC ## `shares rm` — Revoke a share ### Usage ```bash computer shares rm my-dev-box share_xyz789 ``` ``` -------------------------------- ### Delete a snapshot Source: https://context7.com/agentcomputerai/computer-cli/llms.txt Deletes a specified snapshot. ```APIDOC ## Delete Snapshot ### Description Deletes a specified snapshot. ### Method CLI Command ### Endpoint computer snapshot rm ### Parameters #### Path Parameters - **snapshot_id** (string) - Required - The ID of the snapshot to delete. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.