Skip to content

Managing groups

You can manage groups in a project from the terminal with the collingo groups command. Use it to list groups, create new ones, update their data, or delete them. Groups live inside a project; entries live inside groups. See Managing projects and Managing entries.

Project context: All group commands require a project context. Run the CLI from a directory that contains a .collingo.json workspace config (for example after running collingo init in your app repo), or pass --working-dir <dir> to point to such a directory. The workspace config links the directory to a project.

To list all groups in the current project, run:

Terminal window
collingo groups list

You can also use the alias ls: collingo groups ls.

The command prints one line per group in the form [id] breadcrumb > displayName (technicalName). Use the id or the technical name (and group path where relevant) when you call update or delete with flags.

To create a new group, run:

Terminal window
collingo groups create

Alias: add.

Parameters:

  • Display name (human-readable name): Set with --display-name <name>, or omit and you will be asked to enter a name.
  • Technical name (identifier for your code): Set with --technical-name <name>, or omit and you will be asked to enter a technical name.
  • Parent group: Set with --parent <path> (group path, e.g. base.footer) or --parent-id <id> (the ID of the parent group). You cannot use both. Omit both and you will be asked whether to select a parent group; if you choose yes, you pick one interactively. Leave both unset to create a top-level group.

Example with all values passed by flags:

Terminal window
collingo groups create --display-name "Footer" --technical-name footer --parent base

When the group is created, the CLI prints the new group’s display name and its id.

To change a group’s data, run:

Terminal window
collingo groups update

Alias: edit.

Parameters:

  • The group to edit: Set with --group <path> (e.g. base.footer) or --group-id <id>. You cannot use both. Omit both and you will be asked to choose a group interactively.
  • The new display name: Set with --display-name <name>, or omit and you will be asked whether to update it and then prompted.
  • The new technical name: Set with --technical-name <name>, or omit and you will be asked whether to update it and then prompted.
  • Parent group: Set with --parent <id> (the ID of the new parent) to move the group under another group, or --root-group to make it a top-level group (no parent). You cannot use --parent and --root-group together. Omit both and you will be asked whether to change the parent (or remove it) interactively.

Example with flags:

Terminal window
collingo groups update --group-id <id> --display-name "New Display Name"

If there is nothing to update, the CLI prints “Nothing to update”.

To delete a group, run:

Terminal window
collingo groups delete

Alias: rm.

Parameters:

  • The group to delete: Set with --group <path> (e.g. main.footer) or --group-id <id>. You cannot use both. Omit both and you will be asked to choose a group interactively.
  • Skip confirmation: Set --yes to delete without being asked. If you omit it, the CLI shows the group and asks you to confirm.

Example without confirmation prompt:

Terminal window
collingo groups delete --group-id <id> --yes

Deleting a group is irreversible and removes the group and its data (including sub groups and entries).

If you run the CLI from a different directory and need to use a specific workspace config, pass the global flag --working-dir <dir>. That directory must contain a .collingo.json with the project ID. This applies to all groups commands.