CPNest performs Bayesian inference using the nested sampling algorithm. It is designed to be simple for the user to provide a model via a set of parameters, their bounds and a log-likelihood function. An optional log-prior function can be given for non-uniform prior distributions. The nested sampling algorithm is then used to compute the marginal likelihood or evidence. As a by-product the algorithm produces samples from the posterior probability distribution. The implementation is based on an ensemble MCMC sampler which can use multiple cores to parallelize computation.