Init Command
traduora init sets up credentials interactively.
Purpose
- Validate your credentials before saving.
- Generate config file for future commands.
- Set default project in state file.
Command
traduora init [--url <url>] [--role <admin|editor|viewer>] [--config <path>] [--state <path>]
Modes
Mode A: Input API credentials
You provide client credentials directly:
clientIdclientSecret(input is hidden)
The command validates them via token request, then asks for projectId.
- Prompt includes hint: find ID from web URL
https://<domain>/projects/<id>/translations - The entered
projectIdis saved as default project in state.
Mode B: Login account and auto-create project client
You provide account email/password:
- CLI asks account email/password (password input is hidden).
- CLI requests user token (
grant_type=password). - CLI fetches project list.
- CLI asks which project to use (interactive picker, arrow keys).
- CLI creates project client with role (
editorby default). - CLI validates generated client credentials.
- CLI writes config.
- CLI writes selected project as default project in state.
Parameters
| Option | Description | Default |
|---|---|---|
--url | Traduora base URL | asked interactively |
--role | role for auto-created project client | editor |
--config | config output path (JSON only) | traduora.config.json |
--state | state file output path | .traduora.state.json |
Typical usage
traduora init --url https://app.traduora.co --role editor