I can get around this limitation by creating a short script to get all OCIDs:
db.mycollection.find({}, {ocid: 1}).forEach(function (item) { print(item.ocid); });
And then running:
mongo --quiet mydb myscript.js | node index.js -d mydb -c mycollection
However, it'd be nice to instead just have an option to process all OCIDs (or for this to be the default if standard input isn't provided).