What are the best practices around neatly managing localhost passwords?

I’m a professional web app developer and so I work on a lot of projects on localhost and with many of those projects, I don’t have a choice over which passwords and usernames the test accounts have. That is often decided by someone else on the project and then everybody just needs to use those usernames and passwords for local development.

This means that right now, I have a ton of passwords saved in bitwarden all under the localhost domain. Which now means that whenever I click an input field to choose which account to autofill the fields with, I get a very long and unwieldy list. By now it’s so long that I might as well be better off just trying to memorize which username and passwords are associated to which projects and just type them in myself manually.

But I’m hoping that I’m missing something. That maybe there’s a better way to organize these saved passwords so that Bitwarden can better figure out which accounts I’ll most likely need depending on which projects I’m working on.

The only thing that I can currently think of, is that maybe I could install some daemon service that redirects http://any-project.localhost:3000 (meaning literally a catchall for any subdomain of localhost) to http://localhost:3000 without actually changing the url in the browser address bar. Then when Bitwarden offers to save a new username and password, it can link it to the specific subdomain, which will be linked to the name of my project.

Only, I’m not quite sure how to make that work and also when running npm run dev in for example a VueJS project, it just always assumes that the URL should be simply http://localhost without any subdomain and that’s the URL it automatically opens up. Which wouldn’t be a major issue, but it would be nicer if that part would also be automated.

But maybe there’s also another way to solve this that I haven’t thought of yet. That’s why I’d love to get some ideas from any other web developers here.