title: Running composer in a different directory than current
body: <p>I don't know if this question has been asked, because searching finds results mostly about moving the libraries installation directory.</p>
  
  <p>I have a globally installed composer command. Is there a way to run, for example, <code>composer install</code> in a different directory than current, i.e. to specify the directory in which I would like tu run the command?</p>
  
  <p>E.g. being in <code>/home/someuser</code>, I would like to acquire the same result as in running <code>composer install</code> it inside <code>/home/someuser/myproject</code>. Of course, one way would be to simply change the current directory, run composer and go back.</p>