I wonder if there's any 2FA code storing/generating cli application? I know they aren't supposed to be used like that but storing them all on just a phone doesn't seem wise in the long run. Might be useful while building some automated scripts as well.

_edit_

oathtool seems promising (needs to be paired with something to manage and crypt the keys tho) http://www.nongnu.org/oath-toolkit/oathtool.1.html