The present invention relates to compounds useful as inhibitors of protein kinases, particularly of JAK familiy kinases. The invention also provides pharmaceutically acceptable compositions comprising said compounds and methods of using the compositions in the treatment of various disease, conditions, or disorders.