There are two ways.
The simplest is via the web server (including a CURL request from the command line) to access a tools
file. Check out the [root]/concrete/tools
directory for examples. You'd put it in [root]/tools
. Tools are much simpler than a single page, but get all the models loaded, etc.
Otherwise, you can run from the command line. See http://www.concrete5.org/community/forums/documentation_efforts/how-to-running-concrete5-from-php-command-line/ . Same deal applies -- you'll get the basic models automatically, and you can use Loader::whatever() like normal.