Add analyze command - closes #2