We present detailed observations of ZTF18abukavn (SN2018gep), discovered in high-cadence data from the Zwicky Transient Facility as a rapidly rising (1.4+/-0.1mag/hr) and luminous (M_g,peak_=-20mag) transient. It is spectroscopically classified as a broad-lined stripped-envelope supernova (Ic-BL SN). The high peak luminosity (L_bol>~3x10^44^erg/s), the short rise time (t_rise_=3days in g band), and the blue colors at peak (g-r~-0.4) all resemble the high-redshift Ic-BL iPTF16asu, as well as several other unclassified fast transients. The early discovery of SN2018gep (within an hour of shock breakout) enabled an intensive spectroscopic campaign, including the highest-temperature (T_eff_>~40000K) spectra of a stripped-envelope SN. A retrospective search revealed luminous (M_g_~M_r_~-14mag) emission in the days to weeks before explosion, the first definitive detection of precursor emission for a Ic-BL. We find a limit on the isotropic gamma-ray energy release E_{gamma,iso}_<4.9x10^48^erg, a limit on X-ray emission L_X_<10^40^erg/s, and a limit on radio emission {nu}L_{nu}_<~10^37^erg/s. Taken together, we find that the early (<10days) data are best explained by shock breakout in a massive shell of dense circumstellar material (0.02M_{sun}_) at large radii (3x10^14^cm) that was ejected in eruptive pre-explosion mass-loss episodes. The late-time (>10days) light curve requires an additional energy source, which could be the radioactive decay of Ni-56.