---
title: "Cool Computers CLI"
description: "Publish sites, give one a VM, run commands, manage files, and keep a server running with the official Cool Computers CLI."
canonical: "https://www.cool.computer/docs/use/cli"
last_updated: "2026-11-20"
---
# Cool Computers CLI

> Publish sites, give one a VM, run commands, manage files, and keep a server running with the official Cool Computers CLI.

[Install the native CLI](/docs/agents/cli), then run `cool` by itself to open the account shell. Run a subcommand when you know the operation you need. `cool <command> --help` shows each command's arguments and flags.

## Sign in

Replace the email below with your address. `cool login` sends a code and signs you in; `cool signup` makes a new account the same way. Enter the code when prompted. Agents must [ask the owner before sending the email](/docs/api-reference/authentication).

```sh
cool login --email owner@example.com
```

`cool whoami` shows the signed-in account. `cool usage` shows the account's limits next to what it uses now; `cool usage --json` returns the `GET /api/usage` response.

## Publish a site

Publish files when you want to show something. `cool publish` is instant and needs no VM:

```sh
cool publish ./site --name bakery --visibility private
cool publish ./site --computer bakery
cool publish notes.html --name mynotes --visibility private
```

Without `--computer`, `cool publish` creates a new computer. With `--computer`, it publishes a new release to that computer. A single `.html` file is published as `index.html`. A new site is public unless you pass `--visibility private`; `cool share public bakery` opens it to everyone later. `cool releases bakery` lists the releases, and `cool releases promote bakery 2` makes an earlier one live again.

A `cool.json` at the site's root configures the site. `spa: true` serves `index.html` for unknown paths. `functions` names a bundled module that answers `/api/` at the edge, and `secrets` names the secret set its environment comes from. `run` and `port` start a server, which gives the computer a VM on first use.

Without signing in, `cool publish` creates a computer that is deleted after 24 hours. Keep it with `cool claim <claim-link>`, or publish to it again with `--claim <claim-link>`.

## Computers with a VM

A site has no VM until the work needs one: a server or bot that stays up, a scheduled job, or a long task. Give an existing site its VM, in place, or create a new computer that has one:

```sh
cool vm bakery
cool create bakery-api --visibility private
```

A VM is an always-on Ubuntu machine with `sudo`, at the same address. VMs need the Pro plan; see [pricing](/pricing). Giving a site a VM is one-way: afterwards `cool publish` to that site is refused, so change its files with `cool files` or `cool exec`. `cool create` returns once the computer runs and opens no shell.

```sh
cool list
cool info bakery
cool enter bakery
```

`cool enter bakery` opens the computer's terminal. Run `exit` to return to your local terminal.

## Run a command

`cool exec` runs a command on a computer with a VM. One word after the computer name is a shell line, run by bash. Two or more words are a program and its arguments, each passed exactly as written:

```sh
cool exec bakery 'cd app && npm test'
cool exec bakery -- npm test
```

Quote the whole line when it holds `&&` or `|`, or your local shell runs that part. Executions continue after a client disconnect or timeout. To reconnect, use the execution ID that `cool exec` prints:

```sh
cool exec --attach <execution-id>
```

Use a service for a process that must stay available at the computer's address.

## Run a service

```sh
cool service run bakery --port 3000 -- npm start
cool service logs bakery --tail 100 --timestamps
```

`cool service run` gives a site its VM if it has none, keeps one program running and restarts it when it crashes. With `--port`, the program answers at `bakery.cool.computer`. Once a port is exposed, the service answers every path, `/` included, except the site's functions, which keep `/api/`. The files in `/home/runtime/app` are no longer served as files, even after the port is removed, so the service serves its own static files. Run `cool service --help` to see show, restart, stop, and clear.

## Work with files

Run `cool files --help` for read, write, list, stat, directory, delete, upload, and download commands. `cool files list` and `cool files read` read a site's live release and never give it a VM. File changes on a computer with a VM stay on its disk when you disconnect.

## Email

Every computer has an inbox. `cool email bakery` lists its newest mail. See [Email your computer](/docs/use/email#read-and-send-mail-with-the-cli) for reading, sending, and replying.

## Machine-readable output

Commands that return structured records accept `--json`. Use it when a script or agent will read the result.
