A finite deformation continuum theory is derived from interatomic potentials for the analysis of the mechanics of carbon nanotubes. This nonlinear elastic theory is based on an extension of the Cauchy-Born rule called the exponential Cauchy-Born rule. The continuum object replacing the graphene sheet is a surface without thickness. The method systematically addresses both the characterization of the small strain elasticity of nanotubes and the simulation at large strains. Elastic moduli are explicitly expressed in terms of the functional form of the interatomic potential. The expression for the flexural stiffness of graphene sheets, which cannot be obtained from standard crystal elasticity, is derived. We also show that simulations with the continuum model combined with the finite element method agree very well with zero temperature atomistic calculations involving severe deformations.