<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,3 @@
-
 = Add
 
   * either a gem or a source
@@ -15,9 +14,8 @@
   * on a source, prompt for confirmation, since all of those gems will be
     removed
 
-= Setup
-  * prompt for the location to setup, or just use the current directory
-    and create a 'stickler' subdirectory.  or pass in -d which is the
-    directory to create as the 'stickler' directory
+= Info
+
+  * dump information about the repository in general
 
-  * a stickler directory is  
+= </diff>
      <filename>TODO</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,13 @@ rescue LoadError
   require 'stickler'
 end
 
-Stickler::CLI.new(ARGV, ENV).run
+cli = Stickler::CLI.new(ARGV, ENV)
+begin
+  cli.run
+rescue =&gt; e
+  $stderr.puts &quot;ERROR: #{e}&quot;
+  $stderr.puts cli.usage.to_s
+end
 
 __END__
 gem = ARGV.shift</diff>
      <filename>bin/stickler</filename>
    </modified>
    <modified>
      <diff>@@ -52,13 +52,11 @@ module Stickler
     option( :quiet, &quot;q&quot; ) {
       description 'be quiet about logging to stdout'
       default false
-      attr
     }
     
     option( :debug ) {
       description 'be verbose about logging in general'
       default false
-      attr
     }
 
     run { help! }
@@ -91,57 +89,128 @@ module Stickler
       run { Stickler::Repository.new( Stickler.params_to_hash( params ) ).info }
     }
 
-    mode( :add ) {
-      description 'add a gem, or a directory of gems  and all dependencies to the repository'
+    mode( :add ) do
+      description &lt;&lt;-desc
+        Add a gem and all dependencies or a source to the repository.  
+      desc
 
       examples &lt;&lt;-txt
-        . stickler add heel
-        . stickler add ramaze -v 0.3.5
+        . stickler add gem heel 
+        . stickler add gem ramaze -v 0.3.5
+        . stickler add source http://gems.github.com/
       txt
 
-      mixin :option_directory
+      mode( :gem ) do
+        description &lt;&lt;-desc
+        Add a gem and all its dependencies to the repository.  Run from
+        within the stickler repository or use the --directory option
+        desc
 
-      run { puts &quot;Add not implemented&quot; }
-    }
+        examples &lt;&lt;-txt
+          . stickler add gem heel
+          . stickler add gem ramaze -v 2008.06 --directory /var/stickler
+        txt
+
+        argument( 'gem_name' ) { description &quot;The gem to add&quot; }
+        mixin :option_directory
+        mixin :option_version
+
+        option( :requirements ) {
+          desc &lt;&lt;-desc
+          Satisfy dependency requirements using minimum or the maximum version 
+          that satisfies the dependency.  For instance if you had a gem that 
+          dependend on rake &gt;= 0.8.1, if you used --requirements minimum then
+          stickler will download rake-0.8.1.  If you used --requrements maximum
+          then stickler will download the latest version of rake.
+          desc
+          
+          argument( :required )
+          validate { |r| %w[ maximum minimum ].include?( r.downcase ) }
+          default 'maximum'
+        }
+
+        run { puts &quot;Add gem not implemented&quot; }
+      end
+
+      mode( :source ) do
+        description &lt;&lt;-desc
+          Add a source the repository.  This makes that source available 
+          for use within the repository.  Run from within the stickler 
+          repository or use the --directory option.
+        desc
+
+        examples &lt;&lt;-txt
+          . stickler add source http://gems.github.com/
+        txt
 
