# ghostdock CLI reference

<!-- Generated by `bun run sync:cli` from the CLI's command tree. Do not edit. -->

Every command the `ghostdock` CLI ships, with its full description and flags.
For how to install, log in and choose an organization, read [cli.md](cli.md). Concepts and
workflows are in the built-in skills (`ghostdock skill list`).

Binaries: `ghostdock`, `gdock`.
Global flag `--base-url`: API origin (overrides GHOSTDOCK_BASE_URL and the built-in default).
Global flag `--json`: Print the result as one JSON document on stdout, for scripts and agents. Without it, output is for people.

## `ghostdock completion`

Tab completion for commands, flags, VM names, containers and organizations.

### `ghostdock completion bash`

Print the bash completion script. `ghostdock completion install` adds it to ~/.bashrc (macOS: ~/.bash_profile).

```
ghostdock completion bash
```

### `ghostdock completion fish`

Print the fish completion script. `ghostdock completion install` writes it to ~/.config/fish/completions.

```
ghostdock completion fish
```

### `ghostdock completion install`

Set up tab completion for your shell: shows the one line it adds to the shell's startup file and asks first. Running it again changes nothing. Needs a global install: npx is not supported.

```
ghostdock completion install [shell] [flags]
```

| Argument | Description |
| --- | --- |
| `<shell>` | zsh, bash or fish. Default: your login shell ($SHELL). |
| `--yes` | Add it without asking. |

### `ghostdock completion powershell`

Print the powershell completion script. Add `ghostdock completion powershell | Out-String | Invoke-Expression` to your $PROFILE.

```
ghostdock completion powershell
```

### `ghostdock completion zsh`

Print the zsh completion script. `ghostdock completion install` adds it to ~/.zshrc.

```
ghostdock completion zsh
```

## `ghostdock docker`

Docker over the private network: a VM's Docker engine from this machine.

### `ghostdock docker context`

Point Docker at a VM's Docker engine over the private network: plain `docker` and `docker compose` then run there. Creates (or updates) the Docker context ghostdock-<org>-<vm> for tcp://<vm>.<org>.ghostdock.internal:2376 with a client certificate of this machine's device, and makes it the current context. Needs `ghostdock network connect` first, and Docker's CLI. The certificate lives 30 days; `network connect` and this command renew it with 10 days left. An expired certificate fails Docker's TLS handshake with Docker's own error: run this command again. Docker's `no such host` on a ghostdock.internal address means this machine is not connected: run `ghostdock network connect`. After an organization rename the old name stops resolving: run it again to update the host.

```
ghostdock docker context <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name, from `network vms`. Required. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |
| `--use` | Make it the current Docker context (`docker context use`). `--no-use` only creates or updates it. Default: `true`. |

## `ghostdock domain`

### `ghostdock domain attach`

Attach a custom domain to a provider. The organization’s stored domain keeps its certificate; a new one is added. Owner or admin. A domain the provider had is detached and kept. Returns the DNS records to create; then call domain check. certificatePlan says what it costs: reuse (its certificate, no order) or order (a new certificate, with allowance). A domain another provider uses is refused: domain detach it there first.

```
ghostdock domain attach <domain> --provider <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<domain>` | Custom domain, such as boxes.example.com (domain list). Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--provider <string>` | Provider name or id, from provider list. Required. |

MCP tool: `domain_attach`.

### `ghostdock domain check`

Check the DNS records of an attached custom domain against its provider. Owner or admin. Once they point at the provider, a stored certificate valid for more than 7 days is served at once; otherwise Let’s Encrypt is asked for one (status pending_ssl, then active). Call again until checks pass.

```
ghostdock domain check <domain> [flags]
```

| Argument | Description |
| --- | --- |
| `<domain>` | Custom domain, such as boxes.example.com (domain list). Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `domain_check`.

### `ghostdock domain delete`

Delete a custom domain and throw its certificate away. Owner or admin. Adding it again orders a new certificate, which counts toward Let’s Encrypt’s 5 per 168 h (see allowance in domain list). A domain a provider uses is refused unless confirmInUse: then it is detached first and that provider’s VM URLs stop.

```
ghostdock domain delete <domain> [flags]
```

