All-inorganic CsPbBr3 perovskite doped with alkali metal atoms has been attracting increasing attention due to its superior optoelectronic properties. However, there still exists significant uncertainty regarding the doping mechanism. One view of the mechanism is that alkali metal atoms tend to substitute Cs in CsPbBr3 crystals. Another view is that Li and Na tend to intercalate into interstitial sites because their radii are much smaller than that of Cs. To elucidate the doping mechanism, it is necessary to investigate the point defects physics of alkali metal elements in CsPbBr3. In this work, by using first-principles calculations we find that alkali metal atoms energetically prefer to substitute for Cs or Pb atoms in CsPbBr3 crystals under different chemical potential conditions. To determine the alkali metal atoms doping site, one should consider the chemical potential of synthesis conditions, the dopant valence states, and atomic radii. Notably, alkali metal atoms doping mainly introduces shallow levels, which is helpful for improving the p-type conductivity of CsPbBr3.