diff --git a/src/Application.php b/src/Application.php
index <HASH>..<HASH> 100644
--- a/src/Application.php
+++ b/src/Application.php
@@ -79,4 +79,11 @@ class Application extends \Symfony\Component\Console\Application
     {
         $this->getDefinition()->addOption($options);
     }
+
+    public function extractNamespace(string $name, int $limit = null)
+    {
+        $parts = explode('/', $name, -1);
+
+        return implode('/', null === $limit ? $parts : \array_slice($parts, 0, $limit));
+    }
 }
Group by namespace when displaying list of commands