The necessary and sufficient conditions for a perfect fluid solution to define a spatially-homogeneous cosmology are achieved. These conditions are Intrinsic, Deductive, Explicit and ALgorithmic, and they offer an IDEAL labeling of these geometries. When a three-dimensional group acts on the three-dimensional space-like orbits, the Bianchi type of the model is also obtained.