Skip to content
Tools/Workspace & Portfolios/init_workspace

init_workspace

Initialise a UPG workspace. Creates `.upg/` and moves the current .upg file into it. Unlocks multi-product management.

Workspace & Portfoliosnon-atomic. The operation creates a directory and (optionally) moves a file as separate filesystem mutations.

Arguments

move_existingbooleanoptional

Move existing .upg files into the workspace (default true)

Returns

Shape
{ message,...result }

result carries the workspace path and the moved file's new location.

Examples

Live call against the Notion example graph.

Output

{
  "message": "Workspace initialized",
  "workspace_path": ".upg/",
  "default_product": "fixture.upg",
  "products": [
    {
      "file": "fixture.upg",
      "title": "Notion (SATURATED test graph)"
    }
  ],
  "current_product": {
    "title": "Notion (SATURATED test graph)",
    "entities": 2054
  }
}

Warnings

One-time setup operation. Idempotent failure on retry: if the workspace already exists, raises `WorkspaceAlreadyExistsError`. Pair with `get_workspace_info` to check state before re-running.

See Also