Karaf exposes OSGi ConfigAdmin through JMX. Take a look at the MBeans under org.apache.karaf:type=config .
Note that .cfg files are not necessary involved. The whole .cfg files thing in Karaf is just an abstraction around OSGi ConfigAdmin provided by Felix FileInstall. Just as the Karaf config shell commands and the Karaf ConfigMBean are an abstraction around OSGi ConfigAdmin.
If you don't like working with JMX directly I suggest you look at Jolokia , which is a JMX-to-HTTP/JSON bridge. For example hawt.io
 also leverages Jolokia to manage various Java frameworks including Karaf.