Craft equivalent to Rails runner
Maybe you're just looking for a bootstrapped Craft instance?

Something like:

$craft = require '/path/to/craft/app/bootstrap.php';


From there you'll have access to the Craft instance as usual:

$craft-&gt;entries-&gt;saveEntry();


Along with your models, records, etc.