  We introduce $\sf{CosmoBit}$, a module within the open-source $\sf{GAMBIT}$
software framework for exploring connections between cosmology and particle
physics with joint global fits. $\sf{CosmoBit}$ provides a flexible framework
for studying various scenarios beyond $\Lambda$CDM, such as models of
inflation, modifications of the effective number of relativistic degrees of
freedom, exotic energy injection from annihilating or decaying dark matter, and
variations of the properties of elementary particles such as neutrino masses
and the lifetime of the neutron. Many observables and likelihoods in
$\sf{CosmoBit}$ are computed via interfaces to $\sf{AlterBBN}$, $\sf{CLASS}$,
$\sf{DarkAges}$, $\sf{MontePython}$, $\sf{MultiModeCode}$, and $\sf{plc}$. This
makes it possible to apply a wide range of constraints from large-scale
structure, Type Ia supernovae, Big Bang Nucleosynthesis and the cosmic
microwave background. Parameter scans can be performed using the many different
statistical sampling algorithms available within the $\sf{GAMBIT}$ framework,
and results can be combined with calculations from other $\sf{GAMBIT}$ modules
focused on particle physics and dark matter. We include extensive validation
plots and a first application to scenarios with non-standard relativistic
degrees of freedom and neutrino temperature, showing that the corresponding
constraint on the sum of neutrino masses is much weaker than in the standard
scenario.
