I was bored and because I've already done wordle in <20 lines of bash, I revisited it to do a proper golf. First time golfing, so would be happy to hear if you find improvements.
#!/bin/bash
set `grep -Eix '[a-z]{5}' /*/*/*/words|shuf`
s=${1,,}
for((r=6;r--;))
{
for((;;))
{
read -p$r g
grep -qw $g<<<$*&&break
}
t=$s
for((i=5;i--;))
{
[ ${s:i:1} = ${g:i:1} ]&&t=${t:0:i}2${t:i+1}
}
for((i=0;i<5;))
{
l=${g:i:1}
((c=${t:i++:1}))||{
[[ $t = *$l* ]]&&t=${t/$l/_} c=3
}
printf ^[[3$c\m$l^[[m
}
echo
[ $g = $s ]&&exit
}
echo $s