Skip to content

CLI: Spaces

Commands to create, list, and delete spaces, and to set the space used when you omit --space. Common flags that you can add to any command (--host, --json, and others) are in the CLI command reference.

Command Description
hakocms-cli spaces create Create a space and make the creator its owner. Only environment administrators can do this
hakocms-cli spaces delete Delete a space, together with its entries and media
hakocms-cli spaces get Get a space
hakocms-cli spaces list List spaces (the ones you are a member of; all of them for environment administrators)
hakocms-cli spaces use Set the space used when you omit –space (per connection target)

Create a space and make the creator its owner. Only environment administrators can do this.

ターミナルウィンドウ
hakocms-cli spaces create [OPTIONS]
Flag or argument Description
--name <TEXT> Display name
--slug <TEXT> Slug (the ID used in URLs)
--data <JSON> The whole body (JSON). Use @file to read from a file, - to read from standard input. Other flags are applied on top of it

Delete a space, together with its entries and media.

Deletes a space.

Deletes all entries, media, and settings. This cannot be undone. Requires space.manage (owner in the default roles).

Environment administrators who are not members can also do this.

ターミナルウィンドウ
hakocms-cli spaces delete [OPTIONS] <SLUG>
Flag or argument Description
<SLUG> The space’s slug
--confirm <NAME> To confirm, write the target’s name (when not running in a terminal)

Get a space.

Gets a space.

A space you are not a member of returns 404, as if it did not exist.

ターミナルウィンドウ
hakocms-cli spaces get <SLUG>
Flag or argument Description
<SLUG> The space’s slug

List spaces (the ones you are a member of; all of them for environment administrators)

Lists spaces.

The spaces you are a member of. For environment administrators, all spaces.

ターミナルウィンドウ
hakocms-cli spaces list

Set the space used when you omit –space (per connection target)

ターミナルウィンドウ
hakocms-cli spaces use <SLUG>
Flag or argument Description
<SLUG> The space’s slug