Currently i'm using MKVToolNix for my needs which is fine but i would prefer some CLI also. As far as i know ffmpeg supports chapters management.
The ffmetadata format allows you to add chapters to a file.
Have a look at https://ffmpeg.org/ffmpeg-formats.html#Metadata-1 for an example.