ABSTRACT Upcoming imaging surveys will use weak gravitational lensing to study the large-scale structure of the Universe, demanding sub-per cent accuracy for precise cosmic shear measurements. We present a new differentiable implementation of our perturbation-based shear estimator (fpfs), using jax, which is publicly available as part of a new suite of analytic shear algorithms called anacal. This code can analytically calibrate the shear response of any non-linear observable constructed with the fpfs shapelets and detection modes utilizing autodifferentiation (ad), generalizing the formalism to include a family of shear estimators with corrections for detection and selection biases. Using the ad capability of jax, it calculates the full Hessian matrix of the non-linear observables, which improves the previously presented second-order noise bias correction in the shear estimation. As an illustration of the power of the new anacal framework, we optimize the effective galaxy number density in the space of the generalized shear estimators using an LSST-like galaxy image simulation for the 10 yr LSST. For the generic shear estimator, the magnitude of the multiplicative bias |m| is below 3 × 10−3 (99.7 per cent confidence interval), and the effective galaxy number density is improved by 5 per cent . We also discuss some planned future additions to the anacal software suite to extend its applicability beyond the fpfs measurements.