diff --git a/music-util.cabal b/music-util.cabal
--- a/music-util.cabal
+++ b/music-util.cabal
@@ -1,6 +1,6 @@
 
 name:               music-util
-version:            0.8.1
+version:            0.9
 cabal-version:      >= 1.10
 author:             Hans Hoglund
 maintainer:         Hans Hoglund <hans@hanshoglund.se>
diff --git a/src/music-util.hs b/src/music-util.hs
--- a/src/music-util.hs
+++ b/src/music-util.hs
@@ -42,6 +42,9 @@
 packages :: [String]
 packages = labels dependencies
 
+realPackages :: [String]
+realPackages = packages `sans` "music-util" `sans` "music-docs"
+
 dependencies :: Gr String String
 dependencies = mkGraph
     [
@@ -151,13 +154,14 @@
 main3 []              = usage
 main3 (subCmd : args) = do
     if length (subCmd : args) <= 0 then usage else do
-        if (subCmd == "document")   then document args else return ()
-        if (subCmd == "install")    then install args else return ()
-        if (subCmd == "list")       then list args else return ()
-        if (subCmd == "graph")      then graph args else return ()
-        if (subCmd == "foreach")    then forEach args else return ()
-        if (subCmd == "setup")      then setup args else return ()
-
+    if (subCmd == "--version")  then printVersion args else return ()
+    if (subCmd == "document")   then document args else return ()
+    if (subCmd == "install")    then install args else return ()
+    if (subCmd == "list")       then list args else return ()
+    if (subCmd == "graph")      then graph args else return ()
+    if (subCmd == "foreach")    then forEach args else return ()
+    if (subCmd == "setup")      then setup args else return ()
+                                                               
 usage :: Sh ()
 usage = do
     echo $ "usage: music-util <command> [<args>]"
@@ -177,6 +181,10 @@
     echo $ "                        --local             Skip uploading"
     echo ""
 
+printVersion :: [String] -> Sh ()
+printVersion _ = do
+    echo $ "music-util, version 0.9"
+
 setup :: [String] -> Sh ()
 setup ("clone":_)   = setupClone (return ())
 setup ("sandbox":_) = setupSandbox
@@ -210,7 +218,7 @@
     -- Tell cabal to use the sandbox in all music-suite packages.
     -- This is typically only needed for top-level packages such as music-preludes, but no
     -- harm in doing it in all packages.
-    forM_ (packages `sans` "music-util" `sans` "music-docs") $ \p -> chdir (fromString p) $ do
+    forM_ realPackages $ \p -> chdir (fromString p) $ do
         run "cabal" ["sandbox", "init", "--sandbox", "../music-sandbox"]
         run "cabal" ["install", "--only-dependencies"]
         run "cabal" ["configure"]
@@ -377,19 +385,28 @@
 
 makeApiDocs :: Sh ()
 makeApiDocs = do
-
-    hsFiles <- getHsFiles
-    liftIO $ mapM_ print $ hsFiles
-
     mkdir_p "musicsuite.github.io/docs/api/src"
 
-    let opts  = ["-h"::Text, "--odir=musicsuite.github.io/docs/api"]
-    -- let opts1 = "--source-module=src/%{MODULE/./-}.html --source-entity=src/%{MODULE/./-}.html#%{NAME}"
-    let opts1 = []
-    let opts2 = ["--title=The\xA0Music\xA0Suite"] -- Must use nbsp
+    path <- liftIO $ getEnvOr "MUSIC_SUITE_DIR" ""
 
-    run "haddock" (concat [opts, opts1, opts2, fmap unFilePath hsFiles])
+    -- TODO generate this
+    let packDb = ["--package-db"::Text, fromString path <> "/music-sandbox/x86_64-osx-ghc-7.6.3-packages.conf.d"]
+    let out    = ["-o", fromString path <> "/musicsuite.github.io/docs/api"]
+    run "standalone-haddock" $ concat [packDb, out, fmap fromString realPackages]
     return ()
+
+    -- hsFiles <- getHsFiles
+    -- liftIO $ mapM_ print $ hsFiles
+    -- 
+    -- mkdir_p "musicsuite.github.io/docs/api/src"
+    -- 
+    -- let opts  = ["-h"::Text, "--odir=musicsuite.github.io/docs/api"]
+    -- -- let opts1 = "--source-module=src/%{MODULE/./-}.html --source-entity=src/%{MODULE/./-}.html#%{NAME}"
+    -- let opts1 = []
+    -- let opts2 = ["--title=The\xA0Music\xA0Suite"] -- Must use nbsp
+    -- 
+    -- run "haddock" (concat [opts, opts1, opts2, fmap unFilePath hsFiles])
+    -- return ()
 
 makeRef :: Sh ()
 makeRef = do
