Export hybrid configuration on .things and .items files

Did you check this :

Ohadm - A simple script to manipulate openHAB objects and sync them to YAML files - Tutorials & Examples / Solutions - openHAB Community