api, cli and fs extracted in different packages