feature(app): add a CLI, improve code