xmlsh
xmlsh is a command line shell for XML, written by David Lee, that is based on the philosophy and design of Unix Shells. xmlsh provides a familiar scripting environment, but specifically tailored for scripting XML processes. xmlsh includes an extension module that provides connectivity to a MarkLogic server.
Full documentation for xmlsh is available at http://www.xmlsh.org and the extension is documented here.
xmlsh itself as well as the MarkLogic extension are hosted at GitHub.