-    mode( :remove ) {
-      description 'remove a gem from the repository'
+        argument( 'source_uri' ) { description &quot;the source uri to add&quot; }
+        mixin :option_directory
+        run { puts &quot;Add source not implemented&quot; }
+      end
+    end
+
+    mode( :remove ) do
+      description 'remove a gem or source from the repository'
       example &lt;&lt;-txt
-        . stickler remove mongrel
-        . stickler remove rails --include-dependencies
+        . stickler remove gem mongrel 
+        . stickler remove gem rails 
+        . stickler remove source htp://gems.github.com/
       txt
 
-      option( 'include-dependencies' ) { 
-        desc 'include any dependencies that are not required elsewhere'
-        default false
-      }
+      mode( :gem ) do
+        description &lt;&lt;-desc
+          Remove a gem and all other gems that depend on it from the repository.
+          Run from within the stickler repository or use the --directory option
+        desc
+
+        example &lt;&lt;-txt
+          . stickler remove gem mongrel 
+          . stickler remove gem rails 
+        txt
+
+        mixin :option_directory
+        argument( 'gem_name' ) { description &quot;The gem to remove&quot; }
+        run { puts &quot;Remove gem not implemented&quot; }
+      end
+
+      mode( :source ) do
+        description &lt;&lt;-desc
+          Remove a source and all is gems from the repository.
+          Run from within the stickler repository or use the --directory option
+        desc
+
+        example &lt;&lt;-txt
+          . stickler remove source htp://gems.github.com/
+        txt
+
+        mixin :option_directory
+        argument( 'source_uri' ) { description &quot;The source to remove&quot; }
       
-      mixin :option_directory
+        run { puts &quot;Remove source not implemented&quot; }
+      end
       
-      run { 
-        puts &quot;Remove not implemented&quot; 
-        puts &quot;include_dependencies = #{include_dependencies}&quot;
-      }
-    }
+    end
+
+    mode( 'check-update' ) do
+      description &lt;&lt;-desc
+      check upstream sources for new versions of gems
+      Run from within the stickler repository or use the --directory option
+      desc
 
-    mode( :check ) {
-      description &quot;check upstream repository for new versions of gems&quot;
       example &lt;&lt;-txt
-        . stickler check --email 'admin@example.com'
-        . stickler check --email 'admin@example.com' --via 'smtp.example.com'
+        . stickler check-update --email 'admin@example.com'
+        . stickler check-update --email 'admin@example.com' --via 'smtp.example.com'
       txt
 
       option( :email ) {
         desc &quot;send the check results via email&quot;
         argument( :required )
-        attr
       }
 
       option( :via ) {
         desc &quot;send the email via a particular server&quot;
         argument( :required )
         default &quot;localhost&quot;
-        attr
       }
 
       mixin :option_directory
@@ -152,18 +221,21 @@ module Stickler
         puts &quot;email     = #{email}&quot;
         puts &quot;via       = #{via}&quot;
       }
-    }
+    end
 
-    mode( :rebuild ) {
-      description &quot;rebuild all gems synced from elsewhere&quot;
+    mode( 'check-consistency' ) do
+      description &lt;&lt;-desc
+      check all gems in the repository and make sure that all is well
+      Run from within the stickler repository or use the --directory option
+      desc
 
       example &lt;&lt;-txt
-        . stickler rebuild
+        . stickler check-consistency 
       txt
       mixin :option_directory
       
-      run { puts &quot;Check not implemented&quot; }
-    }
+      run { puts &quot;Check consistency not implemented&quot; }
+    end
 
     ##
     # common options used by more than one commands
@@ -172,15 +244,15 @@ module Stickler
       option( :directory, &quot;d&quot; ) {
         argument :required
         default Dir.pwd
-        attr 
       }
     end
 
     mixin :option_force do
-      option( :force )  {
-        default false
-        attr
-      }
+      option( :force )  { default false }
+    end
+
+    mixin :option_version do
+      option( :version, &quot;v&quot; ) { argument :required }
     end
     
   }</diff>
      <filename>lib/stickler/cli.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4c5c636cfca86d0293d389dca7ffb9ced58e803a</id>
    </parent>
  </parents>
  <author>
    <name>Jeremy Hinegardner</name>
    <email>jeremy@hinegardner.org</email>
  </author>
  <url>http://github.com/copiousfreetime/stickler/commit/b351621dec187be61d60e77ddf35d7ad72126cf4</url>
  <id>b351621dec187be61d60e77ddf35d7ad72126cf4</id>
  <committed-date>2008-09-20T21:26:28-07:00</committed-date>
  <authored-date>2008-09-20T21:26:28-07:00</authored-date>
  <message>basic commandline worked out</message>
  <tree>08a68cbc0d99f65b72cfc79fe4e786d3454d9217</tree>
  <committer>
    <name>Jeremy Hinegardner</name>
    <email>jeremy@hinegardner.org</email>
  </committer>
</commit>
