CLI reference / Retention

CLI reference

Retention

wiele workspace retention and wiele org retention: keep, limit and prune past file versions.

By default Wiele keeps every version of every file. Owners and admins can limit that per organization, workspace, folder or file, or delete past versions now. Current files on every branch are never removed. See Versions, history and retention.

wiele workspace retention show

List version retention policies in a workspace.

wiele workspace retention show [flags]
Flag Description
--workspace string Workspace ID, slug or name. Not needed inside a checkout or when the path is written as WORKSPACE:/path.
--org string Organization ID or slug. Default: the checkout's organization when the workspace comes from the checkout, otherwise the one picked with wiele org use.

wiele workspace retention explain

Show the retention rule that applies to a path and whether it comes from the path, a parent folder, the workspace or the organization.

wiele workspace retention explain [flags] [<path>]
Argument Description
<path> Optional. Workspace path on main. Omit it for the whole workspace.
Flag Description
--workspace string Workspace ID, slug or name. Not needed inside a checkout or when the path is written as WORKSPACE:/path.
--org string Organization ID or slug. Default: the checkout's organization when the workspace comes from the checkout, otherwise the one picked with wiele org use.

wiele workspace retention set

Keep past versions of a file, the files under a folder, or the whole workspace, for a number of versions, days, or both. A version stays while either limit keeps it. The nearest setting wins over its parents and the organization default. Stricter settings start after 7 days.

wiele workspace retention set [flags] [<path>]
Argument Description
<path> Optional. File or folder on main. Omit it for the whole workspace.
Flag Description
--workspace string Workspace ID, slug or name. Not needed inside a checkout or when the path is written as WORKSPACE:/path.
--org string Organization ID or slug. Default: the checkout's organization when the workspace comes from the checkout, otherwise the one picked with wiele org use.
--keep-versions integer Keep this many of each file's newest past versions, 1 to 100,000.
--keep-days integer Keep past versions replaced within this many days, 1 to 36,500.
--keep-all Keep every past version. On a folder or file, this overrides a stricter rule above it.

wiele workspace retention clear

Remove a policy so the folder, file or workspace follows its parent or the organization default again. Takes effect after 7 days.

wiele workspace retention clear [flags] [<path>]
Argument Description
<path> Optional. File or folder on main. Omit it for the whole workspace.
Flag Description
--workspace string Workspace ID, slug or name. Not needed inside a checkout or when the path is written as WORKSPACE:/path.
--org string Organization ID or slug. Default: the checkout's organization when the workspace comes from the checkout, otherwise the one picked with wiele org use.

wiele workspace retention prune

Delete past file versions under a folder now, keeping the newest versions or recent days you name. Current files on every branch stay. Deleted versions cannot be recovered.

wiele workspace retention prune [flags] [<path>]
Argument Description
<path> Optional. File or folder on main. Omit it for the whole workspace.
Flag Description
--workspace string Workspace ID, slug or name. Not needed inside a checkout or when the path is written as WORKSPACE:/path.
--org string Organization ID or slug. Default: the checkout's organization when the workspace comes from the checkout, otherwise the one picked with wiele org use.
--keep-versions integer Keep this many of each file's newest past versions, 1 to 100,000.
--keep-days integer Keep past versions replaced within this many days, 1 to 36,500.
--dry-run Count what would be deleted without deleting it.

wiele org retention show

Show the organization's default version retention.

wiele org retention show [flags]
Flag Description
--org string Organization ID or slug. Default: the checkout's organization when the workspace comes from the checkout, otherwise the one picked with wiele org use.

wiele org retention set

Set the default retention for every workspace, folder and file without its own policy. Past versions outside the limits are deleted for good once the change takes effect after 7 days. Keeping every version is recommended.

wiele org retention set [flags]
Flag Description
--org string Organization ID or slug. Default: the checkout's organization when the workspace comes from the checkout, otherwise the one picked with wiele org use.
--keep-versions integer Keep this many of each file's newest past versions, 1 to 100,000.
--keep-days integer Keep past versions replaced within this many days, 1 to 36,500.
--keep-all Keep every past version. On a folder or file, this overrides a stricter rule above it.