title: How to create and use a terminal command with nest-commander?
body: <p>So, I have this NestJS project, and for learning purposes I want to create a command with <a href="https://nest-commander.jaymcdoniel.dev/docs/features/commander/" rel="nofollow noreferrer">nest-commander</a> that would be executable on terminal (that way I could call a function from other services), also for learning purposes, whenever I call this command, it should call a function on a service file that get's a user from the database.</p>
  <p>It would look like this :</p>
  <pre class="lang-sh prettyprint-override"><code>&gt; run myCommand -username UsernameString
  </code></pre>
  <p>Whenever that command is called from the terminal, I would call <code>getUser()</code> from <code>AnotherService</code> to find my user with that specific UsernameString.
  I read the docs and couldn't figure much of it, so...</p>
  <ol>
  <li>How do I call a command from terminal?</li>
  <li>Is it possible to call the same command within the application?</li>
  </ol>