I work a lot with frameworks or languages that bring their own script runner or CLI companion to execute various tasks during development; quality checks or formatters, auxiliary tools like the Stripe webhook proxy, or interactive ones like a psql session into the database or a docker compose log stream; some of them longer-running, others single-shot executables.
Depending on what I'm doing, I need these processes either run alongside the project while I'm working on it (like watching source files), execute them automatically when something happens (like setting up a Stripe webhook proxy when I start the debug build), start them with environment configuration from the IDE (for example a database console), or really just have them close to the code (like a linter).
IntelliJ has a task runner built-in that can do all of this very easily, in a way that I can share it with the rest of my team, and don't have to bother with remembering specific commands.
Good answer. I guess we work in slightly different realms :)
I've set up tasks to run at build-time in Xcode - the 'Build Phases' tab can add tasks to be run automatically, which are just shell-scripts and Xcode sets up just about every variable under the sun for you in the environment, so you can navigate to the right directory, add the current-target as part of a name etc. They're saved as part of the project so everyone gets them.
But that doesn't cope with the interactive side of what you're talking about. In truth, I've always just done that from the command line 'pqsl -d <database>' (or 'sqlite3 database') has always been sufficient - though if your interactive session shares the database context that the application is also using (so you're not waiting for a flush to get updates) that would be interesting.
Quality checking I tend to integrate with git rather than the IDE, setting up a hook on pre-commit to run unit tests and so on. In a previous life different teams used different IDEs, but we always wanted the tests to run :)