title: VS Code extension: Hide commands from command palette
body: <p><strong>Background:</strong></p>
  
  <p>I'm currently working on a simple VS Code extension that will provide dynamically set <a href="https://code.visualstudio.com/docs/editor/variables-reference#_command-variables" rel="noreferrer">command variables</a> to my build &amp; debug tasks. The plan is to have a series of attributes that will be accessible in launch.json, etc. through the <code>"${command:extension.myCommand}"</code> syntax.</p>
  
  <p>Registering commands like this is as simple as adding an entry to the package.json file, e.g.:</p>
  
  <pre class="lang-json prettyprint-override"><code>"contributes": {
      "commands": [
          {
              "command": "extension.myCommand",
              "title": ""
          }
      ]
  }
  </code></pre>
  
  <p>and implementing the corresponding commands in my main extension file:</p>
  
  <pre class="lang-js prettyprint-override"><code>let disposable = vscode.commands.registerCommand('extension.myCommand', () =&gt; {
      return "dynvar";
  });
  context.subscriptions.push(disposable);
  </code></pre>
  
  <p><strong>The Problem</strong>:</p>
  
  <p>Unfortunately these commands now also appear in the command palette, and as they don't have any interactive use that's quite annoying.</p>
  
  <p><strong>Question:</strong> </p>
  
  <p>Is there any way I can hide commands contributed through extensions from VS Code's command palette?</p>