Is there a way to set password entry via curses interface in terminal?

For example when you forget to put sudo before “systemctl …” insted of gui interface poping out I want a curses prompt in my termial. Something like pinentry but for sudo.