Derive shell commands from Mongoid sessions and configuration options.