I've packaged a CLI that I made as a flatpak. It works just fine. Nothing weird was required to make it work.
The only thing is that if you want to use a CLI flatpak, you probably want to set an alias in your shell to make running it easier.
I'm not sure why more CLIs aren't offered as flatpaks. Maybe because static linking them is so easy? I know people focus on flatpak sandboxing as a primary benefit, but I can't help but think of static linking was easier for bigger applications, it wouldn't be needed as much.