  Let $k$ be a field and $A$ a finite-dimensional $k$-algebra of global
dimension $\leq 2$. We construct a triangulated category $\Cc_A$ associated to
$A$ which, if $A$ is hereditary, is triangle equivalent to the cluster category
of $A$. When $\Cc_A$ is $\Hom$-finite, we prove that it is 2-CY and endowed
with a canonical cluster-tilting object. This new class of categories contains
some of the stable categories of modules over a preprojective algebra studied
by Geiss-Leclerc-Schr{\"o}er and by Buan-Iyama-Reiten-Scott. Our results also
apply to quivers with potential. Namely, we introduce a cluster category
$\Cc_{(Q,W)}$ associated to a quiver with potential $(Q,W)$. When it is
Jacobi-finite we prove that it is endowed with a cluster-tilting object whose
endomorphism algebra is isomorphic to the Jacobian algebra $\Jj(Q,W)$.
