Skip to content

Managing entries

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

Project context: All entry 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 entries in a group, run:

Terminal window
collingo entries list

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

Parameters:

  • The group: Set with --group <path> (e.g. base.footer) or --group-id <id> (the ID of the group). You cannot use both. Omit both and you will be asked to choose a group interactively.

The command prints one line per entry: [technicalName] | baseTerm. If an entry has context info, a second line shows -> Context: .... If the group has no entries, the CLI prints “Group has no entries”. Use the technical name from this output when you call update or delete with flags.

Example:

Terminal window
collingo entries list --group base.footer

To create a new entry in a group, run:

Terminal window
collingo entries create

Alias: add.

Parameters:

  • The group where the entry is added: 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.
  • Technical name (identifier for your code): Set with --technical-name <name>, or omit and you will be asked to enter a technical name.
  • Base term (the term in the base language): Set with --base-term <term>, or omit and you will be asked to enter the base term.
  • Context info (optional): Set with --context-info <text>, or omit and you can optionally enter context info when prompted.

Example with flags:

Terminal window
collingo entries create --group base.footer --technical-name labelImprint --base-term "Imprint"

When the entry is created, the CLI prints the entry’s technical name and the group id.

To change an entry’s data or move it to another group, run:

Terminal window
collingo entries update

Alias: edit.

Parameters:

  • The group that contains the entry: Set with --group <path> or --group-id <id>. You cannot use both. Omit both and you will be asked to choose a group interactively.
  • The entry to edit (technical name): Set with --entry <technicalName>, or omit and you will be asked to choose an entry from the group interactively.
  • The new technical name: Set with --technical-name <name>, or omit and you will be asked whether to update it and then prompted.
  • The new base term: Set with --base-term <term>, or omit and you will be asked whether to update it and then prompted.
  • Context info: Set with --context <text> for new context, or --no-context to remove it. You cannot use both. Omit both and you will be asked whether to update or remove context interactively.
  • Move to another group: Set with --new-group <path> or --new-group-id <id> (the group to move the entry to). You cannot use both. Omit both and you will be asked whether to move the entry and then can choose a group interactively.

Example with flags:

Terminal window
collingo entries update --group base.footer --entry labelImprint --base-term "Legal Imprint"

If you change the technical name or move the entry to another group, the CLI creates the entry in the new place and then deletes the old one.

To delete an entry from a group, run:

Terminal window
collingo entries delete

Alias: rm.

Parameters:

  • The ID of the group that contains the entry: Set with --group <id> (use the group ID from collingo groups list or from the group’s context). Omit and you will be asked to choose a group interactively.
  • The technical name of the entry to delete: Set with --technical-name <name>, or omit and you will be asked to enter the technical name.
  • Skip confirmation: Set --yes to delete without being asked. If you omit it, the CLI shows the entry and asks you to confirm.

Example without confirmation prompt:

Terminal window
collingo entries delete --group <group-id> --technical-name labelImprint --yes

Deleting an entry is irreversible.

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 entries commands.