Workspaces

A workspace holds repositories. district repo create creates a repository in one. ws is an alias of workspace, so district ws create and district workspace create are the same command.

district workspace create

district workspace create <name> [--production | --staging | --dev]

Creates a workspace in the organization the session names, and prints its name and ws_ id on stdout. The caller becomes the workspace administrator.

The caller needs an active membership of the organization with the workspace:create permission, which an Owner and an Admin hold, as in every organization. Another caller is refused with the API's message.

The command sends one request and never repeats it: the mutation is not idempotent, so a second request would create a second workspace with the same name.

Arguments

ArgumentDescription
<name>The name of the workspace. The command trims it, and it must hold 1 to 120 characters.

Flags

FlagDescription
--production | --staging | --devThe environment to act in. Pass one at most. Without a flag, the command uses the environment that the last district login recorded, or production.

Output

$ district workspace create Alpha
created Alpha (ws_01K4X0J8W1QZ5B7N3G2R6TQ9YD)

Exit codes

Exit codeMeaning
0The workspace is created.
1The API refused the call with its own message, or district-api did not answer.