  The generation of X-rays and {\gamma}-rays based on synchrotron radiation
from free electrons, emitted in magnet arrays such as undulators, forms the
basis of much of modern X-ray science. This approach has the drawback of
requiring very high energy, up to the multi-GeV-scale, electron beams, to
obtain the required photon energy. Due to the limit in accelerating gradients
in conventional particle accelerators, reaching high energy typically demands
use of instruments exceeding 100's of meters in length. Compact, less costly,
monochromatic X-ray sources based on very high field acceleration and very
short period undulators, however, may revolutionize diverse advanced X-ray
applications ranging from novel X-ray therapy techniques to active
interrogation of sensitive materials, by making them accessible in cost and
size. Such compactness may be obtained by an all-optical approach, which
employs a laser-driven high gradient accelerator based on inverse free electron
laser (IFEL), followed by a collision point for inverse Compton scattering
(ICS), a scheme where a laser is used to provide undulator fields. We present
an experimental proof-of-principle of this approach, where a TW-class CO2 laser
pulse is split in two, with half used to accelerate a high quality electron
beam up to 84 MeV through the IFEL interaction, and the other half acts as an
electromagnetic undulator to generate up to 13 keV X-rays via ICS. These
results demonstrate the feasibility of this scheme, which can be joined with
other techniques such as laser recirculation to yield very compact, high
brilliance photon sources, extending from the keV to MeV scale. Furthermore,
use of the IFEL acceleration with the ICS interaction produces a train of very
high intensity X-ray pulses, thus also permitting a unique tool that can be
phase-locked to a laser pulse in frontier pump-probe experimental scenarios.
