I have not used this, but it claims to be what you want:
When I needed something to decode bar codes from images I used a command line tool and Python. I see there are several libraries available for QR codes.
Linux seems to have this in standard repositories. I’m seeing zbar for the decoder.
That said, I have since gone from my Python tool to a note taking app on my phone that reads bar codes and QR codes and simply puts the text in a note.