I note this above but want to emphasize the fact that lastpass-cli supports the lastpass two factor options. For anyone looking for a tool like this for use both in browser and in scripts, it's great to have two factor natively supported in both places.