The measurement of transient optical fields has proven critical to understanding the dynamical mechanisms underlying ultrafast physical and chemical phenomena, and is key to realizing higher speeds in electronics and telecommunications. Complete characterization of optical waveforms, however, requires an optical oscilloscope capable of resolving the electric field oscillations with sub-femtosecond resolution and with single-shot operation. Here, we show that strong-field nonlinear excitation of photocurrents in a silicon-based image sensor chip can provide the sub-cycle optical gate necessary to characterize carrier-envelope phase-stable optical waveforms in the mid-infrared. By mapping the temporal delay between an intense excitation and weak perturbing pulse onto a transverse spatial coordinate of the image sensor, we show that the technique allows single-shot measurement of few-cycle waveforms.