Skip to content

CLI Flags

Terminal window
yaku [flags] [text]

Text can be provided as positional arguments, via -f (files), or piped through stdin. See Input & Output for details.

FlagTypeDefaultDescription
--tostringconfig default-targetRequired. Target language code (e.g., zh-TW, ja, en).
--fromstringauto-detectSource language code. Omit to let the LLM detect automatically.
--modestringtranslatetranslate — translate to target language. polish — refine writing already in the target language. See Polish Mode.
--contextstringDomain hint for the LLM (e.g., "Kubernetes docs", "formal email"). Helps resolve ambiguous terms.
FlagShortTypeDefaultDescription
--file-fstring[]Input file path(s). Repeat for multiple files: -f a.md -f b.md.
--output-ostringstdoutWrite translated text to a file instead of stdout.
--formatstringauto-detectForce input format: text, md, json, yaml. Auto-detected from the -f file extension when omitted.
--streamboolfalseStream output to stdout as the LLM generates it. Text and Markdown formats only.
FlagTypeDefaultDescription
--backendstringhostedLLM backend: hosted, gemini, openai, anthropic. See Backends.
--modelstringbackend defaultOverride the model name (e.g., gemini-2.5-flash, gpt-4o, claude-sonnet-4-5-20250514).
--api-basestringAPI base URL for OpenAI-compatible providers (e.g., https://api.groq.com/openai/v1).
FlagTypeDefaultDescription
--glossarystringauto-detectPath to a glossary YAML file. Overrides auto-detection. See Glossary.
--no-glossaryboolfalseSkip glossary loading entirely, even if a glossary file exists in the default locations.
FlagTypeDefaultDescription
--promptstringbuilt-inPath to a custom system prompt file. Replaces the entire built-in prompt. See Custom Prompts.
FlagTypeDefaultDescription
--verboseboolfalsePrint 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.2s

Manage the configuration file at ~/.config/yaku/config.yaml.

CommandDescription
yaku config set <key> <value>Set a configuration value.
yaku config get <key>Read a configuration value (file only, no env overlay).
yaku config pathPrint the config file path.

See Configuration for all available keys.

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.

Terminal window
yaku login
# Opens your browser to complete authentication

Revoke your session on the server and delete local credentials. If the server is unreachable, credentials are kept so you can retry.

Terminal window
yaku logout
# Force-delete local credentials even if server revocation fails
yaku logout --force
FlagDescription
--forceDelete local credentials regardless of whether the server confirmed revocation. The session may remain valid on the server until it expires.

Show the current authentication status by querying the hosted service.

Terminal window
yaku whoami
# Logged in as [email protected] (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 connection

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.

Print the CLI version.

Terminal window
yaku version
# yaku v0.1.0