While watching RailsConf 2024 - Build High Performance Active Record Apps by Andrew Atkinson Andrew shows that Rails has a dbconsole command

bin/rails dbconsole

or shortened to

bin/rails db

Both of which open up a Postgres console 🤯