xwrd
is a word matching and anagram command line tool.
- Find words by patterns of known letters
- Find anagrams
- Find partial anagrams
- Find (partial) anagrams with unknown letters
- Find multi-word anagrams
Using Go:
go install github.com/mlange-42/xwrd@latest
Without Go:
Download binaries for your OS from the Releases.
Before working with xwrd
, you need a word list, aka dictionary.
Dictionaries can be installed manually, or downloaded via the xwrd
CLI.
English dictionary elasticdog/yawl (260k words):
xwrd dict install en/yawl
xwrd dict set en/yawl
German dictionary enz/german-wordlist (680k words):
xwrd dict install de/enz
xwrd dict set de/enz
Run with words to process:
xwrd anagram <word1> <word2> ...
Run interactively by calling without positional arguments:
xwrd anagram
Partial anagrams:
xwrd anagram --partial
Multi-word anagrams:
xwrd anagram --multi
Run with patterns to process:
xwrd match .a..x
xwrd match .a..x q*a
Run interactively by calling without positional arguments:
xwrd match
.
(period) stands for one arbitrary letter
*
(asterisk) stands for 0 or more arbitrary letters
a....
- find all 5-letter words starting with 'a'
*pf
- find all words ending with 'pf'
a....b
- find all words of length 6 that start with 'a' and end with 'b'