diff --git a/flow2dot.cabal b/flow2dot.cabal
--- a/flow2dot.cabal
+++ b/flow2dot.cabal
@@ -1,5 +1,5 @@
 Name:    flow2dot
-Version: 0.5
+Version: 0.5.1
 License: BSD3
 License-File: LICENSE
 Author: Dmitry Astapov <dastapov@gmail.com>
@@ -21,3 +21,5 @@
   Exposed-Modules: Text.FlowDiagram
   Build-Depends:      base, mtl >= 1.0, containers, haskell98, QuickCheck, parsec, utf8-string, dotgen >= 0.2
 
+Executable  flow2dot
+  Main-Is:       flow2dot.hs
diff --git a/flow2dot.hs b/flow2dot.hs
new file mode 100644
--- /dev/null
+++ b/flow2dot.hs
@@ -0,0 +1,30 @@
+-----------------------------------------------------------------------------
+-- |
+-- Name        :  Flow2Dot
+-- Copyright   :  (c) Dmitry Astapov, 2007-2009
+-- License     :  BSD-style (see the file LICENSE)
+--
+-- Maintainer  :  Dmitry Astapov <dastapov@gmail.com>
+-- Stability   :  beta
+-- Portability :  portable
+--
+-----------------------------------------------------------------------------
+module Main where
+
+import Text.FlowDiagram
+import System (getArgs)
+
+main :: IO ()
+main = do
+  args <- getArgs
+  case args of
+       [fname] -> process fname
+       _ -> do print "Usage: flow2dot file.flow > file.dot"
+
+
+-- | Process a .flow file and output generated .dot diagram
+process :: FilePath -> IO ()
+process fname = do
+  flow <- parseFlowFromFile fname
+  putStrLn $ flow2dot flow
+
