That depends in what you want: creating a new model or just a collection.
If you want to generate a new model and access with GET, POST, etc.. like when you create a new API with:
sails generate api foo
you need to run the command and then restart server, because server needs to map models with db collections.
If you want to create a collection consider that you won't be able to access this collection via GET, POST because it's not a model.
MongoDB does not create a database or collection until the first document is inserted. So, if you just want to create a new collection in mongoDB you can run your own script to do it.
This is basically how it works and is by design. When you insert some data the database and collection will be created.
For example you can run a python script with python-shell.
from pymongo import MongoClient
import testdata
from pprint import pprint
client = MongoClient()
db = client.test['collectionDummy']
import datetime
class Temp(testdata.DictFactory):
id = testdata.CountingFactory(10)
number = testdata.CountingFactory(10)
address = testdata.FakeDataFactory('address')
firstName = testdata.FakeDataFactory('firstName')
for document in Temp().generate(2):
result = db.insert_one(document)