hart ws
List, create, open, wake and delete workspaces
cmd/hart at v1.5.0Workspaces of a team. A workspace is named by its id or its name; without one, the commands use the
workspace of the settings (--workspace, HART_WORKSPACE, the context).
hart ws [flags]
hart ws [command]Aliases: ws, workspace.
Subcommands:
hart ws create: Create a workspacehart ws delete: Delete a workspacehart ws list: List the team's workspaceshart ws open: Open a workspace in the browserhart ws wake: Wake a workspace and its services
hart ws create
Creates a workspace in the team. The name defaults to the repository's name. Without --plan the first of
the installation's workspace plans is used (as in the console); without --base-image the installation's default. A Git provider is chosen
for you when the installation has only one; the repository needs a connection to it (hart cannot make
one: connect it in the console under Settings, Git connections).
The workspace is created in the background; --wait follows it until it runs.
hart ws create [name] [flags]Examples:
hart ws create --repo acme/shop --branch main --plan ide-s
hart ws create scratch --plan ide-s| Flag | Description |
|---|---|
--base-image string | the base image's id (default: the installation's default) |
--branch string | the branch to check out (default: the repository's default branch) |
--no-sleep | never put the workspace to sleep when idle (availability always) |
--plan string | the workspace plan's id (see GET /plans) |
--provider string | the Git provider's id (default: the only one) |
--public | let everyone with the link reach the workspace's dev domain (default: team members only) |
--repo string | clone this repository, owner/name at the Git provider |
--timeout duration | how long --wait waits (default 10m0s) |
--wait | wait until the workspace is created |
hart ws delete
Deletes the workspace softly: it stops and keeps its volume for 7 days, and 'hart ws list --deleted'
shows it until then. Asks first unless --yes is given.
hart ws delete [workspace] [flags]| Flag | Description |
|---|---|
--timeout duration | how long --wait waits (default 5m0s) |
--wait | wait until the deletion is done |
-y, --yes | do not ask for confirmation |
hart ws list
List the team's workspaces
hart ws list [flags]| Flag | Description |
|---|---|
--deleted | list the deleted workspaces that can still be restored |
hart ws open
Prints the workspace's address in the console and opens it in the browser, which wakes the workspace.
--no-browser only prints it.
hart ws open [workspace] [flags]| Flag | Description |
|---|---|
--no-browser | only print the address |
hart ws wake
Wakes the IDE and every service whose run switch is on, or with --target only those. A target that
cannot wake says why in the table (no capacity, sleeps until, paused). --wait waits until every target
the wake started is ready (with --target: those targets; a service whose run switch is off is not
woken and not waited for; against a server before 1.0.3 only the IDE), says on stderr which ones it
waits for, and fails when one of them cannot wake.
hart ws wake [workspace] [flags]| Flag | Description |
|---|---|
--target stringArray | wake only this target: ide or a service's name (repeatable) |
--timeout duration | how long --wait waits (default 5m0s) |
--wait | wait until every target the wake started (or each --target) is ready |