ghostdock 0.0.17 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-reference.md +69 -51
- package/dist/cli.md +64 -7
- package/dist/index.js +2178 -1563
- package/package.json +1 -1
package/dist/cli-reference.md
CHANGED
|
@@ -28,6 +28,24 @@ ghostdock apps list [flags]
|
|
|
28
28
|
|
|
29
29
|
MCP tool: `apps_list`.
|
|
30
30
|
|
|
31
|
+
## `ghostdock docker`
|
|
32
|
+
|
|
33
|
+
Docker over the private network: a sandbox's Docker engine from this machine.
|
|
34
|
+
|
|
35
|
+
### `ghostdock docker context`
|
|
36
|
+
|
|
37
|
+
Point Docker at a sandbox's Docker engine over the private network: plain `docker` and `docker compose` then run there. Creates (or updates) the Docker context ghostdock-<org>-<sandbox> for tcp://<sandbox>.<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.
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
ghostdock docker context <sandbox> [flags]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
| Argument | Description |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| `<sandbox>` | Sandbox name, from `network ls`. Required. |
|
|
46
|
+
| `--org <value>` | Organization id or slug, from `ghostdock organizations list` (default: GHOSTDOCK_ORG, then `ghostdock organizations use`). |
|
|
47
|
+
| `--use` | Make it the current Docker context (`docker context use`). `--no-use` only creates or updates it. Default: `true`. |
|
|
48
|
+
|
|
31
49
|
## `ghostdock env`
|
|
32
50
|
|
|
33
51
|
Manage organization environment variables and secrets.
|
|
@@ -129,7 +147,7 @@ ghostdock images add-compose --name <string> [flags]
|
|
|
129
147
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
130
148
|
| `--name <string>` | Image name, unique in the organization. Required. |
|
|
131
149
|
| `--files <object>` | Compose files by file name. Must include docker-compose.yml/yaml or compose.yml/yaml. (JSON object) |
|
|
132
|
-
| `--reference <string>` | A published Compose project instead of files, e.g. oci://docker.io/ghostdockhq/
|
|
150
|
+
| `--reference <string>` | A published Compose project instead of files, e.g. oci://docker.io/ghostdockhq/headless-compose:ubuntu-26.04. |
|
|
133
151
|
| `--override <string>` | With reference: a Compose file merged into it (services, environment, labels). |
|
|
134
152
|
|
|
135
153
|
MCP tool: `images_add_compose`.
|
|
@@ -529,7 +547,7 @@ ghostdock projects publish [path] [flags]
|
|
|
529
547
|
| `--display-name <value>` | Optional display name. |
|
|
530
548
|
| `--tag <value>` | Optional caller tag (git SHA or free-form label) stored on the deployment. |
|
|
531
549
|
| `--auto-stop-interval-minutes <value>` | Same as `sandboxes create`. Omit for the 20-minute default. Pass -1 to keep it running. 0 is rejected. |
|
|
532
|
-
| `--auto-delete-
|
|
550
|
+
| `--auto-delete-after-days <value>` | Same as `sandboxes create`: days stopped before the record is deleted (0–365). Omit for the 14-day default. Pass 0 to delete the record when it stops. |
|
|
533
551
|
| `--resources <value>` | Same as `sandboxes create`: JSON { cpu, memoryGiB, diskGiB }. |
|
|
534
552
|
| `--environment <value>` | Same as `sandboxes create --environment`: JSON { organization, bindings, local }. Required after awaiting_configuration. |
|
|
535
553
|
| `--auto-wake <value>` | Same as `sandboxes urls create --auto-wake`. Default true for the minted URL. |
|
|
@@ -557,10 +575,10 @@ ghostdock projects redeploy <project-id> [flags]
|
|
|
557
575
|
| `--tag <string>` | Optional caller tag stored on the new deployment. Metadata only. |
|
|
558
576
|
| `--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) |
|
|
559
577
|
| `--auto-stop-interval-minutes <number>` | Minutes of inactivity before the platform worker idle-stops the sandbox. -1 means always on. 0 is rejected. Omit for the platform default. Provider-native timers are optional backup. |
|
|
560
|
-
| `--
|
|
578
|
+
| `--lifecycle <string>` | What may make the sandbox disappear on its own. ephemeral: every stop wipes the VM and its disk, and the next start runs its Compose project again (edits in the project folder kept, everything else gone; locks too). auto_delete (default): a stop keeps the disk, and the record goes autoDeleteAfterDays after the stop. keep: never removed automatically. Omit for the image label ghostdock.ephemeral, else auto_delete. ephemeral is chosen here only. |
|
|
579
|
+
| `--auto-delete-after-days <integer>` | Days the sandbox stays stopped before the platform worker deletes the record (0–365; 0 deletes it when it stops). Omit for the platform default (14). Not with keep. A container a person locked holds it. |
|
|
561
580
|
| `--sandbox-provider-id <string>` | Configured sandbox-provider instance id from providers 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 sandboxes and has it is used. When no provider fits, the call fails with a not-configured error. |
|
|
562
581
|
| `--environment <object>` | Environment to give this sandbox. 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: sandbox-only variables/secrets to create with the sandbox (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 sandbox gets nothing unless listed here. (JSON object) |
|
|
563
|
-
| `--ephemeral` | Mark the sandbox ephemeral: every stop destroys the machine and the next start boots fresh, while the record, URLs, and settings stay. Omit to use the image label ghostdock.ephemeral, or false when that label is absent. Does not change idle-stop or auto-delete. |
|
|
564
582
|
| `--auto-wake` | Same as urls[].autoWake on sandboxes create. Default true for the minted URL. |
|
|
565
583
|
| `--public` | Same as urls[].public on sandboxes create. Default true for the minted URL. |
|
|
566
584
|
|
|
@@ -825,7 +843,7 @@ Containers of a sandbox’s Docker engine.
|
|
|
825
843
|
|
|
826
844
|
### `ghostdock sandboxes containers list`
|
|
827
845
|
|
|
828
|
-
List the containers of a sandbox, running or not. Each with state, health, restart policy, ports, Compose project and service,
|
|
846
|
+
List the containers of a sandbox, 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), ghostdock.* labels, and which one is the default. A stopped sandbox lists none (it is not started for this).
|
|
829
847
|
|
|
830
848
|
```
|
|
831
849
|
ghostdock sandboxes containers list <sandbox-id> [flags]
|
|
@@ -838,12 +856,12 @@ ghostdock sandboxes containers list <sandbox-id> [flags]
|
|
|
838
856
|
|
|
839
857
|
MCP tool: `sandboxes_containers_list`.
|
|
840
858
|
|
|
841
|
-
### `ghostdock sandboxes containers
|
|
859
|
+
### `ghostdock sandboxes containers lock`
|
|
842
860
|
|
|
843
|
-
|
|
861
|
+
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 sandbox’s auto-delete. An ephemeral sandbox’s stop still wipes it. Never starts the sandbox: a stopped one gets the lock at its next start.
|
|
844
862
|
|
|
845
863
|
```
|
|
846
|
-
ghostdock sandboxes containers
|
|
864
|
+
ghostdock sandboxes containers lock <sandbox-id> <container> [flags]
|
|
847
865
|
```
|
|
848
866
|
|
|
849
867
|
| Argument | Description |
|
|
@@ -851,19 +869,15 @@ ghostdock sandboxes containers logs <sandbox-id> <container> [flags]
|
|
|
851
869
|
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
852
870
|
| `<container>` | Container, by name. Required. |
|
|
853
871
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
854
|
-
| `--tail <integer>` | The last N lines (at most 5000). |
|
|
855
|
-
| `--after <string>` | Only lines after this time: the time of the last line already read. |
|
|
856
|
-
| `--follow` | Keep printing new lines until Ctrl-C. |
|
|
857
|
-
| `--timestamps` | Put each line's time in front of it. |
|
|
858
872
|
|
|
859
|
-
MCP tool: `
|
|
873
|
+
MCP tool: `sandboxes_containers_lock`.
|
|
860
874
|
|
|
861
|
-
### `ghostdock sandboxes containers
|
|
875
|
+
### `ghostdock sandboxes containers logs`
|
|
862
876
|
|
|
863
|
-
|
|
877
|
+
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 sandbox has none (it is not started for this).
|
|
864
878
|
|
|
865
879
|
```
|
|
866
|
-
ghostdock sandboxes containers
|
|
880
|
+
ghostdock sandboxes containers logs <sandbox-id> <container> [flags]
|
|
867
881
|
```
|
|
868
882
|
|
|
869
883
|
| Argument | Description |
|
|
@@ -871,9 +885,12 @@ ghostdock sandboxes containers protection <sandbox-id> <container> --protected <
|
|
|
871
885
|
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
872
886
|
| `<container>` | Container, by name. Required. |
|
|
873
887
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
874
|
-
| `--
|
|
888
|
+
| `--tail <integer>` | The last N lines (at most 5000). |
|
|
889
|
+
| `--after <string>` | Only lines after this time: the time of the last line already read. |
|
|
890
|
+
| `--follow` | Keep printing new lines until Ctrl-C. |
|
|
891
|
+
| `--timestamps` | Put each line's time in front of it. |
|
|
875
892
|
|
|
876
|
-
MCP tool: `
|
|
893
|
+
MCP tool: `sandboxes_containers_logs`.
|
|
877
894
|
|
|
878
895
|
### `ghostdock sandboxes containers restart`
|
|
879
896
|
|
|
@@ -909,7 +926,7 @@ MCP tool: `sandboxes_containers_start`.
|
|
|
909
926
|
|
|
910
927
|
### `ghostdock sandboxes containers stop`
|
|
911
928
|
|
|
912
|
-
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 sandbox sleeps and wakes, as Docker keeps a stopped container stopped, unless its restart policy is always. On a stopped sandbox it does nothing (note sandbox_stopped).
|
|
929
|
+
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 sandbox sleeps and wakes, as Docker keeps a stopped container stopped, unless its restart policy is always. On a stopped sandbox it does nothing (note sandbox_stopped). A lock does not block it. note says when it was the default container or the last one running: then SSH, commands and files have nowhere to land until one runs.
|
|
913
930
|
|
|
914
931
|
```
|
|
915
932
|
ghostdock sandboxes containers stop <sandbox-id> <container> [flags]
|
|
@@ -923,9 +940,25 @@ ghostdock sandboxes containers stop <sandbox-id> <container> [flags]
|
|
|
923
940
|
|
|
924
941
|
MCP tool: `sandboxes_containers_stop`.
|
|
925
942
|
|
|
943
|
+
### `ghostdock sandboxes containers unlock`
|
|
944
|
+
|
|
945
|
+
Unlock a container so Docker can remove or recreate it. Also one its image locked with the ghostdock.lock label. Never starts the sandbox: a stopped one gets it at its next start, and an overdue auto-delete it held goes ahead.
|
|
946
|
+
|
|
947
|
+
```
|
|
948
|
+
ghostdock sandboxes containers unlock <sandbox-id> <container> [flags]
|
|
949
|
+
```
|
|
950
|
+
|
|
951
|
+
| Argument | Description |
|
|
952
|
+
| --- | --- |
|
|
953
|
+
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
954
|
+
| `<container>` | Container, by name. Required. |
|
|
955
|
+
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
956
|
+
|
|
957
|
+
MCP tool: `sandboxes_containers_unlock`.
|
|
958
|
+
|
|
926
959
|
### `ghostdock sandboxes create`
|
|
927
960
|
|
|
928
|
-
Create a sandbox from a snapshot, OCI image, Dockerfile or Compose files. Inline content only: for a directory or ZIP (Dockerfile COPY/ADD, Compose build files) use `ghostdock sandboxes build`. Snapshots and catalog images can require environment entries, URL ports and MCP names (requiredEnvironment / requiredUrls / requiredMcps); a missing environment entry fails with its names (missingEnvironment), and removing a required URL or MCP fails with them (missingUrls / missingMcps). Returns once the
|
|
961
|
+
Create a sandbox from a snapshot, OCI image, Dockerfile or Compose files. Inline content only: for a directory or ZIP (Dockerfile COPY/ADD, Compose build files) use `ghostdock sandboxes build`. Snapshots and catalog images can require environment entries, URL ports and MCP names (requiredEnvironment / requiredUrls / requiredMcps); a missing environment entry fails with its names (missingEnvironment), and removing a required URL or MCP fails with them (missingUrls / missingMcps). Every source but a snapshot becomes a Compose project in the sandbox, run once with docker compose up -d; after that Docker is the truth. Returns once the project is up, with `boot`: how long the sandbox (VM) and the project's compose up took, each in ms, and the images it pulled. Idle-stop and auto-delete apply (defaults 20 minutes / 14 days). Read the sandboxes skill (`ghostdock skills get sandboxes`) for sources, manifests, lifecycle and providers.
|
|
929
962
|
|
|
930
963
|
```
|
|
931
964
|
ghostdock sandboxes create --source <object> [flags]
|
|
@@ -935,14 +968,15 @@ ghostdock sandboxes create --source <object> [flags]
|
|
|
935
968
|
| --- | --- |
|
|
936
969
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
937
970
|
| `--display-name <string>` | Display name for the sandbox. Optional. |
|
|
938
|
-
| `--source <object>` | What the sandbox boots from. Required. "image" boots an org catalog row by id ({ id } from images list / images get — images add OCI bookmarks, images add-dockerfile, and images add-compose rows) or any OCI ref ({ ref }); "dockerfile" builds inline Dockerfile text only (ghostdock.* LABEL lines parsed for manifest; this tool has no build directory, so COPY/ADD of local files fails — use the CLI `ghostdock sandboxes build --kind dockerfile` with a directory or ZIP); "compose"
|
|
971
|
+
| `--source <object>` | What the sandbox boots from. Required. "image" boots an org catalog row by id ({ id } from images list / images get — images add OCI bookmarks, images add-dockerfile, and images add-compose rows) or any OCI ref ({ ref }); "dockerfile" builds inline Dockerfile text only (ghostdock.* LABEL lines parsed for manifest; this tool has no build directory, so COPY/ADD of local files fails — use the CLI `ghostdock sandboxes build --kind dockerfile` with a directory or ZIP); "compose" runs the given inline files with docker compose up -d (must include docker-compose.yml/yaml or compose.yml/yaml; ghostdock.* service labels parsed for manifest). Every source but a snapshot becomes a Compose project in /srv/ghostdock/<sandbox name>, run once; an image is one service named after it, a Dockerfile the service app. A Compose project that needs extra files is not accepted here — use `ghostdock sandboxes build --kind compose`. "compose" also takes a published Compose project instead of files ({ reference: "oci://…", override? }): it runs through include:, the override merged into it. Image, dockerfile, and compose sources never appear in snapshots list. Published static sites use sites publish (CDN), not a snapshot. (JSON object) Required. |
|
|
972
|
+
| `--restart <string>` | Restart policy of the service an image or a Dockerfile becomes, Docker's names: unless-stopped (default), always, on-failure, or no (it does not come back after the sandbox sleeps). Not for Compose: its files set restart:. |
|
|
939
973
|
| `--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) |
|
|
940
974
|
| `--auto-stop-interval-minutes <number>` | Minutes of inactivity before the platform worker idle-stops the sandbox. -1 means always on. 0 is rejected. Omit for the platform default. Provider-native timers are optional backup. |
|
|
941
|
-
| `--
|
|
975
|
+
| `--lifecycle <string>` | What may make the sandbox disappear on its own. ephemeral: every stop wipes the VM and its disk, and the next start runs its Compose project again (edits in the project folder kept, everything else gone; locks too). auto_delete (default): a stop keeps the disk, and the record goes autoDeleteAfterDays after the stop. keep: never removed automatically. Omit for the image label ghostdock.ephemeral, else auto_delete. ephemeral is chosen here only. |
|
|
976
|
+
| `--auto-delete-after-days <integer>` | Days the sandbox stays stopped before the platform worker deletes the record (0–365; 0 deletes it when it stops). Omit for the platform default (14). Not with keep. A container a person locked holds it. |
|
|
942
977
|
| `--sandbox-provider-id <string>` | Configured sandbox-provider instance id from providers 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 sandboxes and has it is used. When no provider fits, the call fails with a not-configured error. |
|
|
943
978
|
| `--environment <object>` | Environment to give this sandbox. 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: sandbox-only variables/secrets to create with the sandbox (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 sandbox gets nothing unless listed here. (JSON object) |
|
|
944
|
-
| `--
|
|
945
|
-
| `--image-base <string>` | How the disk is made for one of Ghostdock's VM images: auto (default) clones the host's image base, a disk with the image already on it, when there is one; off always starts from an empty disk that pulls the image. For tests and comparisons; other images always start empty. |
|
|
979
|
+
| `--image-base <string>` | How the disk is made for one of Ghostdock's platform images: auto (default) clones the host's image base, a disk with the image already on it, when there is one; off always starts from an empty disk that pulls the image. For tests and comparisons; other images always start empty. |
|
|
946
980
|
| `--urls <array>` | Changes to the image’s or snapshot’s URLs, keyed by port. Omit for the image URLs as they are; otherwise you get the image URLs plus yours: an entry on the same port replaces that URL completely (omitted fields take their defaults), and { port, remove: true } drops it; removing a port the image does not declare does nothing. A required port cannot be removed. TCP URLs are always public. (JSON array) |
|
|
947
981
|
| `--mcps <array>` | Changes to the image’s or snapshot’s MCP exposures, keyed by name. Omit for the image MCPs as they are; otherwise you get the image MCPs plus yours: an entry with the same name replaces that MCP completely, and { name, remove: true } drops it; removing a name the image does not declare does nothing. A required MCP (requiredMcps) cannot be removed. (JSON array) |
|
|
948
982
|
|
|
@@ -968,7 +1002,7 @@ MCP tool: `sandboxes_default_container`.
|
|
|
968
1002
|
|
|
969
1003
|
### `ghostdock sandboxes delete`
|
|
970
1004
|
|
|
971
|
-
Permanently delete a sandbox and its files.
|
|
1005
|
+
Permanently delete a sandbox and its files. Refused while it has locked containers (sandbox_has_locked_containers, naming them) unless deleteLocked is true.
|
|
972
1006
|
|
|
973
1007
|
```
|
|
974
1008
|
ghostdock sandboxes delete <sandbox-id> [flags]
|
|
@@ -978,6 +1012,7 @@ ghostdock sandboxes delete <sandbox-id> [flags]
|
|
|
978
1012
|
| --- | --- |
|
|
979
1013
|
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
980
1014
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1015
|
+
| `--delete-locked` | Delete it with its locked containers. Without it, a locked container refuses the delete. |
|
|
981
1016
|
|
|
982
1017
|
MCP tool: `sandboxes_delete`.
|
|
983
1018
|
|
|
@@ -1061,7 +1096,7 @@ Files inside a sandbox.
|
|
|
1061
1096
|
|
|
1062
1097
|
### `ghostdock sandboxes files list`
|
|
1063
1098
|
|
|
1064
|
-
List the files in a sandbox directory (
|
|
1099
|
+
List the files in a sandbox directory. Default: the container's start folder (its dir).
|
|
1065
1100
|
|
|
1066
1101
|
```
|
|
1067
1102
|
ghostdock sandboxes files list <sandbox-id> [flags]
|
|
@@ -1072,7 +1107,7 @@ ghostdock sandboxes files list <sandbox-id> [flags]
|
|
|
1072
1107
|
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
1073
1108
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1074
1109
|
| `--container <string>` | Container to work in, by name, from sandboxes containers list. Default: the sandbox’s default container, else the one running container. With several running and no default the call fails and lists them. |
|
|
1075
|
-
| `--path <string>` | Directory to list
|
|
1110
|
+
| `--path <string>` | Directory to list: absolute, or relative to the container's start folder (its dir: the login user's home, else WORKDIR, else /). Defaults to that folder. |
|
|
1076
1111
|
| `--start` | Start the container first when it is not running, without asking. |
|
|
1077
1112
|
|
|
1078
1113
|
MCP tool: `sandboxes_files_list`.
|
|
@@ -1087,7 +1122,7 @@ ghostdock sandboxes files read <path> --sandbox-id <string> [flags]
|
|
|
1087
1122
|
|
|
1088
1123
|
| Argument | Description |
|
|
1089
1124
|
| --- | --- |
|
|
1090
|
-
| `<path>` | File path
|
|
1125
|
+
| `<path>` | File path: absolute, or relative to the container's start folder (for example src/App.vue). Required. |
|
|
1091
1126
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1092
1127
|
| `--sandbox-id <string>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
1093
1128
|
| `--container <string>` | Container to work in, by name, from sandboxes containers list. Default: the sandbox’s default container, else the one running container. With several running and no default the call fails and lists them. |
|
|
@@ -1097,7 +1132,7 @@ MCP tool: `sandboxes_files_read`.
|
|
|
1097
1132
|
|
|
1098
1133
|
### `ghostdock sandboxes files upload`
|
|
1099
1134
|
|
|
1100
|
-
Upload local files or directories to a sandbox
|
|
1135
|
+
Upload local files or directories to a sandbox's container, into its start folder (the login user's home, else WORKDIR, else /).
|
|
1101
1136
|
|
|
1102
1137
|
```
|
|
1103
1138
|
ghostdock sandboxes files upload <sandbox-id> [path] [flags]
|
|
@@ -1116,7 +1151,7 @@ MCP tool: `sandboxes_files_upload`.
|
|
|
1116
1151
|
|
|
1117
1152
|
### `ghostdock sandboxes list`
|
|
1118
1153
|
|
|
1119
|
-
List the sandboxes of an organization,
|
|
1154
|
+
List the sandboxes of an organization, with their lifecycle and deadlines. Each has a name (e.g. quiet-harbor), unique in the organization, that every sandbox tool accepts as sandboxId.
|
|
1120
1155
|
|
|
1121
1156
|
```
|
|
1122
1157
|
ghostdock sandboxes list [flags]
|
|
@@ -1231,24 +1266,6 @@ ghostdock sandboxes resize-disk <sandbox-id> --disk-gib <number> [flags]
|
|
|
1231
1266
|
|
|
1232
1267
|
MCP tool: `sandboxes_resize_disk`.
|
|
1233
1268
|
|
|
1234
|
-
### `ghostdock sandboxes set-boot`
|
|
1235
|
-
|
|
1236
|
-
Register a command that starts now and again after every restart. For example bun dev. On Compose it runs after the stack; on a Dockerfile it replaces the image CMD. Snapshots cannot register one. Read the sandbox-boot skill (`ghostdock skills get sandbox-boot`).
|
|
1237
|
-
|
|
1238
|
-
```
|
|
1239
|
-
ghostdock sandboxes set-boot <sandbox-id> --command <string> [flags]
|
|
1240
|
-
```
|
|
1241
|
-
|
|
1242
|
-
| Argument | Description |
|
|
1243
|
-
| --- | --- |
|
|
1244
|
-
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
1245
|
-
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1246
|
-
| `--command <string>` | Command to start, e.g. bun dev. Required. |
|
|
1247
|
-
| `--cwd <string>` | Directory to run it in. Default /. |
|
|
1248
|
-
| `--start` | Also start it now, not only after restarts. Default true. |
|
|
1249
|
-
|
|
1250
|
-
MCP tool: `sandboxes_set_boot`.
|
|
1251
|
-
|
|
1252
1269
|
### `ghostdock sandboxes shells`
|
|
1253
1270
|
|
|
1254
1271
|
Shell sessions that keep cwd and environment between commands.
|
|
@@ -1284,7 +1301,7 @@ ghostdock sandboxes shells create <sandbox-id> [flags]
|
|
|
1284
1301
|
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
1285
1302
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1286
1303
|
| `--container <string>` | Container to work in, by name, from sandboxes containers list. Default: the sandbox’s default container, else the one running container. With several running and no default the call fails and lists them. |
|
|
1287
|
-
| `--session-id <string>` | Id for the new session: a slug
|
|
1304
|
+
| `--session-id <string>` | Id for the new session: a slug. Omit to generate one. |
|
|
1288
1305
|
| `--start` | Start the container first when it is not running, without asking. |
|
|
1289
1306
|
|
|
1290
1307
|
MCP tool: `sandboxes_shells_create`.
|
|
@@ -1429,7 +1446,7 @@ MCP tool: `sandboxes_tools_list`.
|
|
|
1429
1446
|
|
|
1430
1447
|
### `ghostdock sandboxes update`
|
|
1431
1448
|
|
|
1432
|
-
Change a sandbox’s display name, idle-stop or
|
|
1449
|
+
Change a sandbox’s display name, idle-stop interval or lifecycle. Omit a field to keep it; null resets it to the platform default. Ephemeral is chosen at create only.
|
|
1433
1450
|
|
|
1434
1451
|
```
|
|
1435
1452
|
ghostdock sandboxes update <sandbox-id> [flags]
|
|
@@ -1441,7 +1458,8 @@ ghostdock sandboxes update <sandbox-id> [flags]
|
|
|
1441
1458
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1442
1459
|
| `--display-name <string>` | New display name. Null clears it; omit to keep it. |
|
|
1443
1460
|
| `--auto-stop-interval-minutes <number>` | Minutes of inactivity before the platform worker idle-stops the sandbox. -1 always on. 0 is rejected. Null resets to the platform default. Provider-native timers are optional backup. |
|
|
1444
|
-
| `--
|
|
1461
|
+
| `--lifecycle <string>` | auto_delete: the record goes autoDeleteAfterDays after the sandbox stops. keep: never removed automatically. |
|
|
1462
|
+
| `--auto-delete-after-days <integer>` | Days stopped before the record is deleted (0–365; 0 deletes it when it stops). Null writes the platform default. Not with keep. |
|
|
1445
1463
|
|
|
1446
1464
|
MCP tool: `sandboxes_update`.
|
|
1447
1465
|
|
package/dist/cli.md
CHANGED
|
@@ -97,6 +97,7 @@ Commands are grouped by resource, like `gh` or `kubectl`: `ghostdock <resource>
|
|
|
97
97
|
<!-- generated:command-groups:start (bun run sync:cli-reference; do not edit) -->
|
|
98
98
|
```
|
|
99
99
|
ghostdock apps Published apps of an organization.
|
|
100
|
+
ghostdock docker Docker over the private network: a sandbox's Docker engine from this machine.
|
|
100
101
|
ghostdock env Manage organization environment variables and secrets.
|
|
101
102
|
ghostdock images Organization image catalog: OCI bookmarks, Dockerfiles and Compose files.
|
|
102
103
|
ghostdock login Sign in and store a device access token for this machine…
|
|
@@ -632,6 +633,56 @@ ghostdock network disconnect
|
|
|
632
633
|
Without that, names of the private network hang while you are disconnected. `network status`
|
|
633
634
|
says when such a file is still there.
|
|
634
635
|
|
|
636
|
+
### `ghostdock docker context`
|
|
637
|
+
|
|
638
|
+
Point your own `docker` and `docker compose` at a sandbox's Docker engine, over the private
|
|
639
|
+
network with mutual TLS ([ADR 0032](../../docs/adr/0032-docker-api-over-gdo-net.md)). Connect
|
|
640
|
+
first: the context uses this machine's device.
|
|
641
|
+
|
|
642
|
+
```bash
|
|
643
|
+
ghostdock network connect
|
|
644
|
+
ghostdock docker context quiet-harbor --org acme
|
|
645
|
+
# ✓ Docker context ghostdock-acme-quiet-harbor (in use)
|
|
646
|
+
# tcp://quiet-harbor.acme.ghostdock.internal:2376
|
|
647
|
+
# Certificate for this device, valid until 2026-11-20.
|
|
648
|
+
# → docker ps
|
|
649
|
+
docker ps
|
|
650
|
+
docker compose up -d
|
|
651
|
+
ghostdock docker context north-pier --no-use # create only: docker --context ghostdock-acme-north-pier ps
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
- **One Docker context per sandbox**, `ghostdock-<org>-<sandbox>`, for
|
|
655
|
+
`tcp://<sandbox>.<org>.ghostdock.internal:2376`. Running the command again updates it;
|
|
656
|
+
without `--no-use` it also becomes Docker's current context (`docker context use`). A
|
|
657
|
+
`DOCKER_HOST` or `DOCKER_CONTEXT` in your shell wins over that: the command says so.
|
|
658
|
+
- **One client certificate per organization and machine**, in
|
|
659
|
+
`~/.config/ghostdock/docker/<organizationId>/`: `key.pem` (ECDSA P-256, made on this machine,
|
|
660
|
+
0600; only a certificate request is sent), `cert.pem` and `ca.pem`. The certificate names your
|
|
661
|
+
user, this machine's device and the organization, and lives 30 days. A new one replaces the
|
|
662
|
+
earlier one of this device for that organization: the old one stops working at once.
|
|
663
|
+
- **Renewal:** `ghostdock network connect` and `ghostdock docker context` renew every
|
|
664
|
+
certificate of this machine with less than 10 days left, and update the contexts they wrote
|
|
665
|
+
(`~/.config/ghostdock/docker/contexts.json`). An expired certificate fails Docker's TLS
|
|
666
|
+
handshake with Docker's own error: run `ghostdock docker context <sandbox>` again.
|
|
667
|
+
- **`no such host`** on a `ghostdock.internal` address means this machine is not connected:
|
|
668
|
+
run `ghostdock network connect`. The context's description in `docker context ls` says so
|
|
669
|
+
too.
|
|
670
|
+
- **Renamed organization:** the context's host keeps the old name, which stops resolving. Run
|
|
671
|
+
`ghostdock docker context <sandbox>` again to update the host.
|
|
672
|
+
- **Only from this device:** the sandbox checks every request with the app (membership, device,
|
|
673
|
+
the network pause). A copied key and certificate do not work from another machine; a refusal
|
|
674
|
+
comes back as Docker's `Error response from daemon: Ghostdock: …` with what to run.
|
|
675
|
+
- **Warnings:** a sandbox on another provider than this machine's connection (with the
|
|
676
|
+
`network connect` command that reaches it), and a sandbox whose base image is too old for
|
|
677
|
+
Docker over the network (restart it to update). A sandbox that cannot have a Docker engine
|
|
678
|
+
over the network (its provider has no private network, it has no address there yet, or a
|
|
679
|
+
name that is not a DNS label) gets no context, and the command says why.
|
|
680
|
+
- **A stopped sandbox** gets its context too: the first connection to it starts it (wake on
|
|
681
|
+
SYN), and its Docker engine answers once it runs. A start that takes longer than Docker's
|
|
682
|
+
32 s dial timeout fails that one command with Docker's `i/o timeout`; the next one works.
|
|
683
|
+
- **Needs Docker's CLI** (`docker` on `PATH`: Docker Desktop, OrbStack, or the CLI alone). The
|
|
684
|
+
Docker engine itself runs in the sandbox.
|
|
685
|
+
|
|
635
686
|
## Command index
|
|
636
687
|
|
|
637
688
|
Every command with its arguments and what it does. Run `ghostdock <command> --help` for its flags,
|
|
@@ -644,6 +695,12 @@ or read [`cli-reference.md`](cli-reference.md) for every command's full descript
|
|
|
644
695
|
| --- | --- |
|
|
645
696
|
| `ghostdock apps list [flags]` | List the live published apps (sites) of an organization, with their URLs. |
|
|
646
697
|
|
|
698
|
+
#### docker
|
|
699
|
+
|
|
700
|
+
| Command | What it does |
|
|
701
|
+
| --- | --- |
|
|
702
|
+
| `ghostdock docker context <sandbox> [flags]` | Point Docker at a sandbox's Docker engine over the private network: plain… |
|
|
703
|
+
|
|
647
704
|
#### env
|
|
648
705
|
|
|
649
706
|
| Command | What it does |
|
|
@@ -742,11 +799,12 @@ or read [`cli-reference.md`](cli-reference.md) for every command's full descript
|
|
|
742
799
|
| `ghostdock sandboxes commands logs <command-id> --sandbox-id <string> --session-id <string> [flags]` | Get a page of a shell command’s stdout and stderr. |
|
|
743
800
|
| `ghostdock sandboxes commands run <sandbox-id> --command <string> [flags]` | Run a shell command in a sandbox. |
|
|
744
801
|
| `ghostdock sandboxes containers list <sandbox-id> [flags]` | List the containers of a sandbox, running or not. |
|
|
802
|
+
| `ghostdock sandboxes containers lock <sandbox-id> <container> [flags]` | Lock a container against removal. |
|
|
745
803
|
| `ghostdock sandboxes containers logs <sandbox-id> <container> [flags]` | Read a container’s output, as docker logs does. |
|
|
746
|
-
| `ghostdock sandboxes containers protection <sandbox-id> <container> --protected <value> [flags]` | Switch a container’s deletion protection on or off. |
|
|
747
804
|
| `ghostdock sandboxes containers restart <sandbox-id> <container> [flags]` | Restart a container, as docker restart does (stopping as docker stop does). |
|
|
748
805
|
| `ghostdock sandboxes containers start <sandbox-id> <container> [flags]` | Start a stopped container, as docker start does. |
|
|
749
806
|
| `ghostdock sandboxes containers stop <sandbox-id> <container> [flags]` | Stop a container, as docker stop does. |
|
|
807
|
+
| `ghostdock sandboxes containers unlock <sandbox-id> <container> [flags]` | Unlock a container so Docker can remove or recreate it. |
|
|
750
808
|
| `ghostdock sandboxes create --source <object> [flags]` | Create a sandbox from a snapshot, OCI image, Dockerfile or Compose files. |
|
|
751
809
|
| `ghostdock sandboxes default-container <sandbox-id> [flags]` | Show, set or clear the sandbox’s default container. |
|
|
752
810
|
| `ghostdock sandboxes delete <sandbox-id> [flags]` | Permanently delete a sandbox and its files. |
|
|
@@ -754,17 +812,16 @@ or read [`cli-reference.md`](cli-reference.md) for every command's full descript
|
|
|
754
812
|
| `ghostdock sandboxes env get <sandbox-id> [flags]` | Get a sandbox’s environment: selections, bindings and local entries. |
|
|
755
813
|
| `ghostdock sandboxes env select <sandbox-id> --environment <array> [flags]` | Replace the organization entries a sandbox exports. |
|
|
756
814
|
| `ghostdock sandboxes env set <name> --sandbox-id <string> --value <string> [flags]` | Create or replace one of a sandbox’s own variables or secrets. |
|
|
757
|
-
| `ghostdock sandboxes files list <sandbox-id> [flags]` | List the files in a sandbox directory
|
|
815
|
+
| `ghostdock sandboxes files list <sandbox-id> [flags]` | List the files in a sandbox directory. |
|
|
758
816
|
| `ghostdock sandboxes files read <path> --sandbox-id <string> [flags]` | Read a file from a sandbox: utf8 text, or base64 for small binaries. |
|
|
759
|
-
| `ghostdock sandboxes files upload <sandbox-id> [path] [flags]` | Upload local files or directories to a sandbox
|
|
760
|
-
| `ghostdock sandboxes list [flags]` | List the sandboxes of an organization,
|
|
817
|
+
| `ghostdock sandboxes files upload <sandbox-id> [path] [flags]` | Upload local files or directories to a sandbox's container, into its start… |
|
|
818
|
+
| `ghostdock sandboxes list [flags]` | List the sandboxes of an organization, with their lifecycle and deadlines. |
|
|
761
819
|
| `ghostdock sandboxes mcps create <sandbox-id> --name <string> --port <integer> [flags]` | Expose an MCP server running in a sandbox. |
|
|
762
820
|
| `ghostdock sandboxes mcps delete <mcp-id>` | Delete an MCP endpoint of a sandbox. |
|
|
763
821
|
| `ghostdock sandboxes mcps list <sandbox-id> [flags]` | List the MCP endpoints a sandbox exposes (name, port, path, autoWake). |
|
|
764
822
|
| `ghostdock sandboxes mcps update <mcp-id> [flags]` | Change an MCP endpoint’s name, port, path or autoWake setting. |
|
|
765
823
|
| `ghostdock sandboxes resize <sandbox-id> [flags]` | Change a sandbox’s CPU and/or memory. |
|
|
766
824
|
| `ghostdock sandboxes resize-disk <sandbox-id> --disk-gib <number> [flags]` | Grow a sandbox’s disk. |
|
|
767
|
-
| `ghostdock sandboxes set-boot <sandbox-id> --command <string> [flags]` | Register a command that starts now and again after every restart. |
|
|
768
825
|
| `ghostdock sandboxes shells close <session-id> --sandbox-id <string> [flags]` | Close a shell session. |
|
|
769
826
|
| `ghostdock sandboxes shells create <sandbox-id> [flags]` | Open a shell session that keeps cwd and environment between commands. |
|
|
770
827
|
| `ghostdock sandboxes ssh get <sandbox-id> [flags]` | Get temporary SSH access to a sandbox (command and token, 60 minutes). |
|
|
@@ -775,7 +832,7 @@ or read [`cli-reference.md`](cli-reference.md) for every command's full descript
|
|
|
775
832
|
| `ghostdock sandboxes storage list <sandbox-id> [flags]` | List a sandbox’s volumes and sandbox folders. |
|
|
776
833
|
| `ghostdock sandboxes tools call <name> --sandbox-id <string> --arguments <object> [flags]` | Call a tool on an MCP server inside a sandbox. |
|
|
777
834
|
| `ghostdock sandboxes tools list <sandbox-id> [flags]` | List the tools of the MCP servers a sandbox exposes. |
|
|
778
|
-
| `ghostdock sandboxes update <sandbox-id> [flags]` | Change a sandbox’s display name, idle-stop or
|
|
835
|
+
| `ghostdock sandboxes update <sandbox-id> [flags]` | Change a sandbox’s display name, idle-stop interval or lifecycle. |
|
|
779
836
|
| `ghostdock sandboxes urls create <sandbox-id> --port <integer> [flags]` | Expose a sandbox port as a URL. |
|
|
780
837
|
| `ghostdock sandboxes urls delete <url-id>` | Delete a sandbox URL. |
|
|
781
838
|
| `ghostdock sandboxes urls list <sandbox-id> [flags]` | List the URLs that expose a sandbox’s ports, with protocol, access and title. |
|
|
@@ -828,7 +885,7 @@ and secrets, see [`ghostdock env`](#ghostdock-env).
|
|
|
828
885
|
| ------------------------------- | ------------------------------------------------------------- | --------------------------------- |
|
|
829
886
|
| `GHOSTDOCK_BASE_URL` | API origin the CLI talks to. Override for local dev / self-hosted instances. | Local/dev builds default to `http://localhost:3000`. npm-published builds default to the production API origin baked at publish time. Override with `--base-url` or this env var. |
|
|
830
887
|
| `GHOSTDOCK_ORG` | Organization (id or slug) for commands run without `--org`. Takes precedence over the default from `organizations use`. | unset |
|
|
831
|
-
| `XDG_CONFIG_HOME` | Base directory for the CLI's per-machine state (`ghostdock/credentials.json`, `ghostdock/settings.json`, `ghostdock/network/`). | `~/.config` (native Windows: `%APPDATA%`) |
|
|
888
|
+
| `XDG_CONFIG_HOME` | Base directory for the CLI's per-machine state (`ghostdock/credentials.json`, `ghostdock/settings.json`, `ghostdock/network/`, `ghostdock/docker/`). | `~/.config` (native Windows: `%APPDATA%`) |
|
|
832
889
|
| `GHOSTDOCK_CREDENTIALS_PATH` | Absolute path to the credentials file, overriding the default. `settings.json` (the default organization) sits in the same directory, so each credentials file keeps its own default — handy for a second account. | `~/.config/ghostdock/credentials.json` |
|
|
833
890
|
|
|
834
891
|
Example for local development against a Nuxt dev server:
|