Configuration
Configuration
Section titled “Configuration”The CLI uses two kinds of configuration: user settings (per user, per device) and workspace settings (per project or directory). They work together to determine how the CLI behaves.
User settings (.collingo in home directory)
Section titled “User settings (.collingo in home directory)”- Location:
~/.collingo(in your OS home directory). - Contains: Your API token (set by
collingo login). - Scope: Applies to your user on this device. Do not commit this file; it is private.
Workspace settings (.collingo.json in the workspace)
Section titled “Workspace settings (.collingo.json in the workspace)”- Location: In the root of your project or code directory. The file is created by
collingo init. The CLI looks for it in the current directory or a parent directory. - Contains: Project ID (links this directory to a Collingo project), optionally template (see below).
- Scope: Tied to the codebase. Safe to commit (e.g. with git) so your team shares the same project link.
Template and workspace export
Section titled “Template and workspace export”The template field ties your workspace to a stack (Vue i18n, Flutter, JSON, i18next) and, when configured, drives collingo export without a subcommand. Omit template entirely when you do not use a template.
{ "project": "<project-id>", "template": { "kind": "flutter", "directory": "lib/l10n", "formatted": true }}| Field | Meaning |
|---|---|
kind | vue-i18n, flutter, json, or i18next (or omit / empty for no template). |
directory | For flutter and i18next: output directory, relative to the workspace root (the folder that contains .collingo.json). Required for collingo export with those kinds. |
outputFile | For vue-i18n and json: optional file path relative to the workspace root. If omitted, collingo export prints to stdout (same as the format-specific subcommands without a file). |
formatted | If true, requests pretty-printed export output (same as --format on subcommands). |
Run collingo export from the workspace to export using this template. Use collingo export vue-i18n, collingo export flutter, etc. when you want to pass paths and flags explicitly.
After collingo init, you can change the template with collingo init --update.
How they work together
Section titled “How they work together”- Project context: Commands that need a project (groups, entries, export) use the project ID from the workspace config. You must run them from a directory that has (or inherits) a
.collingo.jsonwith a project ID, or pass--working-dir <dir>to point to such a directory. - User config and
--working-dir: User config is always read from the home directory. The--working-dirflag only affects which directory is used to find.collingo.jsonand the current working directory for relative paths; it does not change where user settings are loaded from.
Inspecting current config
Section titled “Inspecting current config”Run collingo env to see whether you are in a workspace, the path to the workspace config file, the project ID, template kind and export options, and login status. This is useful for debugging.