| Argument | Description |
| --- | --- |
| `<domain>` | Custom domain, such as boxes.example.com (domain list). Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--confirm-in-use` | Required when a provider uses the domain: detaches it from that provider, then deletes it. |

MCP tool: `domain_delete`.

### `ghostdock domain detach`

Detach a custom domain from the provider that uses it. Owner or admin. Its VM URLs on that provider stop; the domain and its certificate stay, ready to be attached again without a new certificate.

```
ghostdock domain detach <domain> [flags]
```

| Argument | Description |
| --- | --- |
| `<domain>` | Custom domain, such as boxes.example.com (domain list). Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `domain_detach`.

### `ghostdock domain list`

List the organization’s custom domains and their certificates. Each domain is used by a provider or kept unused. Each has provider (null: unused, since unusedSince, its certificate kept), certificate (expiry), renewal (automatic; once_more: unused, renewed once more; stopped: unused and left to expire; manual: uploaded), renewsAt, lastIssuedAt, lastError, and allowance: how many new certificates Let’s Encrypt still issues for its name now (5 per 168 h), with nextAt when none is left.

```
ghostdock domain list [flags]
```

| Argument | Description |
| --- | --- |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `domain_list`.

## `ghostdock env`

Manage organization environment variables and secrets.

### `ghostdock env delete`

Delete a variable or secret.

```
ghostdock env delete <name> [flags]
```

| Argument | Description |
| --- | --- |
| `<name>` | Environment variable name. Required. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |

MCP tool: `env_delete`.

### `ghostdock env get`

Print one variable value in full (secrets cannot be read).

```
ghostdock env get <name> [flags]
```

| Argument | Description |
| --- | --- |
| `<name>` | Environment variable name. Required. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |

MCP tool: `env_get`.

### `ghostdock env list`

List variables and secrets.

```
ghostdock env list [flags]
```

| Argument | Description |
| --- | --- |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |

MCP tool: `env_list`.

### `ghostdock env set`

Create or replace a variable or secret.

```
ghostdock env set <name> [flags]
```

| Argument | Description |
| --- | --- |
| `<name>` | Environment variable name. Required. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |
| `--value <value>` | Value to store. |
| `--value-stdin` | Read the value from stdin — keeps secrets out of shell history. |
| `--secret` | Shorthand for --kind secret. Required when creating a secret. |
| `--kind <value>` | variable or secret. Required when creating; on an update, omit to keep the existing kind or pass the other to convert. |
| `--comment <value>` | Note about what this value is for. |

MCP tool: `env_set`.

## `ghostdock login`

Sign in and store a device access token for this machine and server (~/.config/ghostdock/servers/). Prints a URL to approve in the browser and waits for the approval. Agents, whose output is only seen once a command ends, run `login start`, show the URL to the user, then run `login finish`.

```
ghostdock login <command> [flags]
```

| Argument | Description |
| --- | --- |
| `--timeout <value>` | Max seconds to wait for approval (default 300). |
| `--org <value>` | Set this organization (id or slug) as the default once logged in. |
| `--code <value>` | Same as `login finish --code`. |
| `--wait` | No effect: waiting is the default. Kept for older scripts. |

### `ghostdock login finish`

Agent step 2: finish the login `login start` began. Waits until the user approves it in the browser (done at once when they already have); never starts a new login.

```
ghostdock login finish [flags]
```

| Argument | Description |
| --- | --- |
| `--timeout <value>` | Max seconds to wait for approval (default 300). |
| `--org <value>` | Set this organization (id or slug) as the default once logged in. |
| `--code <value>` | Redeem the one-time paste code the browser shows ("Having trouble? Show code") instead of waiting. |

### `ghostdock login start`

Agent step 1: print the sign-in URL and exit. Show the URL to the user, then run `login finish`. Run again before finishing, it prints the same URL.

```
ghostdock login start
```

## `ghostdock logout`

Revoke the device session and remove stored credentials.

```
ghostdock logout
```

## `ghostdock network`

The private network: reach your VMs by address and name from this machine.

### `ghostdock network connect`

Put this machine into the private network through one provider: WireGuard and split DNS. Also re-arms a paused device: with the tunnel up and nothing changed, without sudo.

```
ghostdock network connect [provider] [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id. Omit for the organization's default provider (else the platform default). Only its VMs are reachable; connecting through another replaces the connection. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |

### `ghostdock network devices`

Your devices in the private network.

```
ghostdock network devices <command>
```

### `ghostdock network devices remove`

Remove one of your devices from the private network.

```
ghostdock network devices remove <id>
```

| Argument | Description |
| --- | --- |
| `<id>` | Device id, from `network devices`. Required. |

### `ghostdock network disconnect`

Take this machine out of the private network, and remove split DNS an earlier connection left (macOS).

```
ghostdock network disconnect
```

### `ghostdock network status`

Whether this machine is connected, through which provider, and as which device.

```
ghostdock network status
```

### `ghostdock network vms`

VMs of an organization with their private addresses and names, and which are reachable through the current connection.

```
ghostdock network vms [flags]
```

| Argument | Description |
| --- | --- |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |

## `ghostdock organization`

Organizations you belong to.

### `ghostdock organization current`

Show which organization commands use, and where it comes from.

```
ghostdock organization current [flags]
```

| Argument | Description |
| --- | --- |
| `--org <value>` | Check what this --org would resolve to. |

### `ghostdock organization list`

List the organizations you belong to, with their ids and slugs.

```
ghostdock organization list
```

MCP tool: `organization_list`.

### `ghostdock organization use`

Set the default organization for commands run without --org (in every directory).

```
ghostdock organization use [org] [flags]
```

| Argument | Description |
| --- | --- |
| `<org>` | Organization id or slug. |
| `--clear` | Remove the default organization. |

## `ghostdock project`

Deployable projects, their deployments and environment.

### `ghostdock project create`

Create an empty project. Nothing is deployed until project publish.

```
ghostdock project create --display-name <string> [flags]
```

| Argument | Description |
| --- | --- |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--display-name <string>` | Project name. Required. |

MCP tool: `project_create`.

### `ghostdock project delete`

Permanently delete a project and everything it runs and stores. Every VM its deployments ran on goes (locked containers too), with its live URL, its CDN site, the stored uploads and generated files, its deployment history and its environment. Cannot be undone.

```
ghostdock project delete <project-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<project-id>` | Project id, from project list (project publish returns it too). Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `project_delete`.

### `ghostdock project deployment`

Deployments of a project.

### `ghostdock project deployment get`

Get one deploy attempt, with links to its stored files. fileUrls are authenticated GET paths for source.zip and generated Compose files.

```
ghostdock project deployment get <deployment-id> --project-id <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<deployment-id>` | Deployment id, from project deployment list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--project-id <string>` | Project id, from project list (project publish returns it too). Required. |

MCP tool: `project_deployment_get`.

### `ghostdock project deployment list`

List a project’s deploy attempts, newest first.

```
ghostdock project deployment list <project-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<project-id>` | Project id, from project list (project publish returns it too). Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `project_deployment_list`.

### `ghostdock project env`

Environment a project exports.

### `ghostdock project env delete`

Delete one of a project’s own variables or secrets.

```
ghostdock project env delete <name> --project-id <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<name>` | Environment variable name, e.g. DATABASE_URL. Letters, digits and underscores only. Case-sensitive; stored exactly as provided. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--project-id <string>` | Project id, from project list (project publish returns it too). Required. |

MCP tool: `project_env_delete`.

### `ghostdock project env get`

Get a project’s stored environment. Local entries (secret values withheld), organization opt-ins and bindings, applied on every deploy. platformEntries lists the variables Ghostdock gives every container of the VM a deploy runs in, so dev servers accept its URL host names (read the vm skill (`ghostdock skill get vm`)): for the VM serving the project, else the provider a deploy without providerId uses; none when the project is served from the CDN. overriddenBy is set when a project entry of the same name replaces one; a compose file’s own environment value wins inside that container. GHOSTDOCK_* names are reserved.

```
ghostdock project env get <project-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<project-id>` | Project id, from project list (project publish returns it too). Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `project_env_get`.

### `ghostdock project env select`

Replace the organization entries a project exports. Full replace: environment is the whole list ([] clears it), and omitting bindings clears the remaps. Read the environment skill (`ghostdock skill get environment`).

```
ghostdock project env select <project-id> --environment <array> [flags]
```

| Argument | Description |
| --- | --- |
| `<project-id>` | Project id, from project list (project publish returns it too). Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--environment <array>` | Organization catalogue entry names to export under their own names. (JSON array) Required. |
| `--bindings <array>` | Slot-centric org bindings. Omit to clear existing remaps. (JSON array) |

MCP tool: `project_env_select`.

### `ghostdock project env set`

Create or replace one of a project’s own variables or secrets. It overrides an organization entry or platform variable of the same name (GHOSTDOCK_* names are reserved). Prefer the CLI for secret values so they stay out of the conversation.

```
ghostdock project env set <name> --project-id <string> --value <string> --kind <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<name>` | Environment variable name, e.g. DATABASE_URL. Letters, digits and underscores only. Case-sensitive; stored exactly as provided. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--project-id <string>` | Project id, from project list (project publish returns it too). Required. |
| `--value <string>` | The value to store. A secret value can be replaced later but never read back. Required. |
| `--kind <string>` | "variable" or "secret". A secret value can be replaced but never read back. Required. |
| `--comment <string>` | Optional note shown with the entry, e.g. what it is for. |

MCP tool: `project_env_set`.

### `ghostdock project get`

Get a project with its latest attempt and live deployment. latestDeploymentId includes failures; liveDeploymentId / liveUrl is the success that serves the public URL.

```
ghostdock project get <project-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<project-id>` | Project id, from project list (project publish returns it too). Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `project_get`.

### `ghostdock project list`

List an organization’s projects. A project owns its environment, deployment history and live URL. site list lists sites instead.

```
ghostdock project list [flags]
```

| Argument | Description |
| --- | --- |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `project_list`.

### `ghostdock project publish`

Inspect local source with the deploy agent and publish to the CDN or a VM.

```
ghostdock project publish [path] [flags]
```

| Argument | Description |
| --- | --- |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |
| `--project-id <value>` | Existing project id. Omit to create a project. |
| `--replan` | Force a new planner run even when the stored spec still matches. |
| `--require-verify` | Fail the deploy (verify_failed) when detected tests fail. Default false: tests still run and are reported. |
| `--spec <value>` | JSON DeploymentSpec to execute on a fresh VM instead of planning. Mutually exclusive with --replan. |
| `--display-name <value>` | Optional display name. |
| `--tag <value>` | Optional caller tag (git SHA or free-form label) stored on the deployment. |
| `--lifecycle <value>` | Same as `vm up`: ephemeral, auto_delete (default) or keep. |
| `--idle-stop-minutes <value>` | Same as `vm up`. Omit for the 20-minute default. Pass -1 to keep it running. 0 is rejected. |
| `--auto-delete-days <value>` | Same as `vm up`: days stopped before the record is deleted (1–365). Omit for the 14-day default. |
| `--resources <value>` | Same as `vm up`: JSON { cpu, memoryGiB, diskGiB }. |
| `--environment <value>` | Same as `vm up --environment`: JSON { organization, bindings, local }. Required after awaiting_configuration. |
| `--auto-wake <value>` | Whether the published URL wakes a stopped VM, as `vm url set --wake`. Default true. |
| `--public <value>` | Whether the published URL is public (true) or for the organization (false), as `vm url set --access`. Default true; a publish never lowers a URL to organization. |
| `--provider <value>` | Same as `vm up`: provider name or id (omit for the organization default). |
| `--zip <value>` | Local ZIP of the source tree. |
| `<path>` | File or directory to publish (additional paths are allowed). |

MCP tool: `project_publish`.

### `ghostdock project redeploy`

Deploy a project’s stored source again, with its current environment. No new upload. Omit deploymentId to retry the last attempt that stored source. Same outcomes and settings as project publish; read the publishing skill (`ghostdock skill get publishing`).

```
ghostdock project redeploy <project-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<project-id>` | Project id, from project list (project publish returns it too). Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--deployment-id <string>` | Ship this version’s stored upload and spec. Omit to retry the last attempt that stored source. |
| `--require-verify` | When true, a failing verify step stops the deploy (verify_failed) and tears the VM down. Default false. |
| `--tag <string>` | Optional caller tag stored on the new deployment. Metadata only. |
| `--resources <object>` | Compute sizing. For image/dockerfile/compose: layered on platform defaults when omitted. For snapshot: optional override applied via resize after create. (JSON object) |
| `--idle-stop-minutes <number>` | Minutes of inactivity before the platform worker idle-stops the VM. -1: never stops for inactivity. 0 is rejected. Omit for the platform default. Provider-native timers are optional backup. A Container host in which no container runs also sleeps 5 minutes after the last one stopped; a Server (e.g. `vm up headless`) stops by this time alone. Timers and cron jobs are not activity: a Server whose work is only timers or cron jobs takes -1. |
| `--lifecycle <string>` | What happens when the VM stops. ephemeral: the VM and its disk are deleted, and it cannot be started again; a stop by the platform (host maintenance) keeps it. auto_delete (default): a stop keeps the disk, and the record goes autoDeleteDays after it. keep: a stop keeps the disk, and the record is never removed automatically. |
| `--auto-delete-days <integer>` | Days the VM stays stopped before the platform worker deletes the record (1–365). Omit for the platform default (14). Makes the VM auto_delete; not with keep or ephemeral. A container a person locked holds it. |
| `--provider <string>` | Provider name or id from provider list (not the provider kind). Omit to use the organization default (the org choice, else the platform default); if that provider lacks a capability this create needs, the first listed provider that accepts new VMs and has it is used. When no provider fits, the call fails with a not-configured error. |
| `--environment <object>` | Environment to give this VM. organization: names of organization entries (from env list) to export under their own names. bindings: remap org entries onto slot names ({ name: slot, organization: orgEntryName }). local: VM-only variables/secrets to create with the VM (kind required for each). Both land as ordinary process environment variables ($NAME / process.env.NAME); a local entry overrides an organization entry of the same name. When booting from an organization snapshot, omit organization/bindings/local to keep manifest env defaults, but still supply every name in requiredEnvironment (via organization, bindings, or local). Otherwise a VM gets nothing unless listed here. (JSON object) |
| `--auto-wake` | Same as urls[].autoWake on vm up. Default true for the minted URL. |
| `--public` | Whether the minted URL is public (anyone) or, false, organization (members only). Default true. |

MCP tool: `project_redeploy`.

### `ghostdock project update`

Rename a project.

```
ghostdock project update <project-id> --display-name <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<project-id>` | Project id, from project list (project publish returns it too). Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--display-name <string>` | New name. Null or empty clears it. Required. |

MCP tool: `project_update`.

## `ghostdock provider`

Providers of an organization.

### `ghostdock provider connect`

Start connecting your own server to Ghostdock as an Incus host or a Docker host. kind is incus (VMs as system containers in an Incus project of their own) or docker (VMs as containers next to the server’s Docker, with Sysbox). Owner or admin. Returns the new provider and its join: the secret setupCommand to run on that server as root, valid for one hour and one join. Then call provider verify. To finish an incomplete setup, get a new command with provider new-join instead of connecting again. Read the host-setup skill (`ghostdock skill get host-setup`) first.

```
ghostdock provider connect <kind> [flags]
```

| Argument | Description |
| --- | --- |
| `<kind>` | incus: VMs as system containers in an Incus project on the server (needs Incus 7, Linux 6.12, a ZFS or Btrfs pool). docker: VMs as containers next to Docker, with Sysbox. Required. |
| `--name <string>` | Name for the new provider. Optional. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `provider_connect`.

### `ghostdock provider disconnect`

Disconnect one of the organization’s own providers. Owner or admin. Fails while VMs or volumes still use it (volume delete them first). If organization snapshots live on it, the first call fails: pass confirmLinkedDeletion to delete them permanently. A Docker host that is not connected cannot delete its VMs and volumes: the first call fails, and confirmLinkedDeletion removes them from Ghostdock (whatever is still on the machine stays there). Also frees its custom domain; a default provider falls back to the platform default.

```
ghostdock provider disconnect <provider> [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id, from provider list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--confirm-linked-deletion` | Required when this provider still has organization snapshots, or VMs or volumes on a Docker host that is not connected. Permanently deletes those snapshots and removes those VMs and volumes from Ghostdock, then disconnects. |

MCP tool: `provider_disconnect`.

### `ghostdock provider list`

List the providers an organization can create VMs on. Includes its own connected providers and the platform providers it may use, in fallback order. Use an item id as provider. Only items with acceptsNewVms true take new VMs; an own provider stays incomplete until customDomain.status is active. defaultProviderId is the effective default. shadows and shadowed say an organization provider hides a platform provider of the same name, ignoring case. hostFolders are the folders a Docker or Incus host’s owner listed at setup (name, original path, readOnly), which volume create hostFolder picks from; null when the host predates host folders. Read the vm skill (`ghostdock skill get vm`) for the details.

```
ghostdock provider list [flags]
```

| Argument | Description |
| --- | --- |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `provider_list`.

### `ghostdock provider new-join`

Get a new setup command for a Docker or Incus host that is not connected. For when the first expired or the server was set up again. Owner or admin. Refused while the server is connected. Read the host-setup skill (`ghostdock skill get host-setup`).

```
ghostdock provider new-join <provider> [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id, from provider list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `provider_new_join`.

### `ghostdock provider rename`

Rename one of the organization’s own providers. Owner or admin. Platform providers cannot be renamed; names must be unique in the organization, ignoring case.

```
ghostdock provider rename <provider> --name <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id, from provider list. Required. |
| `--name <string>` | New name, unique in the organization ignoring case. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `provider_rename`.

### `ghostdock provider set-address`

Set the address an organization’s Docker or Incus host is reached at. For a machine people reach at another address than the one its agent connects from: behind NAT, a second address, or a dynamic DNS name. Owner or admin. An IPv4 address makes the custom domain’s traffic record an A record, an IPv6 address AAAA, a host name CNAME; provider list shows it as address (source set). null goes back to the connection’s address (source connection). Then check the domain (domain check).

```
ghostdock provider set-address <provider> --address <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id, from provider list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--address <string>` | An IPv4 or IPv6 address or a host name, such as 203.0.113.7 or home.example.net. null: the address the host connects from. Required. |

MCP tool: `provider_set_address`.

### `ghostdock provider set-auto-update`

Turn automatic updates of a provider on or off. Owner or admin. On (the default), it takes each new release by itself a day after it is published, the same way as provider update. Only for providers that provider status gives a release.

```
ghostdock provider set-auto-update <provider> --enabled <value> [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id, from provider list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--enabled` | true to update automatically, false to update only by hand. Required. |

MCP tool: `provider_set_auto_update`.

### `ghostdock provider set-default`

Set the provider used when a create omits provider. Applies to vm up, project publish and project redeploy. Pass an own connected provider or a platform provider that accepts new VMs; pass null (or platformDefaultProviderId) to follow the platform default. With decline, answers "no" to a Docker or Incus host’s setup question (setup step default in provider status): stored, so it is not asked again, and the default stays. Owner or admin.

```
ghostdock provider set-default <provider> [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id from provider list (own or platform), or null to follow the platform default. Passing platformDefaultProviderId also follows the platform default; it is never pinned. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--decline` | Do not make this Docker or Incus host the default, and do not ask again (its setup step default is then done). The default stays as it is. |

MCP tool: `provider_set_default`.

### `ghostdock provider status`

Show how a provider is doing: what is wrong now and where its release stands. failing lists the checks failing now, oldest first, with the VMs each affects; blocking ones stop new VMs once they have lasted. release says the current and latest release, its state (current, outdated, unsupported, blocked, unknown), canUpdate and autoUpdate. Kinds that report less leave failing empty and release null: platform providers.

```
ghostdock provider status <provider> [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id, from provider list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `provider_status`.

### `ghostdock provider update`

Update a provider to its newest release. Owner or admin. Only when provider status says canUpdate (today: Docker and Incus hosts). Returns the target version and updateId at once; the host downloads the release and replaces its own containers or instances in a minute or two, and VMs keep running. While it runs, provider status shows release.update with its step (download, replace, health) and progress. If the new release is not healthy within 5 minutes, it returns to the old one and provider status lists a docker-update or incus-update failure. provider update-list says how it ended; provider update-log has its log.

```
ghostdock provider update <provider> [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id, from provider list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `provider_update`.

### `ghostdock provider update-list`

List a provider’s last 20 updates, newest first. Each says by hand (with who) or automatic, from and to which version, when, and how it ended (running, updated, rolled_back, failed, lost) with the reason. hasLog says whether provider update-log has its log (hosts on a release with update logs). Today: Docker and Incus hosts.

```
ghostdock provider update-list <provider> [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id, from provider list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `provider_update_list`.

### `ghostdock provider update-log`

Show one of a provider’s updates with the host’s log of it. The log says what the host did: the download, the swap, the new release’s health report, and a rollback’s reason. A long log keeps its start and its end.

```
ghostdock provider update-log <provider> <update> [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id, from provider list. Required. |
| `<update>` | The update id, from provider update-list or provider update. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `provider_update_log`.

### `ghostdock provider verify`

Check or finish connecting a Docker or Incus host. Owner or admin. Runs the server's self-check, and a failure names what is wrong; with an active domain it also tries a VM URL from outside (reach). Read the host-setup skill (`ghostdock skill get host-setup`).

```
ghostdock provider verify <provider> [flags]
```

| Argument | Description |
| --- | --- |
| `<provider>` | Provider name or id, from provider list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `provider_verify`.

## `ghostdock registry`

Log in to the organization container registry.

### `ghostdock registry credentials`

Print registry host, username, and the one-hour password.

```
ghostdock registry credentials [flags]
```

| Argument | Description |
| --- | --- |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |
| `--provider <value>` | Provider name or id. Omit for the provider `vm up` would pick (org default, else platform default, else the first that fits). |

MCP tool: `registry_credentials`.

### `ghostdock registry login`

Fetch a one-hour password and run docker login --password-stdin.

```
ghostdock registry login [flags]
```

| Argument | Description |
| --- | --- |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |
| `--provider <value>` | Provider name or id. Omit for the provider `vm up` would pick (org default, else platform default, else the first that fits). |

## `ghostdock site`

Sites: static files on the CDN.

### `ghostdock site delete`

Permanently delete a site and its files. Its files leave the CDN, its URL answers 404, and its name is free again. A project’s deployment is the project’s: delete the project instead.

```
ghostdock site delete <site-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<site-id>` | Site id: the slug in the public URL, as returned by site publish or site list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `site_delete`.

### `ghostdock site list`

List the sites of an organization, last published first, with their URLs. owner is the identity that created a site (its token’s name, and its VM’s name for a VM’s identity); null for an ordinary site. bytes is what its files take on the CDN; null until measured. A site is static files on the CDN; each has a siteId to pass to site publish (to republish into it), site delete and site release. A token of reach own sees only its own sites.

```
ghostdock site list [flags]
```

| Argument | Description |
| --- | --- |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `site_list`.

### `ghostdock site publish`

Publish a site: local files, a directory or a ZIP, to the CDN. Without --site-id it creates a new site with its own URL; with it, it republishes into that site, keeping its URL.

```
ghostdock site publish [path] [flags]
```

| Argument | Description |
| --- | --- |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |
| `--site-id <value>` | Republish into this site (its id from site list or an earlier publish), keeping its URL: its files are replaced in place, never offline. Omit to create a new site. |
| `--display-name <value>` | Optional site display name. |
| `--zip <value>` | Local ZIP file to publish. |
| `<path>` | File or directory to publish (additional paths are allowed). |

MCP tool: `site_publish`.

### `ghostdock site release`

Release a site from the identity that created it. The owner is a VM’s identity or a token of reach own. It becomes an ordinary site of the organization and keeps its URL and files: the owner can no longer see or manage it, and it no longer counts against the owner’s budget. A member, or the owner itself.

```
ghostdock site release <site-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<site-id>` | Site id: the slug in the public URL, as returned by site publish or site list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `site_release`.

## `ghostdock skill`

List and read Agent Skills (same catalog as MCP skill://index.json).

### `ghostdock skill get`

Print one SKILL.md (URI from the discovery index, or a skill name).

```
ghostdock skill get <uri>
```

| Argument | Description |
| --- | --- |
| `<uri>` | skill:// URI, org/name, or skill name. Required. |

MCP tool: `skill_get`.

### `ghostdock skill list`

List the Agent Skills discovery index.

```
ghostdock skill list
```

MCP tool: `skill_list`.

## `ghostdock snapshot`

VM snapshots.

### `ghostdock snapshot create`

Save a VM’s filesystem as a reusable organization snapshot. The VM must be stopped, unless stopAndResume. Captures its URLs and environment into a manifest (secrets as required, without values). Waits up to ~120 seconds; if still pending it returns timedOut, then poll snapshot get. Setting secret values here is allowed; prefer the Ghostdock CLI so they stay out of the conversation.

```
ghostdock snapshot create <vm> --name <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--name <string>` | Snapshot name, unique in the organization. Required. |
| `--stop-and-resume` | When the VM is running: stop it, snapshot, then start it again. Without this it must already be stopped. |
| `--include-secret-values <array>` | Names of VM-local secrets whose values to embed in the snapshot. Organization secrets cannot be copied. (JSON array) |
| `--manifest <object>` | Replaces the captured URLs and environment entirely (no merge). Secret values are stored encrypted. (JSON object) |

MCP tool: `snapshot_create`.

### `ghostdock snapshot delete`

Permanently delete an organization snapshot (provider artifact and record).

```
ghostdock snapshot delete <snapshot-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<snapshot-id>` | Snapshot id from snapshot list (the provider snapshot name), its database id, or its name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `snapshot_delete`.

### `ghostdock snapshot get`

Get one snapshot with its manifest and required environment, URLs and MCPs. Returns a redacted manifest with requiredEnvironment / requiredUrls / requiredMcps. Poll it after snapshot create while status is pending.

```
ghostdock snapshot get <snapshot-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<snapshot-id>` | Snapshot id from snapshot list (the provider snapshot name), its database id, or its name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `snapshot_get`.

### `ghostdock snapshot list`

List the snapshots an organization can boot VMs from. Each item has status (pending, active, error), the provider that holds it (providerId; boot it there), vmCount, and a redacted manifest with requiredEnvironment / requiredUrls / requiredMcps.

```
ghostdock snapshot list [flags]
```

| Argument | Description |
| --- | --- |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `snapshot_list`.

### `ghostdock snapshot update-manifest`

Replace a snapshot’s manifest (URLs, environment, MCPs). Does not change the snapshot itself. Secret values in the body are stored encrypted; the response is redacted. Setting secret values here is allowed; prefer the Ghostdock CLI so they stay out of the conversation.

```
ghostdock snapshot update-manifest <snapshot-id> --manifest <object> [flags]
```

| Argument | Description |
| --- | --- |
| `<snapshot-id>` | Snapshot id from snapshot list (the provider snapshot name), its database id, or its name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--manifest <object>` | The new manifest; replaces the stored one. Secret values are stored encrypted. (JSON object) Required. |

MCP tool: `snapshot_update_manifest`.

## `ghostdock ssh-key`

SSH keys of your account, for logging in to Servers.

### `ghostdock ssh-key add`

Add an SSH public key to your account, for logging in to Servers. Without a file, asks which key of this machine to add, or generates a new one. Then `vm ssh` uses it, and plain ssh, scp, rsync and VS Code log in to the Servers of every organization you belong to; `vm ssh <vm> --print` shows the command and `--config` the block for ~/.ssh/config. ed25519, ecdsa, or RSA of at least 3072 bits; only the public key is sent.

```
ghostdock ssh-key add [file] [flags]
```

| Argument | Description |
| --- | --- |
| `<file>` | The public key file, e.g. ~/.ssh/id_ed25519.pub, or - to read it from stdin. Omit to choose one, or to generate a new one. |
| `--name <value>` | A name for the key, e.g. laptop. Default: the key's comment. |

MCP tool: `ssh_key_add`.

### `ghostdock ssh-key delete`

Remove an SSH key from your account. Logins with it stop at once.

```
ghostdock ssh-key delete <id>
```

| Argument | Description |
| --- | --- |
| `<id>` | Key id, from ssh-key list. Required. |

MCP tool: `ssh_key_delete`.

### `ghostdock ssh-key list`

List the SSH public keys of your account. With one of them, ssh <vm>--<org>@<host> (or <user>--<vm>--<org>@<host>) logs in to a Server of any of your organizations, without vm ssh; vm ssh --print answers that command as keyCommand, with what a client needs to use it.

```
ghostdock ssh-key list
```

MCP tool: `ssh_key_list`.

## `ghostdock template`

### `ghostdock template create`

Save a VM create request as a template of the organization. Its members and agents make it with `ghostdock vm up <name>`. spec is what vm up takes without the organization’s own things: system (what boots: headless, desktop, container-host or an OS image ref labelled ghostdock.os=true; omitted: the create’s default, a Container host when the template runs something, a headless Server when it does not), source (what runs on it: an image ref, Dockerfile, Compose files or a Compose reference; no snapshot), at least one of the two, and defaults (resources, lifecycle, restart, urls, mcps). Environment values stay out: a template that needs some declares them as ghostdock.env labels. A name the platform has too is allowed: the answer says shadows true, and the organization’s template wins for its members.

```
ghostdock template create --name <string> --title <string> --spec <object> [flags]
```

| Argument | Description |
| --- | --- |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--name <string>` | Short name, unique in the organization: lower-case words joined by hyphens, e.g. postgres-pgadmin. Required. |
| `--title <string>` | Title on the tile. Required. |
| `--description <string>` | What it is for, in a sentence or two. |
| `--instructions <string>` | Setup instructions in Markdown: what to prepare before a create (credentials, where to find them) and how to use the VM. Shown in Create VM, the gallery and `template get`; raw HTML is shown as text. |
| `--listed` | Offered in Create VM and template list (default true). false: a building block used by name only (vm up, another template), still shown on the templates page. |
| `--icon <string>` | An Iconify class the app bundles (i-simple-icons-postgresql, i-lucide-database) or an https image URL. Omit for the default icon. |
| `--spec <object>` | The create request: { system?, source?, resources?, idleStopMinutes?, lifecycle?, autoDeleteDays?, restart?, urls?, forwards?, mcps? }, the same fields vm up takes; system or source or both (container-host needs a source). A URL’s or forward’s target names a Compose service of the source, never a container. (JSON object) Required. |

MCP tool: `template_create`.

### `ghostdock template delete`

Delete a template of the organization by its name. VMs made from it keep running; a platform template it shadowed answers to the name again.

```
ghostdock template delete <template> [flags]
```

| Argument | Description |
| --- | --- |
| `<template>` | The organization’s template, by name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `template_delete`.

### `ghostdock template get`

Get one template by name, with what its source asks of a VM. Its spec (system and/or source plus defaults), and what vm up would read from the source (a system alone: from its OS image). manifest is the redacted manifest from the source’s ghostdock.* labels, derived now (never stored): a Dockerfile’s LABELs, the Compose files’ labels, a Compose reference’s override, an image’s own labels from its registry (digest says which). requiredEnvironment, requiredUrls and requiredMcps are what vm up must be given; manifestReason says why there is no manifest (none, invalid, or unreachable: the image’s registry could not be read). The organization’s template of that name, else the platform’s; platform true takes the platform’s.

```
ghostdock template get <template> [flags]
```

| Argument | Description |
| --- | --- |
| `<template>` | Template name from template list, e.g. postgres-pgadmin. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--platform` | Take the platform’s template of this name even when the organization has its own (shadows). |

MCP tool: `template_get`.

### `ghostdock template list`

List what to create a VM from: systems and templates. systems are ours (headless, desktop; scope system): vm up boots one by its name, and they are never templates. templates are the platform’s and the organization’s (nginx, …). The platform’s ready-made VMs and the organization’s own, each with scope (platform or organization), title, description and the create request it stands for (spec: system and/or source plus defaults such as URLs and resources; a template that names no system runs on a Container host). A name means the organization’s template first: one with shadows true hides the platform template of the same name (shadowed true), which vm up --platform still reaches. Create one with vm up. Templates with listed false (building blocks another template starts, such as github-actions-job-runner) are left out unless all is true; template get and vm up still take them by name.

```
ghostdock template list [flags]
```

| Argument | Description |
| --- | --- |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--all` | true: also the templates hidden from Create VM (listed false). |

MCP tool: `template_list`.

### `ghostdock template update`

Change a template of the organization by its name. The fields given replace the stored ones: spec replaces the whole create request, source only what it boots (the defaults stay). Platform templates are changed by platform admins only.

```
ghostdock template update <template> [flags]
```

| Argument | Description |
| --- | --- |
| `<template>` | The organization’s template, by name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--name <string>` | A new name; vm up answers to it only. |
| `--title <string>` | Title on the tile. |
| `--description <string>` | What it is for. |
| `--instructions <string>` | Setup instructions in Markdown; an empty string removes them. |
| `--listed` | Offered in Create VM and template list (default true). false: a building block used by name only (vm up, another template), still shown on the templates page. |
| `--icon <string>` | Iconify class or https image URL; null for the default icon. |
| `--spec <object>` | The whole create request, as template create takes it. (JSON object) |
| `--source <object>` | Only what the template boots (an image ref, a Dockerfile with its files, Compose files or a reference); its defaults stay. Not with spec. (JSON object) |

MCP tool: `template_update`.

## `ghostdock tools`

List available agent tools.

```
ghostdock tools
```

## `ghostdock update`

Update this CLI to the latest release. Only for an install by install.sh: Homebrew and npm update their own (`brew upgrade ghostdock`, `npm install -g ghostdock`).

```
ghostdock update [flags]
```

| Argument | Description |
| --- | --- |
| `--version <value>` | That version instead of the latest (MAJOR.MINOR.PATCH). |

## `ghostdock vm`

Create, run and manage VMs.

### `ghostdock vm budget`

An identity’s budget by kind, what it uses, and what is left. For an identity that manages only what it creates (a VM’s GHOSTDOCK_TOKEN, a token of reach own). budget is what it may create, by kind: vms { cpu, memoryGiB, diskGiB, count? } (cpu and memoryGiB: its VMs that run; diskGiB and count: all of them), sites { count?, sizeMiB? } (how many sites, and their files in MiB as the CDN holds them) and volumes { sizeGiB, count? } (their configured sizes together, attached or not); a kind it lacks it may not create. used is, per kind in the budget, what its owned rows and creates in flight hold now (vms: cpu, memoryGiB, diskGiB, count; sites: count, bytes; volumes: count, sizeGiB); remaining is what is left, counted as a create, a start, a growing republish or a volume resize checks it (count and sizeMiB only when the budget limits them). Without vm: the caller’s own budget, as a VM’s GHOSTDOCK_TOKEN or a token of reach own; a person or another token gets nulls. With vm: the budget of that VM’s identity, nulls when it has none. Read only.

```
ghostdock vm budget [vm] [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_budget`.

### `ghostdock vm build`

Create a VM from a local Dockerfile or Compose directory. Zips the directory (or takes --zip) and builds it on the provider; use it when the Dockerfile copies local files or the Compose project has build contexts.

```
ghostdock vm build [path] --kind <value> [flags]
```

| Argument | Description |
| --- | --- |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |
| `--kind <value>` | dockerfile or compose. Required. |
| `--provider <value>` | Provider name or id (omit for the organization default). |
| `--name <value>` | The VM’s name, what you type in every vm command: 3–30 lowercase letters, digits and single hyphens. Omit for a generated one. |
| `--display-name <value>` | Optional VM display name, a free label shown next to the name. |
| `--zip <value>` | Local ZIP of the build directory (Dockerfile or compose file at the zip root). |
| `<path>` | Build directory to zip and create from. |

### `ghostdock vm command`

Run commands in a VM and read their output.

### `ghostdock vm command get`

Get a shell command’s status and exit code.

```
ghostdock vm command get <command-id> --vm <string> --session-id <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<command-id>` | Command id returned by vm command run. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--vm <string>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--container <string>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--session-id <string>` | Session id returned by vm command run together with the commandId. Required. |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_command_get`.

### `ghostdock vm command kill`

Interrupt a running shell command.

```
ghostdock vm command kill <command-id> --vm <string> --session-id <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<command-id>` | Command id returned by vm command run. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--vm <string>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--container <string>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--session-id <string>` | Session id returned by vm command run together with the commandId. Required. |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_command_kill`.

### `ghostdock vm command logs`

Get a page of a shell command’s stdout and stderr.

```
ghostdock vm command logs <command-id> --vm <string> --session-id <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<command-id>` | Command id returned by vm command run. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--vm <string>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--container <string>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--session-id <string>` | Session id returned by vm command run together with the commandId. Required. |
| `--offset <integer>` | Character offset to continue reading from. Default 0. |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_command_logs`.

### `ghostdock vm command run`

Run a shell command in a VM. Waits up to 120 seconds, then returns sessionId and commandId to poll. Starts the VM when allowed. Sessions do not survive idle-stop: for a process that must keep running, read the vm-boot skill (`ghostdock skill get vm-boot`). Never put secret values in the command; it is logged.

```
ghostdock vm command run <vm> [container] --command <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<container>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--command <string>` | Shell command to run. Never include secret values: commands are logged. Required. |
| `--session-id <string>` | Session from vm shell create, to keep cwd and environment from earlier commands. Omit for a one-off session. |
| `--cwd <string>` | Directory to run the command in. |
| `--wait-seconds <number>` | Seconds to wait before returning handles to poll: 1 to 120, default 120. |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_command_run`.

### `ghostdock vm compose`

### `ghostdock vm compose down`

Remove a Compose project’s containers and networks (docker compose down). Its volumes are kept, and its folder (/srv/ghostdock/<project>: its Compose files and what it wrote next to them) too unless deleteFiles; a kept folder is listed in vm storage list’s projects as removed and deleted with vm storage delete kind project. Refused while one of its containers is locked (compose_project_locked): vm container unlock them first. Starts the VM when needed.

```
ghostdock vm compose down <vm> <project> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<project>` | Compose project, by name: a container’s project in vm container list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--delete-files` | Also delete the project’s folder after the down; filesDeleted says whether it went. |

MCP tool: `vm_compose_down`.

### `ghostdock vm compose restart`

Restart a Compose project’s containers (docker compose restart). Starts the VM when needed.

```
ghostdock vm compose restart <vm> <project> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<project>` | Compose project, by name: a container’s project in vm container list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_compose_restart`.

### `ghostdock vm compose start`

Start a Compose project’s stopped containers (docker compose start). Works for every project in the VM, also one brought up with docker compose through the Docker context. Starts the VM when needed.

```
ghostdock vm compose start <vm> <project> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<project>` | Compose project, by name: a container’s project in vm container list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_compose_start`.

### `ghostdock vm compose stop`

Stop a Compose project’s containers (docker compose stop). Each gets its own stop signal and timeout. They stay stopped while the VM sleeps and wakes, unless their restart policy is always. On a stopped VM it does nothing (note vm_stopped).

```
ghostdock vm compose stop <vm> <project> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<project>` | Compose project, by name: a container’s project in vm container list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_compose_stop`.

### `ghostdock vm container`

Containers of a VM’s Docker engine.

### `ghostdock vm container cp`

Copy files and folders between a container and this machine, as docker cp does. One side is container:path (web:/app; a path without a leading / is from the container's /), the other a local path, or - for a tar on stdout or stdin. Into an existing folder a copy keeps its name; elsewhere it takes the name given; a source ending in /. copies what is in it. Streamed, any size; in a stopped container too. What is copied in belongs to the container's root, as with docker cp. Starts the VM when needed.

```
ghostdock vm container cp <vm> <src> <dst> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list. Required. |
| `<src>` | What to copy: container:path, a local path, or - for a tar on stdin. Required. |
| `<dst>` | Where to: container:path, a local path, or - for a tar on stdout. Required. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |

MCP tool: `vm_container_cp`.

### `ghostdock vm container exec`

Run a command in a container, or open a shell in it, as docker exec does. Without a command: an interactive shell with a terminal (bash, else sh). With one after --: it runs there with this stdin, its output and its exit code, without a terminal (as docker exec -i). On any kind of VM; starts the VM when needed. --json runs a command through vm_container_exec and prints its result.

```
ghostdock vm container exec <vm> <container> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list. Required. |
| `<container>` | Container, by name, from vm container list. Required. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |

MCP tool: `vm_container_exec`.

### `ghostdock vm container list`

List the containers of a VM, running or not. Each with state, health, restart policy, ports, Compose project and service, its lock (locked, and whether a person or its ghostdock.lock label decided) and ghostdock.* labels. A stopped VM lists none (it is not started for this).

```
ghostdock vm container list <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_container_list`.

### `ghostdock vm container lock`

Lock a container against removal. A locked container cannot be removed, renamed or recreated through Docker (docker rm, compose down, a compose up that would recreate it) until it is unlocked here; start, stop and restart still work. It also pauses the VM’s auto-delete. Never starts the VM: a stopped one gets the lock at its next start.

```
ghostdock vm container lock <vm> <container> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<container>` | Container, by name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_container_lock`.

### `ghostdock vm container logs`

Read a container’s output, as docker logs does. Oldest first, each line with its stream (stdout, stderr) and time. The last tail lines (default 200), or with after only the lines after that time: pass the last line’s time to follow. truncated says lines were left out. A stopped VM has none (it is not started for this).

```
ghostdock vm container logs <vm> <container> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<container>` | Container, by name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--tail <integer>` | The last N lines (at most 5000). |
| `--after <string>` | Only lines after this time: the time of the last line already read. |
| `--follow` | Keep printing new lines until Ctrl-C. |
| `--timestamps` | Put each line's time in front of it. |

MCP tool: `vm_container_logs`.

### `ghostdock vm container remove`

Remove a container (docker rm -f). A running one is killed first. Its volumes are kept. A locked container is refused (container_locked): vm container unlock it first. Starts the VM when needed.

```
ghostdock vm container remove <vm> <container> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<container>` | Container, by name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_container_remove`.

### `ghostdock vm container restart`

Restart a container, as docker restart does (stopping as docker stop does). Starts the VM when needed.

```
ghostdock vm container restart <vm> <container> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<container>` | Container, by name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_container_restart`.

### `ghostdock vm container restart-policy`

Set a container’s restart policy (docker update --restart). Running or not. unless-stopped: Docker brings it back after a crash and when the VM wakes, unless it was stopped on purpose. no: never. A Compose project’s next recreate of the container takes the policy from its files again. Starts the VM when needed.

```
ghostdock vm container restart-policy <vm> <container> <policy> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<container>` | Container, by name. Required. |
| `<policy>` | unless-stopped or no. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_container_restart_policy`.

### `ghostdock vm container start`

Start a stopped container, as docker start does. A running container stays as it is. Starts the VM when needed.

```
ghostdock vm container start <vm> <container> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<container>` | Container, by name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_container_start`.

### `ghostdock vm container stop`

Stop a container, as docker stop does. It gets its own stop signal, then a kill after its own stop timeout. It stays stopped while the VM sleeps and wakes, as Docker keeps a stopped container stopped, unless its restart policy is always. On a stopped VM it does nothing (note vm_stopped). A lock does not block it. note last_running says it was the last one running: on a Container host commands and files have nowhere to land until one runs.

```
ghostdock vm container stop <vm> <container> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<container>` | Container, by name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_container_stop`.

### `ghostdock vm container unlock`

Unlock a container so Docker can remove or recreate it. Also one its image locked with the ghostdock.lock label. Never starts the VM: a stopped one gets it at its next start, and an overdue auto-delete it held goes ahead.

```
ghostdock vm container unlock <vm> <container> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<container>` | Container, by name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_container_unlock`.

### `ghostdock vm container up`

Add a container to a VM from a template, an image, a Compose file or a Dockerfile. Same sources as `vm up`, without --snapshot. It runs as its own Compose project next to the VM’s. An image or a Dockerfile is one container named after its service, or --name; a name in use gets the next free number (nginx-2). The source’s URLs and MCPs are made after it runs; a port with a URL or an MCP name the VM already has is refused.

```
ghostdock vm container up <vm> [template] [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list. Required. |
| `<template>` | Template name from template list, e.g. nginx. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |
| `--platform` | Take the platform’s template of this name even when the organization has its own. |
| `--image <value>` | Run an OCI image, e.g. redis:7. |
| `--compose <value>` | Run a local Compose file (one file, no build contexts; for those use ghostdock docker context). |
| `--dockerfile <value>` | Build and run a local Dockerfile (no build context). |
| `--source <value>` | Any source as JSON, e.g. a Compose reference: {"type":"compose","reference":"oci://…"}. |
| `--name <value>` | Name of the container (image, Dockerfile) or of the Compose project. Default: the service, else the template’s name. |
| `--restart <value>` | Restart policy of an image or a Dockerfile: unless-stopped (default), always, on-failure or no. |
| `--urls <value>` | Changes to the source’s URLs as JSON, keyed by port, e.g. [{"port":8080,"autoWake":true,"access":"public"}] or [{"port":80,"remove":true}]. |
| `--mcps <value>` | Changes to the source’s MCPs as JSON, keyed by name, e.g. [{"name":"tools","port":8000,"autoWake":true}]. |

MCP tool: `vm_container_up`.

### `ghostdock vm cp`

Copy files and folders between this machine and a VM, any size. One side is a local path (or - for a tar on stdin or stdout). The other is the Server, :/path, or a container, web:/path. A relative path, or ~/…, starts where vm file starts: the login user's home on the Server, the container's start folder in a container. :. or :~ is what is in the home. Into an existing folder a copy keeps its name; elsewhere it takes the name given; a source ending in /. copies what is in it. A Server path runs as the login user through the guest agent, so it works while sshd is down. A container path is docker cp, in a stopped container too. vm file carries at most 256 KiB per call; this is the stream past that. A secret belongs in vm env set, not in a file. Starts the VM when needed.

```
ghostdock vm cp <vm> <src> <dst> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list. Required. |
| `<src>` | What to copy: :path on the Server, container:path, a local path, or - for a tar on stdin. Required. |
| `<dst>` | Where to: :path on the Server, container:path, a local path, or - for a tar on stdout. Required. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |

### `ghostdock vm delete`

Permanently delete a VM and its files. Refused while it has locked containers (vm_has_locked_containers, naming them) unless deleteLocked is true. A VM whose identity still owns VMs or sites is refused (owns_resources, naming them by kind) unless ownedResources says what happens to them: delete them too (down the whole tree), or release them as ordinary ones of the organization.

```
ghostdock vm delete <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--delete-locked` | Delete it with its locked containers. Without it, a locked container refuses the delete. |
| `--owned-resources <string>` | For a VM whose identity owns VMs or sites: delete them too (and what they own in turn), or release them (they stay as ordinary ones of the organization, keeping their own identities). |

MCP tool: `vm_delete`.

### `ghostdock vm env`

Environment of one VM.

### `ghostdock vm env delete`

Delete one of a VM’s own variables or secrets.

```
ghostdock vm env delete <name> --vm <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<name>` | Environment variable name, e.g. DATABASE_URL. Letters, digits and underscores only. Case-sensitive; stored exactly as provided. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--vm <string>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--restart` | When true and the VM is running, stop then start after saving so processes pick up the change. Default: sync only. |

MCP tool: `vm_env_delete`.

### `ghostdock vm env get`

Get a VM’s environment: selections, bindings and local entries. Shows each organization entry with whether it is selected, exportAs, and overriddenByLocal; secret values are withheld. Nothing is inherited. platformEntries lists the variables Ghostdock gives every container so dev servers accept the VM’s URL host names (read the vm skill (`ghostdock skill get vm`)), with overriddenBy set when a VM entry of the same name replaces one. A container’s image or docker run -e can also set its own value; that wins inside that container. GHOSTDOCK_* names are reserved.

```
ghostdock vm env get <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_env_get`.

### `ghostdock vm env select`

Replace the organization entries a VM exports. Full replace: environment is the whole list ([] clears it), and omitting bindings clears the remaps. Running processes keep their old values until restarted (pass restart). Read the environment skill (`ghostdock skill get environment`).

```
ghostdock vm env select <vm> --environment <array> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--environment <array>` | Organization catalogue entry names to export under their own names. Pass [] to clear plain selections. (JSON array) Required. |
| `--bindings <array>` | Slot-centric org bindings: export an organization entry under a (possibly different) VM env name. Omit to clear existing remaps (full replace). (JSON array) |
| `--restart` | When true and the VM is running, stop then start after saving so processes pick up the change. Default: sync only; already-running processes keep the old values until restarted. |

MCP tool: `vm_env_select`.

### `ghostdock vm env set`

Create or replace one of a VM’s own variables or secrets. It overrides an organization entry or platform variable of the same name (GHOSTDOCK_* names are reserved). kind is required when creating. Setting secrets via this tool is allowed; prefer the Ghostdock CLI so values stay out of the conversation, and never put them in commands.

```
ghostdock vm env set <name> --vm <string> --value <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<name>` | Environment variable name, e.g. DATABASE_URL. Letters, digits and underscores only. Case-sensitive; stored exactly as provided. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--vm <string>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--value <string>` | The value to store. A secret value can be replaced later but never read back. Required. |
| `--kind <string>` | Required when creating. Use "secret" for credentials; secret values can be replaced but never read back. Omit when updating to keep the existing kind. |
| `--comment <string>` | Optional note shown with the entry, e.g. what it is for. |
| `--restart` | When true and the VM is running, stop then start after saving so processes pick up the change. Default: sync only. |

MCP tool: `vm_env_set`.

### `ghostdock vm file`

### `ghostdock vm file delete`

Delete a file, or with recursive a folder and what is in it. A path that is not there is already deleted. /, the login user’s home and a folder above it are never deleted. No container on a Server is the VM’s own files, as its login user (the same person ssh would be). A container name is that container: a list, delete, move or mkdir as its user, a read or a write as docker cp does it. These tools move files, not credentials. A secret belongs in `vm env set`, not in a file.

```
ghostdock vm file delete <vm> <path> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<path>` | Path on the VM. An absolute path lands where it says. A relative path, or ~/…, starts in the target’s start folder: the login user’s home on the Server (as ssh starts there), the container’s start dir in a container. An answer names a path in the home as ~/…, which you can pass back. A path with .. is refused. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--recursive` | Delete a folder and what is in it. Omit to delete a file. |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_file_delete`.

### `ghostdock vm file list`

List one level of a folder. No container on a Server is the VM’s own files, as its login user (the same person ssh would be). A container name is that container: a list, delete, move or mkdir as its user, a read or a write as docker cp does it. A folder whose listing is over 256 KiB is refused: list a folder below it. These tools move files, not credentials. A secret belongs in `vm env set`, not in a file.

```
ghostdock vm file list <vm> <path> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<path>` | Path on the VM. An absolute path lands where it says. A relative path, or ~/…, starts in the target’s start folder: the login user’s home on the Server (as ssh starts there), the container’s start dir in a container. An answer names a path in the home as ~/…, which you can pass back. A path with .. is refused. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--wake` | false: a stopped VM is not started, and the list fails (tab completion). Default true. |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_file_list`.

### `ghostdock vm file mkdir`

Create a folder, and the folders above it. An existing folder is left as it is. No container on a Server is the VM’s own files, as its login user (the same person ssh would be). A container name is that container: a list, delete, move or mkdir as its user, a read or a write as docker cp does it. These tools move files, not credentials. A secret belongs in `vm env set`, not in a file.

```
ghostdock vm file mkdir <vm> <path> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<path>` | Path on the VM. An absolute path lands where it says. A relative path, or ~/…, starts in the target’s start folder: the login user’s home on the Server (as ssh starts there), the container’s start dir in a container. An answer names a path in the home as ~/…, which you can pass back. A path with .. is refused. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_file_mkdir`.

### `ghostdock vm file move`

Move or rename a file or folder. It lands at exactly destination, creating its parent folders, and never replaces what is at destination and never moves into a folder there. Both paths are on the same target, and a relative path uses its start folder. No container on a Server is the VM’s own files, as its login user (the same person ssh would be). A container name is that container: a list, delete, move or mkdir as its user, a read or a write as docker cp does it. These tools move files, not credentials. A secret belongs in `vm env set`, not in a file.

```
ghostdock vm file move <vm> <path> <destination> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<path>` | Path on the VM. An absolute path lands where it says. A relative path, or ~/…, starts in the target’s start folder: the login user’s home on the Server (as ssh starts there), the container’s start dir in a container. An answer names a path in the home as ~/…, which you can pass back. A path with .. is refused. Required. |
| `<destination>` | Where to move it. The same rules as path: absolute, or relative to the target’s start folder. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_file_move`.

### `ghostdock vm file read`

Read one file: utf8 text, or base64 when the bytes are binary. No container on a Server is the VM’s own files, as its login user (the same person ssh would be). A container name is that container: a list, delete, move or mkdir as its user, a read or a write as docker cp does it. At most 256 KiB, which is as much as one tool call can carry. A larger file is `ghostdock vm cp`. A folder is vm file list. These tools move files, not credentials. A secret belongs in `vm env set`, not in a file.

```
ghostdock vm file read <vm> <path> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<path>` | Path on the VM. An absolute path lands where it says. A relative path, or ~/…, starts in the target’s start folder: the login user’s home on the Server (as ssh starts there), the container’s start dir in a container. An answer names a path in the home as ~/…, which you can pass back. A path with .. is refused. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_file_read`.

### `ghostdock vm file write`

Write one file, creating its parent folders. content is utf8, or base64 when encoding is base64. A new file is 0644; an existing one keeps its mode, so a script stays executable, and a link to a file writes that file. No container on a Server is the VM’s own files, as its login user (the same person ssh would be). A container name is that container: a list, delete, move or mkdir as its user, a read or a write as docker cp does it. At most 256 KiB, which is as much as one tool call can carry. A larger file is `ghostdock vm cp`. These tools move files, not credentials. A secret belongs in `vm env set`, not in a file.

```
ghostdock vm file write <vm> <path> --content <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<path>` | Path on the VM. An absolute path lands where it says. A relative path, or ~/…, starts in the target’s start folder: the login user’s home on the Server (as ssh starts there), the container’s start dir in a container. An answer names a path in the home as ~/…, which you can pass back. A path with .. is refused. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--content <string>` | The file’s bytes: utf8 text, or base64 when encoding is base64. Required. |
| `--encoding <string>` | How to read content. Omit for utf8. base64 for bytes that are not text. |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_file_write`.

### `ghostdock vm forward`

### `ghostdock vm forward delete`

Remove the forward of a VM port. The VM stops listening on it.

```
ghostdock vm forward delete <vm> <port> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<port>` | The forward’s VM port. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_forward_delete`.

### `ghostdock vm forward list`

List a VM’s forwards: VM ports that reach a container’s port. Each reads like VM :8080 → web:80; a port the VM could not listen on carries its error.

```
ghostdock vm forward list <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_forward_list`.

### `ghostdock vm forward set`

Forward a VM port to a container’s port, or point its forward elsewhere. Works at any time; the container is not touched or restarted, and needs no published port. The VM then answers on that port for apps on the host network (localhost), the private network and URLs. The forward stays when the container is recreated under the same name. docker ps does not list it. Needs a VM on the current base image. One forward per VM port, keyed by it. Creates it when missing (container and containerPort needed), applies the fields given and keeps the others; the answer says created true or false. Safe to repeat.

```
ghostdock vm forward set <vm> <port> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<port>` | VM port to listen on. Not 22, 2375, 2376 or 10031. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | Container to reach, by name from vm container list. Needed for a new forward. |
| `--container-port <integer>` | The container’s port. Needed for a new forward. |

MCP tool: `vm_forward_set`.

### `ghostdock vm list`

List the VMs of an organization, with their lifecycle and deadlines. Each has a name (e.g. quiet-harbor, or one chosen at vm up such as api), unique in the organization, that every VM tool accepts as `vm`, and maybe a displayName, a free label. disk is each VM’s last disk reading (at most minutes old; vm status reads it now).

```
ghostdock vm list [flags]
```

| Argument | Description |
| --- | --- |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_list`.

### `ghostdock vm mcp`

MCP endpoints a VM exposes.

### `ghostdock vm mcp delete`

Delete a VM’s MCP endpoint, by name. Its URL stays.

```
ghostdock vm mcp delete <vm> <name> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<name>` | Endpoint name, from vm mcp list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_mcp_delete`.

### `ghostdock vm mcp list`

List the MCP endpoints a VM exposes (name, port, path, autoWake).

```
ghostdock vm mcp list <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_mcp_list`.

### `ghostdock vm mcp set`

Expose an MCP server in a VM by name, or change the endpoint of that name. Keyed by VM and name. Creates it when missing (port needed), applies the fields given and keeps the others; the answer says created true or false. Safe to repeat. A new endpoint also gets an Organization URL on its port when the port has none.

```
ghostdock vm mcp set <vm> <name> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<name>` | Endpoint name, unique in the VM. Letters, digits, _ and -, starting with a letter. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--port <integer>` | Port the MCP server listens on inside the VM. Needed to create the endpoint. |
| `--path <string>` | HTTP path of the MCP endpoint. Default /mcp for a new endpoint. |
| `--wake` | Start the VM when the endpoint is called while it is stopped. Default false for a new endpoint. |
| `--rename <string>` | A new name for the endpoint. For one that does not exist yet: the name it gets. |

MCP tool: `vm_mcp_set`.

### `ghostdock vm release`

Release a VM from the identity that created it. The owner is a VM’s identity or a token of reach own. The VM becomes an ordinary VM of the organization, still running with its disk, URLs and lifecycle: the owner can no longer see or manage it, and it no longer counts against the owner’s budget. A VM that has an identity keeps it and what it owns. A member, or the owner itself.

```
ghostdock vm release <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_release`.

### `ghostdock vm resize`

Change a VM’s CPU and/or memory. While running only increases are allowed; stop it first to decrease (this tool does not stop it). Disk: vm resize-disk.

```
ghostdock vm resize <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--cpu <number>` | Number of CPUs. |
| `--memory-gib <number>` | Memory in GiB. |

MCP tool: `vm_resize`.

### `ghostdock vm resize-disk`

Grow a VM’s disk. The VM must be stopped first (this tool does not stop it). Disk only grows, never shrinks.

```
ghostdock vm resize-disk <vm> --disk-gib <number> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--disk-gib <number>` | New total disk size in GiB; must be larger than the current size. Required. |

MCP tool: `vm_resize_disk`.

### `ghostdock vm restart`

Restart a VM, keeping it: an ephemeral VM is not deleted. A stopped VM is only started. Attached disks attach and detach at a start (vm volume attach, vm volume detach); shared folders change live and need no restart. Returns what vm start returns.

```
ghostdock vm restart <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_restart`.

### `ghostdock vm share-link`

Share links: a port without signing in, until they expire.

### `ghostdock vm share-link delete`

Revoke a share link at once. Open connections through it close.

```
ghostdock vm share-link delete <vm> <port> <name> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<port>` | The target’s port: a port of the VM, or of the container when one is named. On the command line: `port` or `container:port`. Required. |
| `<name>` | The link’s name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | The target’s container, by name from vm container list (its own port, no published port needed; needs a VM on the current base image). Omit or null for a port of the VM itself. On the command line: `container:port`. |

MCP tool: `vm_share_link_delete`.

### `ghostdock vm share-link list`

List a VM’s share links, or those of one port. Each has its name, address, expiry, wake and last use; expired links stay listed for 30 days after they expire, then are deleted.

```
ghostdock vm share-link list <vm> [port] [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<port>` | The target’s port: a port of the VM, or of the container when one is named. On the command line: `port` or `container:port`. Omit: every port. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | The target’s container, by name from vm container list (its own port, no published port needed; needs a VM on the current base image). Omit or null for a port of the VM itself. On the command line: `container:port`. Omit with port omitted: every link of the VM. |

MCP tool: `vm_share_link_list`.

### `ghostdock vm share-link replace`

Give a share link a new address (token). The old address stops at once and open connections through it close; name, expiry and wake stay.

```
ghostdock vm share-link replace <vm> <port> <name> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<port>` | The target’s port: a port of the VM, or of the container when one is named. On the command line: `port` or `container:port`. Required. |
| `<name>` | The link’s name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | The target’s container, by name from vm container list (its own port, no published port needed; needs a VM on the current base image). Omit or null for a port of the VM itself. On the command line: `container:port`. |

MCP tool: `vm_share_link_replace`.

### `ghostdock vm share-link set`

Make a named share link to an HTTP port, or change the link of that name. https://{token}--share.{domain} opens the port of the VM or container without signing in until it expires or is deleted, for example a preview in an iframe; treat it as a secret. The port needs no URL. Creates it when missing (defaults: expires 60 minutes after its last use, 7 days at most, wakes the VM), else applies the fields given and keeps the others; the answer says created true or false. Safe to repeat: use one fixed name per purpose. Sending an expiry setting (idleMinutes, maxLifetimeMinutes) restarts both clocks from now, also for an expired link: the same address works again; a call without one keeps them. At most 50 links per port.

```
ghostdock vm share-link set <vm> <port> <name> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<port>` | The target’s port: a port of the VM, or of the container when one is named. On the command line: `port` or `container:port`. Required. |
| `<name>` | The link’s name, unique per port, for example who it is for. It finds the link again. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | The target’s container, by name from vm container list (its own port, no published port needed; needs a VM on the current base image). Omit or null for a port of the VM itself. On the command line: `container:port`. |
| `--idle <integer>` | Minutes without use before the link expires; each use pushes it out. At least 5; null: use does not matter. Default 60 for a new link. On the command line also 90m, 2h, 1d or off. |
| `--max <integer>` | The longest the link lasts, in minutes from now. Null: no limit (with idleMinutes null too, it never expires). Default 10080 (7 days) for a new link. On the command line also 1h, 7d, 4w or off. |
| `--wake` | Start the VM when someone visits the link while it is stopped. Default true. |
| `--rename <string>` | A new name for the link. |

MCP tool: `vm_share_link_set`.

### `ghostdock vm shell`

Shell sessions that keep cwd and environment between commands.

### `ghostdock vm shell close`

Close a shell session.

```
ghostdock vm shell close <session-id> --vm <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<session-id>` | Session id from vm shell create. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--vm <string>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--container <string>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_shell_close`.

### `ghostdock vm shell create`

Open a shell session that keeps cwd and environment between commands. Starts the VM when allowed; the session ends at idle-stop.

```
ghostdock vm shell create <vm> [container] [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<container>` | Container to work in, by name, from vm container list. Omitted: on a Server the VM itself; on a Container host the one running container (with several running the call fails and lists them). |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--session-id <string>` | Id for the new session: a slug. Omit to generate one. |
| `--start` | Start the container first when it is not running, without asking. |

MCP tool: `vm_shell_create`.

### `ghostdock vm ssh`

Log in to a Server over SSH, starting the VM when needed, as the VM's login user (ghost on our images). It uses your SSH key when one on this machine is in your account, otherwise it gets a temporary login for 60 minutes; --temp always takes the temporary login. `ssh-key add` puts a key in your account, which also lets plain ssh, scp, rsync and VS Code log in; --config prints the ~/.ssh/config block for them. Arguments after -- go to ssh, e.g. -- -L 5432:localhost:5432 or a remote command. The SSH gateway's host key is pinned in known_hosts in the CLI's config directory when the server knows it, so ssh does not ask about it. When the VM's sshd is not running, ssh ends with exit status 255 and says why. --rescue opens a rescue shell instead (or runs the command after --): in the VM as the login user through Ghostdock's guest agent, without sshd, so sshd can be repaired; no sftp or forwarding. Idle-stop still applies, independent of the login. A Container host has no SSH: use `vm container exec`.

```
ghostdock vm ssh <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | Server name (e.g. quiet-harbor) or id, from vm list or vm up. Required. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |
| `--temp` | Use a temporary login even when you have an SSH key: with --print, show its command and token. |
| `--print` | Print the ssh command instead of connecting: your key's when your account has one, else a temporary login's. |
| `--config` | Print the ~/.ssh/config block for your SSH key, for VS Code Remote-SSH, ssh and scp. Creates nothing. |
| `--revoke` | End your own temporary login to the Server; other people's stay, and SSH keys keep working. |
| `--all` | With --revoke: end everyone's temporary logins to the Server. |
| `--rescue` | A rescue shell without the VM's sshd (no sftp or forwarding), to repair sshd. |

MCP tool: `vm_ssh_get`.

### `ghostdock vm start`

Start a stopped VM, or reset the idle-stop countdown of a running one. Returns status, idleStopsAt / deletesAt, and `boot` (VM and container start times in ms; null when it was already running).

```
ghostdock vm start <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_start`.

### `ghostdock vm status`

Get a VM’s status and lifecycle deadlines without waking it. Returns idleStopsAt, deletesAt, `boot` (the last start: VM and container times in ms) and `disk` (usedBytes of sizeBytes, read now while it runs: check it before a big pull or build, and resize with vm resize when it is nearly full) and does not reset idle activity. While a vm up still runs it answers { vmId, name, organizationId, status: "creating", progress } (vm: the vmId vm up returned, or the name asked for), and after a failed create { …, status: "failed", failure: { code, message, retryable } }. progress says how far it got: steps so far in order (create, image, boot, setup, containers; the last runs now) and image, the OS image download while that runs ({ done, total, unit: bytes or percent }; total 0 when the host names none); absent when the server no longer holds it. waitSeconds waits that long at most while the create runs.

```
ghostdock vm status <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--wait-seconds <integer>` | While the VM is still being created: seconds to wait for the create to end before answering, 0 to 120, default 0. |

MCP tool: `vm_status`.

### `ghostdock vm stop`

Stop a running VM. Its files stay, unless the VM is ephemeral: then it is deleted, and the answer has deleted: true.

```
ghostdock vm stop <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_stop`.

### `ghostdock vm storage`

### `ghostdock vm storage delete`

Delete a volume, a leftover folder or a removed project’s files. kind volume: a named volume; folder: a Container host’s path from unboundPaths; project: a removed project’s folder, by the project’s name. Everything in it goes. A Server has no VM folders: delete its own paths with vm file delete. Refused while a container mounts it (in any state: a stopped one counts, so stopping does not help), mounts a folder above it (a bind of /), a volume keeps its data in the folder, or its project still has containers: remove those first.

```
ghostdock vm storage delete <vm> --kind <string> --name <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--kind <string>` | volume, folder or project. Required. |
| `--name <string>` | The volume’s name, the folder’s path in the VM as unboundPaths names it (/srv/old), or the project’s name. Required. |

MCP tool: `vm_storage_delete`.

### `ghostdock vm storage list`

List a VM’s volumes, bind mounts and what removed containers and projects left. bindPaths: the paths the containers bind now (file: a bound file). unboundPaths: on a Container host (vmFolders true), whose binds land in its own folder tree, the largest folders and files no container or volume uses any more. projects: the platform’s Compose project folders (/srv/ghostdock/<name>); removed: the project is gone and the folder is what Remove project kept. On a Server (vmFolders false) bind mounts are its own paths: read them with vm file list and vm file read. Each with its size and sizeState (measured; measuring: ask again in a few seconds; tooBig: too big to measure cheaply; outside: a volume bound to a system path, not measured nor browsable); volumes and bindPaths with the containers using them; plus every container’s mounts. A volume with attachment (name in the VM, the organization’s volume) is an attached volume’s Docker volume: its usage is the volume’s usedBytes (volume_get), and it goes with vm volume detach, not vm storage delete. truncated says entries were left out. A stopped VM lists none (it is not started for this).

```
ghostdock vm storage list <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_storage_list`.

### `ghostdock vm tool`

Tools of the MCP servers inside a VM.

### `ghostdock vm tool call`

Call a tool on an MCP server inside a VM. Wakes a stopped VM when the endpoint has autoWake.

```
ghostdock vm tool call <name> --vm <string> --arguments <object> [flags]
```

| Argument | Description |
| --- | --- |
| `<name>` | Tool name, from vm tool list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--vm <string>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--arguments <object>` | Tool arguments as a JSON object. (JSON object) Required. |
| `--mcp-name <string>` | MCP endpoint to call. Needed when several endpoints expose the same tool name. |

MCP tool: `vm_tool_call`.

### `ghostdock vm tool list`

List the tools of the MCP servers a VM exposes. A server that cannot be reached is reported in errors; the others are still listed.

```
ghostdock vm tool list <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--mcp-name <string>` | Only list the tools of this MCP endpoint. |

MCP tool: `vm_tool_list`.

### `ghostdock vm up`

Bring up a new VM: what runs on it (optional) and the system it boots. Systems: headless (a Server, Headless, based on Ubuntu 26.04: the VM’s own system, where `vm ssh` lands), desktop (a Server, Desktop: the same with an XFCE desktop in the browser), container-host (the platform’s read-only base that only runs the workload’s containers, no SSH), or an image labelled ghostdock.os=true (--system). Name a system where a template goes: `vm up desktop`, `vm up desktop --image redis`. Defaults: `vm up` alone is an empty headless Server; with something to run (a template, --image, --compose, --dockerfile, --source) it is a Container host unless the template names its system. --system wins over both. On a Server the workload runs as its own project, as `vm container up` adds one; --snapshot is a whole VM and brings its own system. A template brings its source: the flags change everything else (system, size, lifecycle, URLs…), not the source. Inline content only: for a directory or ZIP use `ghostdock vm build`.

```
ghostdock vm up [template] [flags]
```

| Argument | Description |
| --- | --- |
| `<template>` | A system (headless, desktop, container-host) or a template name from template list, e.g. nginx. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |
| `--system <value>` | What boots: headless (the default with nothing to run, where the provider runs Servers), desktop, container-host (the default with something to run; needs a workload), or an image labelled ghostdock.os=true. Wins over a template’s. Not with --snapshot. |
| `--platform` | Take the platform’s template of this name even when the organization has its own. |
| `--image <value>` | Run an OCI image on the VM, e.g. nginx:alpine (an OS image goes in --system). |
| `--compose <value>` | Run a local Compose file on the VM (one file, no build contexts; for those use ghostdock docker context). |
| `--dockerfile <value>` | Build and run a local Dockerfile on the VM (no build context). |
| `--source <value>` | Any source as JSON, e.g. a Compose reference: {"type":"compose","reference":"oci://…"} or a template: {"type":"template","name":"nginx"}. |
| `--snapshot <value>` | Boot from an organization snapshot (its name or id from snapshot list). |
| `--name <value>` | The VM’s name, what you type in every vm command (vm ssh api): 3–30 lowercase letters, digits and single hyphens. Fixed for the VM’s life. Omit for one from --display-name ("Marketing site" → marketing-site, -2 if taken), else a generated one (quiet-harbor). |
| `--display-name <value>` | What people call it, e.g. "Marketing site"; without --name the VM is named after it (marketing-site). vm update changes it, never the name. |
| `--restart <value>` | Restart policy of an image or a Dockerfile: unless-stopped (default), always, on-failure or no. |
| `--resources <value>` | JSON { cpu, memoryGiB, diskGiB }. |
| `--idle-stop-minutes <value>` | Minutes of inactivity before idle-stop. -1: never stops for inactivity (a Container host still stops 5 minutes after its last container). Omit for the platform default. Timers and cron jobs are not activity: a Server whose work is only those takes -1. |
| `--lifecycle <value>` | What happens when it stops: ephemeral (the VM is deleted, it cannot be started again), auto_delete (default: deleted after --auto-delete-days) or keep (never deleted automatically). |
| `--auto-delete-days <value>` | Days stopped before the record is deleted (1–365). Omit for the 14-day default. Means auto_delete; not with --lifecycle keep or ephemeral. |
| `--provider <value>` | Provider name or id. Omit for the organization default. |
| `--environment <value>` | JSON { organization, bindings, local }. |
| `--env <value>` | What the container gets of the VM’s environment (JSON). |
| `--urls <value>` | Changes to the source’s URLs as JSON, e.g. [{"port":8080,"autoWake":true,"access":"public"}] or [{"port":80,"remove":true}]. |
| `--forwards <value>` | Changes to the source’s forwards as JSON. |
| `--volume <volume[:/path][:ro]>` | Attach a volume, as docker run -v; repeat for more. pgdata (at /mnt/volumes/pgdata, read-write), assets:/srv/assets, assets:/srv/assets:ro. A volume that does not exist is created, a 10 GiB disk; the result says whether it was created or an existing one attached. |
| `--mount <spec>` | Attach a volume, as docker run --mount; repeat for more. source=assets,target=/srv/assets,readonly. name= is its name in the VM (the Docker volume’s; a template’s volume of that name is replaced); shared and size=50 (GiB, or 50G, 1T) only matter when it is created. |
| `--mcps <value>` | Changes to the source’s MCPs as JSON, e.g. [{"name":"tools","port":8000,"autoWake":true}]. |
| `--idempotency-key <value>` | Makes the create safe to retry: run again with the same key and arguments (within 24 hours) and you get the same VM instead of a second one. |
| `--no-wait` | Return as soon as the create runs, with the VM's id and status creating; vm status <id> --wait-seconds 120 waits for it. Without it, the command waits until the VM is up. |
| `--can-create <value>` | What the VM’s own identity may create: vms, sites, volumes. The identity (GHOSTDOCK_TOKEN in its environment) sees and manages only what it creates. --vms-budget, --sites-budget and --volumes-budget also allow their kind; vms needs --vms-budget, volumes --volumes-budget. Needs --on-auto-delete. Replaces the template’s. |
| `--vms-budget <value>` | Let it create VMs: cpu=8,memory=32,disk=200. cpu and memory cap its VMs that run at once (stopped ones do not count); disk caps all of them (memory and disk in GiB); count=4 also caps their number. |
| `--sites-budget <value>` | What its sites may hold at once: count=20 caps their number, size=500 their files together in MiB, as the CDN holds them. Lets it publish sites; --can-create sites alone sets no limit. |
| `--volumes-budget <value>` | Let it create volumes: size=500 caps their configured sizes added up, attached or not (GiB, or 500G, 2T); count=10 also caps their number. |
| `--on-auto-delete <value>` | delete or release what it created, once the VM is removed automatically. Automatically: an ephemeral VM’s end, auto-delete or its host gone, never a person’s delete. release keeps them as ordinary ones of the organization. Required with an identity. |
| `--no-identity` | No identity: the VM creates nothing, even when the template gives it one. |
| `--identity <value>` | The identity as JSON instead of the flags above, e.g. {"budget":{"vms":{"cpu":8,"memoryGiB":32,"diskGiB":200},"sites":{}},"onAutoDelete":"delete"}. |

MCP tool: `vm_up`.

### `ghostdock vm update`

Change a VM’s display name, idle-stop interval or lifecycle. The name is fixed: vm up takes it. Omit a field to keep it; null resets it to the platform default. An identity given here replaces the VM’s whole identity: name every kind it may create and --on-auto-delete.

```
ghostdock vm update <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--display-name <string>` | New display name, a free label shown next to the name. Null or blank clears it; omit to keep it. The name itself is fixed. |
| `--idle-stop-minutes <number>` | Minutes of inactivity before the platform worker idle-stops the VM. -1: never stops for inactivity. 0 is rejected. Null resets to the platform default. Provider-native timers are optional backup. Timers and cron jobs are not activity: a Server whose work is only those takes -1. |
| `--lifecycle <string>` | ephemeral: the VM is deleted when it stops; refused on a stopped VM. auto_delete: the record goes autoDeleteDays after the VM stops. keep: never removed automatically. |
| `--auto-delete-days <integer>` | Days stopped before the record is deleted (1–365). Makes the VM auto_delete. Null writes the platform default. Not with keep or ephemeral. |
| `--can-create <value>` | What the VM’s own identity may create: vms, sites, volumes. The identity (GHOSTDOCK_TOKEN in its environment) sees and manages only what it creates. --vms-budget, --sites-budget and --volumes-budget also allow their kind; vms needs --vms-budget, volumes --volumes-budget. Needs --on-auto-delete. Replaces the VM’s identity, if it has one. |
| `--vms-budget <value>` | Let it create VMs: cpu=8,memory=32,disk=200. cpu and memory cap its VMs that run at once (stopped ones do not count); disk caps all of them (memory and disk in GiB); count=4 also caps their number. |
| `--sites-budget <value>` | What its sites may hold at once: count=20 caps their number, size=500 their files together in MiB, as the CDN holds them. Lets it publish sites; --can-create sites alone sets no limit. |
| `--volumes-budget <value>` | Let it create volumes: size=500 caps their configured sizes added up, attached or not (GiB, or 500G, 2T); count=10 also caps their number. |
| `--on-auto-delete <value>` | delete or release what it created, once the VM is removed automatically. Automatically: an ephemeral VM’s end, auto-delete or its host gone, never a person’s delete. release keeps them as ordinary ones of the organization. Required with an identity. |
| `--no-identity` | No identity: the VM creates nothing; its token stops working, and what it still owns needs --owned-resources. |
| `--identity <value>` | The identity as JSON instead of the flags above, e.g. {"budget":{"vms":{"cpu":8,"memoryGiB":32,"diskGiB":200},"sites":{}},"onAutoDelete":"delete"}. |
| `--owned-resources <string>` | With identity null on a VM whose identity still owns VMs or sites: delete them too (down the whole tree), or release them as ordinary ones of the organization. Without it such a call is refused (owns_resources, naming them by kind). |

MCP tool: `vm_update`.

### `ghostdock vm url`

URLs that expose VM ports.

### `ghostdock vm url delete`

Delete a port’s URL. Its address stops working; share links to the port stay (vm share-link delete revokes them).

```
ghostdock vm url delete <vm> <port> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<port>` | The target’s port: a port of the VM, or of the container when one is named. On the command line: `port` or `container:port`. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | The target’s container, by name from vm container list (its own port, no published port needed; needs a VM on the current base image). Omit or null for a port of the VM itself. On the command line: `container:port`. |

MCP tool: `vm_url_delete`.

### `ghostdock vm url list`

List the URLs that expose a VM’s ports, with protocol, access and title. A titled URL (for example `Desktop`, the desktop image’s desktop in a browser) gets its own button in the app.

```
ghostdock vm url list <vm> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_url_list`.

### `ghostdock vm url move`

Move a port’s URL to another container, keeping its address and settings. For example after a container was renamed (vm container list shows former names). The port stays the same.

```
ghostdock vm url move <vm> <port> <to-container> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<port>` | The target’s port: a port of the VM, or of the container when one is named. On the command line: `port` or `container:port`. Required. |
| `<to-container>` | The container it reaches from now on, by name; null (on the command line: null) for a port of the VM itself. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | The target’s container, by name from vm container list (its own port, no published port needed; needs a VM on the current base image). Omit or null for a port of the VM itself. On the command line: `container:port`. |

MCP tool: `vm_url_move`.

### `ghostdock vm url new-name`

Give a port’s URL a new name (slug). The old address stops working at once; links to it break. Settings stay.

```
ghostdock vm url new-name <vm> <port> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<port>` | The target’s port: a port of the VM, or of the container when one is named. On the command line: `port` or `container:port`. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | The target’s container, by name from vm container list (its own port, no published port needed; needs a VM on the current base image). Omit or null for a port of the VM itself. On the command line: `container:port`. |

MCP tool: `vm_url_new_name`.

### `ghostdock vm url set`

Give a VM port, or a container’s port, its URL, or change the one it has. One URL per port, keyed by container and port. Creates it when missing, applies the fields given and keeps the others; the answer says created true or false. Safe to repeat. access organization (default for HTTP): only members of the organization, after logging in; public: anyone. TCP URLs use TLS (not HTTP), have no login and are always public; for a private TCP port use vm ssh and an SSH forward. Read the vm skill (`ghostdock skill get vm`) for TCP clients.

```
ghostdock vm url set <vm> <port> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<port>` | The target’s port: a port of the VM, or of the container when one is named. On the command line: `port` or `container:port`. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--container <string>` | The target’s container, by name from vm container list (its own port, no published port needed; needs a VM on the current base image). Omit or null for a port of the VM itself. On the command line: `container:port`. |
| `--protocol <string>` | "http" (default for a new URL) or "tcp". TCP URLs use TLS and are public. |
| `--access <string>` | "organization": only members of the organization, after logging in; "public": anyone on the internet. Default organization for HTTP; TCP has no login and is always public. |
| `--wake` | Start the VM when the URL is visited (TCP: connected to) while it is stopped. Default false for a new URL. |
| `--title <string>` | Name shown for the URL, up to 40 characters. A titled HTTP URL gets its own button on the VM card; TCP titles are shown in URL lists. Untitled HTTP URLs are listed under "Open URL". Null removes it. |

MCP tool: `vm_url_set`.

### `ghostdock vm volume`

Attach volumes to a VM and detach them.

### `ghostdock vm volume attach`

Attach a volume to a VM, as docker run --mount does. source is the volume, created on first use as a disk (shared and sizeGiB only matter then). It attaches live in a running VM (takesEffect live: Live now), a stopped one at its next start; a running VM on an older base image, started before disks attached live, or on a Docker host takes a disk at its next start too (takesEffect next_start, the message says why). A disk belongs to one VM at a time: one another VM has is refused, naming it. Any number of VMs may have a shared folder; a read-write one at a database path or /var/lib/docker warns (warnings), with the provider’s reason: on Ghostdock Cloud NFS speed and locking (node_modules warns too), on Incus and Docker hosts two writers on one data directory. The result’s message says whether it was created or an existing one was attached; check it, a typo makes a new empty volume. In the VM it is mounted at path (default /mnt/volumes/<name>) and is a Docker volume of its name (docker run -v <name>:/x, or external in Compose). On the command line the volume is Docker’s -v short form: assets, assets:/srv/assets, assets:/srv/assets:ro.

```
ghostdock vm volume attach <vm> <volume> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<volume>` | The volume, as docker run -v: assets (at /mnt/volumes/assets, read-write), assets:/srv/assets or assets:/srv/assets:ro. Created as a 10 GiB disk when it does not exist. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--name <string>` | Its name in the VM (the Docker volume’s); default the volume’s name. |
| `--shared` | Create it as a shared folder (only when missing). |
| `--size <GiB>` | Its size when it is created here: 50 (GiB), or 50G, 1T. An existing volume keeps its own (grow it with volume resize). |

MCP tool: `vm_volume_attach`.

### `ghostdock vm volume detach`

Detach a volume from a VM, by its name in the VM or the volume’s name. A stopped VM lets it go now; a running one lets it go live (a running VM that takes disks only at a start keeps a disk until its next start: takesEffect next_start). One a process in the VM still uses waits (takesEffect when_unused, busyBy names them): it detaches when they stop using it, or at the VM’s next start. The volume and its data stay.

```
ghostdock vm volume detach <vm> <volume> [flags]
```

| Argument | Description |
| --- | --- |
| `<vm>` | VM name (e.g. quiet-harbor) or id, from vm list or vm up. Names are unique within the organization. Required. |
| `<volume>` | The attachment’s name in the VM, or the volume’s name. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `vm_volume_detach`.

## `ghostdock volume`

Volumes: storage that outlives VMs, attached to them as Docker volumes.

### `ghostdock volume cp`

Copy one file between this machine and a volume, without a VM. One side is :path inside the volume (:/ is its root), the other a local file, or - for stdin or stdout. Out of any volume, at most 384 KiB; into a Shared folder only (a disk is read-only here), at most 256 KiB, into a folder that exists. A volume path ending in / is a folder the file goes into under its own name; into an existing local folder a copy keeps its name. An existing file is replaced and keeps its owner and mode. Larger files: vm cp in a VM that has the volume attached.

```
ghostdock volume cp <volume> <src> <dst> [flags]
```

| Argument | Description |
| --- | --- |
| `<volume>` | Volume name (e.g. assets) or id, from volume list. Required. |
| `<src>` | What to copy: :path in the volume, a local file, or - for stdin. Required. |
| `<dst>` | Where to: :path in the volume, a local file or folder, or - for stdout. Required. |
| `--org <value>` | Organization id, slug or name, from `ghostdock organization list` (default: GHOSTDOCK_ORG, then `ghostdock organization use`). |

### `ghostdock volume create`

Create a volume. The kinds are the same on every provider: a disk (the default) is written by one VM at a time and behaves like a local disk, the place for databases and anything with locks; shared is a folder any number of VMs mount at once, read-write or read-only each, attached and detached live in a running VM, for uploads, assets and build outputs, never two database servers on one. What keeps the data is the provider’s (backingNote in the result): on Ghostdock Cloud a disk is its own block device and a shared folder is served over NFS, slower and slowest with many small files; on an Incus host both are a folder in its ZFS or Btrfs pool, at local speed, size enforced; on a Docker host both are a folder on the machine and the size is not enforced. A host folder (hostFolder, only on a Docker or Incus host) is a folder of the machine itself that its owner listed at setup (provider list hostFolders): attached like a shared folder, never read-write when listed read-only, no size; Ghostdock never deletes its files, and deleting the volume only forgets it. One volume per host folder. Files of the machine’s first user (uid 1000) belong to ghost in the VM. Most callers skip this: vm up volumes and vm volume attach create a missing volume on first use. sizeGiB defaults to the platform’s VM disk size; it only grows later (volume resize).

```
ghostdock volume create <name> [flags]
```

| Argument | Description |
| --- | --- |
| `<name>` | Unique in the organization; the Docker volume name in a VM by default. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--shared` | A shared folder instead of a disk. |
| `--size <GiB>` | Its size: 50 (GiB), or 50G, 1T; 1 GiB to 16T. Default: the platform’s VM disk size (10 GiB). It can grow later, never shrink. Not with --host-folder. |
| `--host-folder <string>` | A host folder instead: the name of a folder the provider’s host lists (provider list hostFolders). It has no size and is never a shared folder. |
| `--provider <string>` | Provider that keeps it, from provider list; omitted: the organization’s default for VMs. A VM attaches only volumes of its own provider and host. |

MCP tool: `volume_create`.

### `ghostdock volume delete`

Delete a volume, and a disk’s or shared folder’s data with it. Refused while any VM has it attached, running or not, naming the VMs: vm volume detach first. Deleting a VM never deletes a volume. A host folder is only forgotten: its files stay on the machine (message says so).

```
ghostdock volume delete <volume> [flags]
```

| Argument | Description |
| --- | --- |
| `<volume>` | Volume name (e.g. pgdata) or id, from volume list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `volume_delete`.

### `ghostdock volume file`

A volume’s files without a VM: list, read, and write into a Shared folder.

### `ghostdock volume file list`

List one folder of a volume: files (with size) and folders. hidden counts links and special files left out; truncated says the listing was cut (list a folder below it); readOnly is true for a Disk. No VM of yours is needed: a Shared folder is read through the organization’s storage VM (started for the call when stopped; it stops again 10 minutes after the last use), a Disk through the running VM it is attached to (a stopped or detached Disk is refused with volume_files_vm_stopped or volume_files_needs_vm), on a Docker or Incus host by the host itself.

```
ghostdock volume file list <volume> [path] [flags]
```

| Argument | Description |
| --- | --- |
| `<volume>` | Volume name (e.g. pgdata) or id, from volume list. Required. |
| `<path>` | Folder inside the volume. Default /. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `volume_file_list`.

### `ghostdock volume file read`

Read one file of a volume. content is utf8 text; base64 carries bytes that are binary (or all bytes with encoding base64). A file over 384 KiB answers tooLarge with no bytes: read it in a VM that has the volume attached (ghostdock vm cp). No VM of yours is needed: a Shared folder is read through the organization’s storage VM (started for the call when stopped; it stops again 10 minutes after the last use), a Disk through the running VM it is attached to (a stopped or detached Disk is refused with volume_files_vm_stopped or volume_files_needs_vm), on a Docker or Incus host by the host itself.

```
ghostdock volume file read <volume> <path> [flags]
```

| Argument | Description |
| --- | --- |
| `<volume>` | Volume name (e.g. pgdata) or id, from volume list. Required. |
| `<path>` | Path inside the volume: / for its root, else an absolute path such as /config/app.yml. A path with . or .. or an empty part is refused. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--encoding <string>` | base64: always the bytes as base64, for a byte-exact copy. Omit: utf8 for text. |

MCP tool: `volume_file_read`.

### `ghostdock volume file write`

Upload one file into a Shared folder or a Host folder. At most 256 KiB, into a folder that exists. An existing file is replaced and keeps its owner and mode; a new one belongs to the folder’s owner. A Disk is read-only here (volume_read_only): its one writer is its VM. No VM of yours is needed: a Shared folder is read through the organization’s storage VM (started for the call when stopped; it stops again 10 minutes after the last use), a Disk through the running VM it is attached to (a stopped or detached Disk is refused with volume_files_vm_stopped or volume_files_needs_vm), on a Docker or Incus host by the host itself. A secret belongs in env set, not in a file.

```
ghostdock volume file write <volume> <path> --content <string> [flags]
```

| Argument | Description |
| --- | --- |
| `<volume>` | Volume name (e.g. pgdata) or id, from volume list. Required. |
| `<path>` | Path inside the volume: / for its root, else an absolute path such as /config/app.yml. A path with . or .. or an empty part is refused. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--content <string>` | The file’s bytes: utf8 text, or base64 when encoding is base64. Required. |
| `--encoding <string>` | How to read content. Omit for utf8. base64 for bytes that are not text. |

MCP tool: `volume_file_write`.

### `ghostdock volume list`

List the organization’s volumes (ADR 0061): storage that outlives VMs. Each has kind (disk: one VM writes it at a time, like a local disk, the place for databases; shared: any number of VMs at once, live), sizeGiB, usedBytes (what its host last read), status, provider (with its kind) and host, backing and backingNote (what keeps its data on that provider: block, a Ghostdock Cloud disk’s own block device; nfs, a Cloud shared folder served over NFS, slower; pool, a folder in an Incus host’s ZFS or Btrfs pool, size enforced; folder, a folder on a Docker host’s machine, size not enforced), ownerTokenId (the identity that owns it, or null), attachments (vmName, name in the VM, path, readOnly, state: pending attaches at the VM’s next start, detaching leaves then, or for a shared folder once nothing in the VM uses it; guest: what the VM last reported, mounted, a problem, busyBy), and for a shared folder fileService (its storage VM on the host, running or stopped). fileServices lists the file service per host. A token of reach own sees only its own volumes.

```
ghostdock volume list [flags]
```

| Argument | Description |
| --- | --- |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `volume_list`.

### `ghostdock volume release`

Release a volume from the identity that created it. The owner is a VM’s identity or a token of reach own. It becomes an ordinary volume of the organization and keeps its data and attachments: the owner can no longer see or manage it, and it no longer counts against the owner’s budget. A member, or the owner itself.

```
ghostdock volume release <volume> [flags]
```

| Argument | Description |
| --- | --- |
| `<volume>` | Volume name (e.g. pgdata) or id, from volume list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `volume_release`.

### `ghostdock volume resize`

Grow a volume (never shrink). A VM that has a disk sees the new size at its next start, when its filesystem grows; a shared folder grows live. A host folder has no size and is refused.

```
ghostdock volume resize <volume> --size <GiB> [flags]
```

| Argument | Description |
| --- | --- |
| `<volume>` | Volume name (e.g. pgdata) or id, from volume list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |
| `--size <GiB>` | The new size: 50 (GiB), or 50G, 1T; larger than now, up to 16T. Required. |

MCP tool: `volume_resize`.

### `ghostdock volume show`

One volume by name or id, with its attachments. backingNote says what keeps its data on its provider, and whether the size is a hard limit there. usedBytes is read from its host now. A shared folder names its file service (the storage VM that serves it): running, or stopped (it starts with the first VM that attaches it, and stops 10 minutes after the last one stopped).

```
ghostdock volume show <volume> [flags]
```

| Argument | Description |
| --- | --- |
| `<volume>` | Volume name (e.g. pgdata) or id, from volume list. Required. |
| `--org <string>` | Organization id, slug or name, from organization list. A name works when only one of your organizations has it. Ids survive renames; slugs and names change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organization use`. |

MCP tool: `volume_show`.

## `ghostdock whoami`

Show the account this CLI is currently authenticated as.

```
ghostdock whoami
```
