Hey,
It's unlikely that espanso will become a library anytime soon, but I'm currently refactoring the core into separate crates to follow a more modular "workspace" approach. So if you want to write your own standalone program, you could just pick the modules you need!
Started the refactor a few days ago so it's still in the early stage, but it's happening here: https://github.com/federico-terzi/espanso/tree/dev-1.x