title: How to add flags for Typer commands in Python
body: <p>I am new to <a href="https://typer.tiangolo.com/" rel="nofollow noreferrer">Typer</a> but I cannot really find the info I need in the docs...<br />
  I am trying to add flags to my app with typer commands. I would like to have:</p>
  <pre class="lang-bash prettyprint-override"><code>myApp command1 --flag1 value1 --flag2 value2
  </code></pre>
  <p>Currently I have a plain command that takes a string:</p>
  <pre class="lang-py prettyprint-override"><code>@app.command(
      name=&quot;foo&quot;,
      help=&quot;bar&quot;,
  )
  def command1(path: str) -&gt; None:  # noqa: D401
      &quot;&quot;&quot;
      Text
  
      Args:
          path: my favourite path
      &quot;&quot;&quot;
      # some code here
  </code></pre>
  <p>Is there any way to adjust the function above so that it takes flags+values as in the first box?</p>