TITLE: Can we simultaneously freely adjoin both limits and colimits to a category?
QUESTION [11 upvotes]: I'm aware that given a category $C$, it's possible to take the free (co)completion of $C$ in order to freely adjoin (co)limits to $C$, in the sense that we can construct a left adjoint to the forgetful functor from the 2-category of (co)complete categories, (co)continuous functors, and natural transformations to the 2-category of categories, functors, and natural transformations.
We can also consider the forgetful functor $U : \text{Cat}' \to \text{Cat}$ where $\text{Cat}'$ is the 2-category of complete and cocomplete categories, functors which preserve all limits and colimits, and natural transformations. My question is this: can we construct a left adjoint to $U$? If not, can we do so locally for any interesting categories $C$. In other words, when can we find a category $C'$ with a functor $i : C \to U(C')$ which induces an equivalence between $\text{Cat}'(C',D)$ and $\text{Cat}(C, U(D))$ for every complete and cocomplete category $D$?

REPLY [6 votes]: Yes. This exists for more-or-less general reasons and is the subject of [Joyal, Free bicomplete categories]. Here's a sketch proof.
For simplicity, I will discuss categories with colimits of $\kappa$-small diagrams, where $\kappa$ is a regular cardinal. Specifically, consider the following category $\mathbf{K}$:

The objects are small categories equipped with chosen $\kappa$-ary coproducts, $\kappa$-ary products, coequalisers of parallel pairs, and equalisers of parallel pairs.
The morphisms are functors that strictly preserve the chosen colimits and limits.

By standard arguments, $\mathbf{K}$ is a locally $\kappa$-presentable category. The forgetful functor $U : \mathbf{K} \to \mathbf{Cat}$ preserves colimits of $\kappa$-filtered diagrams and limits of all diagrams, so it has a left adjoint $F : \mathbf{Cat} \to \mathbf{K}$. In particular, for every small category $\mathcal{C}$, there is a small category $F \mathcal{C}$ with colimits and limits of $\kappa$-small diagrams and a functor $\eta : \mathcal{C} \to F \mathcal{C}$ with the following property:

For every small category $\mathcal{A}$ with colimits and limits of $\kappa$-small diagrams and every functor $h : \mathcal{C} \to \mathcal{A}$, there is a functor $\bar{h} : F \mathcal{C} \to \mathcal{A}$ that preserves colimits and limits of $\kappa$-small diagrams (up to isomorphism) such that $\bar{h} \circ \eta = h$.

Of course, the above only deals with the 1-dimensional part of the universal property. To get the 2-dimensional part, note that $U : \mathbf{K} \to \mathbf{Cat}$ also preserves cotensors: after all, if $\mathcal{A}$ is an object in $\mathbf{K}$, then $[\mathcal{D}, \mathcal{A}]$ is also an object in $\mathbf{K}$ with limits and colimits constructed componentwise. Thus the adjunction $F \dashv U$ is $\mathbf{Cat}$-enriched. In particular:

For every small category $\mathcal{A}$ with colimits and limits of $\kappa$-small diagrams and every parallel pair $\bar{h}_0, \bar{h}_1 : F \mathcal{C} \to \mathcal{A}$ that preserves colimits and limits of $\kappa$-small diagrams (up to isomorphism), every natural transformation $\bar{h}_0 \circ \eta \Rightarrow \bar{h}_1 \circ \eta$ extends to a natural transformation $\bar{h}_0 \Rightarrow \bar{h}_1$ uniquely.