diff --git a/haskdogs.cabal b/haskdogs.cabal
--- a/haskdogs.cabal
+++ b/haskdogs.cabal
@@ -1,5 +1,5 @@
 Name:                haskdogs
-Version:             0.4.5
+Version:             0.5.0
 Synopsis:            Generate tags file for Haskell project and its nearest deps
 Homepage:            http://github.com/grwlf/haskdogs
 License:             BSD3
diff --git a/src/Main.hs b/src/Main.hs
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -32,6 +32,7 @@
     cli_dirlist_file :: FilePath
   , cli_filelist_file :: FilePath
   , cli_hasktags_args1 :: String
+  , cli_stack_args :: String
   , cli_ghc_pkgs_args :: String
   , cli_use_stack :: Tristate
   -- , cli_use_sandbox :: Tristate
@@ -63,6 +64,11 @@
         value "" <>
         help ("Arguments to pass to hasktags. " ++ unwords def_hasktags_args ++ " is the default"))
   <*> strOption (
+        long "stack-args" <>
+        metavar "OPTS" <>
+        value "" <>
+        help ("Arguments to pass to stack"))
+  <*> strOption (
         long "ghc-pkg-args" <>
         metavar "OPTS" <>
         value "" <>
@@ -159,7 +165,7 @@
     cli_hasktags_args = (words cli_hasktags_args1) ++ cli_hasktags_args2
 
     runp_ghc_pkgs args = go cli_use_stack where
-      go ON = runp "stack" (["exec", "ghc-pkg", "--"] ++ (words cli_ghc_pkgs_args) ++ args) []
+      go ON = runp "stack" (["exec", "ghc-pkg"] ++ (words cli_stack_args) ++ ["--"] ++ (words cli_ghc_pkgs_args) ++ args) []
       go OFF = runp "ghc-pkg" (words cli_ghc_pkgs_args ++ args) []
       go AUTO = if has_stack then go ON else go OFF
 
