CLI Flags
yaku [flags] [text]Text can be provided as positional arguments, via -f (files), or piped through stdin. See Input & Output for details.
Translation flags
Section titled “Translation flags”| Flag | Type | Default | Description |
|---|---|---|---|
--to | string | config default-target | Required. Target language code (e.g., zh-TW, ja, en). |
--from | string | auto-detect | Source language code. Omit to let the LLM detect automatically. |
--mode | string | translate | translate — translate to target language. polish — refine writing already in the target language. See Polish Mode. |
--context | string | Domain hint for the LLM (e.g., "Kubernetes docs", "formal email"). Helps resolve ambiguous terms. |
Input / output flags
Section titled “Input / output flags”| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--file | -f | string[] | Input file path(s). Repeat for multiple files: -f a.md -f b.md. | |
--output | -o | string | stdout | Write translated text to a file instead of stdout. |
--format | string | auto-detect | Force input format: text, md, json, yaml. Auto-detected from the -f file extension when omitted. | |
--stream | bool | false | Stream output to stdout as the LLM generates it. Text and Markdown formats only. |
Backend flags
Section titled “Backend flags”| Flag | Type | Default | Description |
|---|---|---|---|
--backend | string | hosted | LLM backend: hosted, gemini, openai, anthropic. See Backends. |
--model | string | backend default | Override the model name (e.g., gemini-2.5-flash, gpt-4o, claude-sonnet-4-5-20250514). |
--api-base | string | API base URL for OpenAI-compatible providers (e.g., https://api.groq.com/openai/v1). |
Glossary flags
Section titled “Glossary flags”| Flag | Type | Default | Description |
|---|---|---|---|
--glossary | string | auto-detect | Path to a glossary YAML file. Overrides auto-detection. See Glossary. |
--no-glossary | bool | false | Skip glossary loading entirely, even if a glossary file exists in the default locations. |
Prompt flags
Section titled “Prompt flags”| Flag | Type | Default | Description |
|---|---|---|---|
--prompt | string | built-in | Path to a custom system prompt file. Replaces the entire built-in prompt. See Custom Prompts. |
Diagnostic flags
Section titled “Diagnostic flags”| Flag | Type | Default | Description |
|---|---|---|---|
--verbose | bool | false | Print model name, token counts, and elapsed time to stderr after translation. |
Example --verbose output (on stderr):
Model: gemini-2.5-flash | Tokens: 42 in / 38 out | Time: 1.2sSubcommands
Section titled “Subcommands”yaku config
Section titled “yaku config”Manage the configuration file at ~/.config/yaku/config.yaml.
| Command | Description |
|---|---|
yaku config set <key> <value> | Set a configuration value. |
yaku config get <key> | Read a configuration value (file only, no env overlay). |
yaku config path | Print the config file path. |
See Configuration for all available keys.
yaku login
Section titled “yaku login”Authenticate with the hosted service using a browser-based device authorization flow. Opens your browser with a pre-filled authorization code — just sign in and click Approve. Credentials are stored in ~/.config/yaku/.credentials.
yaku login# Opens your browser to complete authenticationyaku logout
Section titled “yaku logout”Revoke your session on the server and delete local credentials. If the server is unreachable, credentials are kept so you can retry.
yaku logout
# Force-delete local credentials even if server revocation failsyaku logout --force| Flag | Description |
|---|---|
--force | Delete local credentials regardless of whether the server confirmed revocation. The session may remain valid on the server until it expires. |
yaku whoami
Section titled “yaku whoami”Show the current authentication status by querying the hosted service.
yaku whoami# Logged in as user@example.com (github)If not logged in:
Not logged in (using anonymous quota)If the session is expired or invalid:
Session expired or invalid. Run yaku login to re-authenticate.If the server is unreachable:
hosted service unreachable. Check your network connectionyaku quota
Section titled “yaku quota”Show your current usage quota for the hosted service. Displays your plan tier, daily and monthly request counts, and the per-request character limit. When using a local backend, reports that no quota applies.
See Hosted Service & Plans for plan tiers and limits.
yaku version
Section titled “yaku version”Print the CLI version.
yaku version# yaku v0.1.0