# How to run commands at module level?

Option 1:

  1. enter sbt shell, navigate to the module using project <module-name>

     



    [Lottery] $ project LotteryMongo
    [info] Set current project to LotteryMongo ...
    [LotteryMongo]
    
  2. run your command here.

    [LotteryMongo] collection ensureAllIndices
    

    Note: to navigate back to the project root, run command project /

     



    [LotteryMongo] project /
    [info] Set current project to Lottery ...
    [Lottery] $
    

Option 2:

  1. enter sbt shell, use the / operator along with module name followed by the command:

     


    [Lottery] $ LotteryMongo/collection ensureAllIndices
    [Lottery] $