title: Setting an environment variable from within the sbt shell
body: <p>I would like to be able to set an environment variable from within the interactive sbt shell, and I can't seem to find a way to do that. (I have looked on the official sbt docs as well as on stackoverflow without success).</p>
  
  <p>I want to make it clear that <strong>I don't want</strong> to have to set this environment variable in the <code>build.sbt</code> file, but rather be able to change it on the fly on my interactive sbt shell session, so that the environment variable is used for the next sbt commands I run.</p>
  
  <p>For example, I would like to be able to do something like (from within the sbt shell):</p>
  
  <pre><code>&gt; set_environment_variable("foo", "foo_value")
  &gt; `mymodule`/run
  &gt; (... program runs and completes)
  &gt; set_environment_variable("foo", "another_foo_value")
  &gt; `mymodule`/run
  </code></pre>
  
  <p>Is this possible? And if it is, how can I do it?</p>