Documentation / On the command line

On the command line

Look up and translate words in a terminal with wd, which prints what the card would show.

The setup puts wd on the PATH, so it can be run from any folder in PowerShell, the Command Prompt or Windows Terminal. A terminal that was already open needs opening again to find it. It comes only with the installed copy, not with the one that runs without installing.

wd serendipity                   # or: wd define serendipity
wd translate good morning        # or: wd t good morning
wd t buongiorno --to German
Get-Clipboard | wd t

Looking up

wd define, or wd d, looks up a word or a short phrase, in the built-in dictionaries and then online, as Alt+D does. It's also what wd does with a word and no command. When the word isn't found, it says what it was likely a typo of.

OptionWhat it does
-l, --lang <language>Only in this language, given as a code like it or a name like Italiano. Its dictionary is used if it's been downloaded, whether it's in the settings or not.
-n, --senses <n>Senses per part of speech
-s, --synonyms <n>Similar words per part of speech, 0 for none
--examples, --no-examplesShows the example sentences, or leaves them out

Translating

wd translate, or wd t, translates a word, a phrase or a passage, as Alt+T does, and tells which way it went. Translations need the internet, so they need the online dictionary on, or --online.

OptionWhat it does
-f, --from <language>The language it's in, given as a code like en or a name like English
-t, --to <language>The language to translate it into

Without them, it picks the way as the shortcut does, and says so when it had to guess. Given only --to, it translates from the language the text seems to be in, or from the other default language if it's that one already.

For both

OptionWhat it does
--onlineUses the online dictionaries and translators
--offlineUses only the dictionaries on this PC
-h, --helpLists the commands and options, as wd help does
-V, --versionShows the version

What isn't given goes by WinDict's settings: its dictionaries, its default languages, what the card shows and the online dictionary. wd reads them, but never changes them.

In scripts

With no text after the command, wd reads it from what's piped in. Text starting with a dash goes after --, as in wd t -- -5 degrees.

In a console, answers are styled and wrapped to the window. Piped or redirected, they're plain lines; set NO_COLOR to have them plain in a console too. What went wrong is written to the error stream, not with the answer.

Exit codeMeaning
0An answer was printed
1No answer: the word wasn't found, or the lookup or translation failed
2The command couldn't be made sense of, like an unknown option or nothing to look up

Something missing or wrong? Open an issue on GitHub.

© 2026 Bosio Pietro. WinDict is free and open source.

Windows is a trademark of Microsoft. WinDict isn't made or endorsed by Microsoft.