Affine Chabauty I
We prove finiteness and give an explicit upper bound on the number of $S$-integral points on affine curves satisfying a certain rank-genus inequality. We achieve this by developing an analogue of the Chabauty method, embedding the curve into its generalised Jacobian and bounding the Abel-Jacobi image of the $S$-integral points using arithmetic intersection theory. Our results also provide the foundations for an algorithm to determine the set of $S$-integral points on affine curves presented in a follow-up article.