  Understanding how and when galaxies formed stars over the history of the
Universe is fundamental to the study of galaxy evolution. The star formation
histories (SFHs) of galaxies in the local Universe can be measured with high
precision using deep imaging with space telescopes. Such resolved SFHs are
based on modelling the observed color-magnitude diagram (CMD) with stellar
evolution models and rely on age-sensitive features like the main sequence
turn-off to measure a galaxy's star formation rate as a function of time. There
are many other population-level parameters that factor into these measurements,
such as the stellar initial mass function (IMF), binary fraction, and
metallicity, to name a few. We present and release StarFormationHistories.jl, a
modular, open-source Julia package for measuring resolved SFHs with a focus on
model flexibility for these types of population parameters. The code can model
unresolved photometric binaries and supports arbitrary IMFs. Random
uncertainties in the SFH measurements can be quantified with Monte Carlo
posterior sampling methods. We illustrate the performance of the package on
JWST/NIRCAM data of the Local Group dwarf irregular galaxy WLM
$\left(M_v\approx-14.2\right)$, which exhibits a complex, well-sampled CMD, and
HST/ACS data of the ultra-faint Milky Way satellite dwarf galaxy Horologium I
$\left(M_v\approx-3.7\right)$, which has a much simpler but sparser CMD.
