Where should a command line tool store cache files in OS X? /var/cache is missing, ~/Library/Caches seems to be for full-fledged applications rather than command line tools, tools I've seen in the wild do horrible things (like use the user's home directory). Where is the correct - or at least predictable and reliable - location?
It depends on the type of data being cached - is it per user or system wide? 

If per user, there's nothing wrong with using a dot-prefixed directory in the user's home directory (that's what it's for, after all, and very much the UNIX way) or perhaps /tmp/&lt;username&gt; if the data is not to be persisted. If it's system wide and meant to be persisted, check the hier manual page - /var/db/&lt;appname&gt; may be an option?

One other Mac OS-specific option is to use /var/folders (as documented in hier(7)). As mentioned, you can retrieve the user-specific temporary directory by calling getconf DARWIN_USER_CACHE_DIR.