lib: support modes and json in locals
0.0.6