  We develop a method to derive the exact formula of entanglement entropy for
generic inhomogeneous conformal field theory (CFT) quantum quenches with open
boundary condition (OBC), which characterizes the generic boundary effect
unresolved by analytical methods in the past. We identify the generic OBC
quenches with Euclidean path integrals in complicated spacetime geometries, and
we show that a special class of OBC quenches, including the M\"obius and
sine-square-deformation quenches, have simple boundary effects calculable from
Euclidean path integrals in a simple strip spacetime geometry. We verify that
our generic CFT formula matches well with free fermion tight-binding model
numerical calculations for various quench problems with OBC. Our method can be
easily generalized to calculate any local quantities expressible as one-point
functions in such quantum quench problems.
