You could also make this a ruby script, which might be a bit nicer looking, you basically would put lib/hatter.rb in here, but prepend it with:

    #!/usr/bin/env/ruby
    $LOAD_PATH.unshift File.expand_path('../lib')
    require 'hatter'

The first says, "Use whatever ruby is appropriate for the current environment", the second prepends the hatter stuff to the ruby load path, and the last requires all the hatter code. `lib/hatter.rb` would then just require files down-tree from it. For an example, see jfredett/exegesis , jfredett/eisegesis , or jfredett/katuv and their respective `lib/<project_name>.rb` files.