Rather than attempting to mimick production environments and APIs locally, I've had much more success simply building in-memory versions of platform services.
Might be niche but for me - I have config files outside $HOME, I use a number of `.gitignore`-aware tools (tree, fuzzy finder), and I just don't like `git status` telling me I'm in a repo in any subdir of $HOME.