title: Semantic Versioning for command line tools
body: <p>The <a href="https://semver.org/spec/v2.0.0.html" rel="nofollow noreferrer">SemVer specs</a> state that you should increase the</p>
  
  <blockquote>
    <ol>
    <li>MAJOR version when you make incompatible API changes,</li>
    <li>MINOR version when you add functionality in a backwards-compatible manner, and</li>
    <li>PATCH version when you make backwards-compatible bug fixes.</li>
    </ol>
  </blockquote>
  
  <p>What is backwards-compatible in the case of a command-line interface?</p>
  
  <h3>A simplified example:</h3>
  
  <p>There is a command-line tool which analyzes numbers in a text file. It will return the min and max values.</p>
  
  <p>Version 1.0.0 works like this:</p>
  
  <pre><code>$ analyzertool numbers.txt
  min: 12
  max: 20
  </code></pre>
  
  <p>Now I add a useful feature. The tool will now also output the average value:</p>
  
  <pre><code>$ analyzertool numbers.txt
  min: 12
  max: 20
  avg: 17
  </code></pre>
  
  <p>Is this a MAJOR or MINOR change? The output has clearly been changed, but the lines with <code>min</code> and <code>max</code> are still present, so somebody doing</p>
  
  <pre><code>$ analyzertool numbers.txt | grep min
  min: 12
  </code></pre>
  
  <p>would still see the same output.</p>
  
  <p>I'm looking for existing conventions or relevant examples.</p>