diff --git a/Library/Homebrew/cmd/sh.rb b/Library/Homebrew/cmd/sh.rb
index 73bf72044a2761573cd868b4c7342b55be094d57..071f098917db6e81017f4423b14d42946227bc42 100644
--- a/Library/Homebrew/cmd/sh.rb
+++ b/Library/Homebrew/cmd/sh.rb
@@ -9,11 +9,31 @@
 
 require "extend/ENV"
 require "formula"
+require "cli_parser"
 
 module Homebrew
   module_function
 
+  def sh_args
+    Homebrew::CLI::Parser.new do
+      usage_banner <<~EOS
+        `sh` [<options>]
+
+        Start a Homebrew build environment shell. Uses our years-battle-hardened
+        Homebrew build logic to help your `./configure && make && make install`
+        or even your `gem install` succeed. Especially handy if you run Homebrew
+        in an Xcode-only configuration since it adds tools like `make` to your `PATH`
+        which otherwise build systems would not find.
+      EOS
+      flag "--env=",
+        description: "Use the standard `PATH` instead of superenv's, when <std> is passed"
+      switch :verbose
+      switch :debug
+    end
+  end
+
   def sh
+    sh_args.parse
     ENV.activate_extensions!
 
     if superenv?