title: Merging/namespacing PM2 apps
body: <p>There is PM2 configuration, <code>/home/foo/someconfig.json</code></p>
  
  <pre><code>{
      "apps": [
          {
              "name": "foo-main",
              "script": "./index.js",
          },
          {
              "name": "foo-bar",
              "script": "./bar.js"
          },
          {
              "name": "foo-baz",
              "script": "./baz.js"
          }
      ]
  }
  </code></pre>
  
  <p>Most of the time I want to refer to all of the apps under current namespace, e.g. </p>
  
  <pre><code>pm2 restart foo
  </code></pre>
  
  <p>instead of doing</p>
  
  <pre><code>pm2 restart foo-main foo-bar foo-baz
  </code></pre>
  
  <p>Bash brace extension cannot be used because apps may run in Windows.</p>
  
  <p>Doing <code>pm2 restart /home/foo/someconfig.json</code> isn't a good option, because it takes some time to figure out config file path, it may differ between projects and even change its location.</p>
  
  <p>Can <code>foo-*</code> apps be merged into single <code>foo</code> app or be referred altogether in another reasonable way?</p>