     #{(' - ' + cmd + '\n' for cmd of templateCommands).join("")}
     """.replace(/\n$/, '')
     action: (cmd, args...) ->
-      templateCommands[cmd] getConfig()
+      console.log templateCommands[cmd](getConfig())
 
   build:
     description: """
     the build command does two things:
-     - run `component install` IF the [staticpath] is given
-     - and if the [templatepath] is given, it will output a json file named
+     - run `component install`
+     - if the [templatepath] is given, output a json file named
        [contextjsonname] to that path containing the keyed info from the
        `component template` command
     """
     action: () ->
-      commands.install.action() if argv.staticpathSpec
+      commands.install.action()
 
       if argv.templatepath
-        config = getConfig()
-        templateObj = _.reduce(templateCommands, ((templateObj, cmd, name) ->
-          templateObj[name] = templateCommands[name](config)
-          return templateObj
-        ), {})
+        templateObj = templateCommands.all getConfig()
         provide argv.templatepath
         contextjsonname = join(argv.templatepath, argv.contextjsonname)
+        log "writing context json to #{contextjsonname}"
         write contextjsonname, JSON.stringify(templateObj)
 
   completion:
     description: """
     spits out a bash completion command.  something you can run like this:
-      $ `component completion`
-    """
-    action: () ->
-      console.log "complete -W #{(c for c of commands).join(" ")} component"
-
+      $ component completion > /tmp/cc.bash && source /tmp/cc.bash
+    """
+    action: () ->
+      console.log "complete -W \"#{(c for c of commands).join(" ")}\" component"
+
+  uninstall:
+    description: """
+    just does the opposite of the `component install` command -- it removes
+    directories (or links) from [staticpath] that would have been installed
+    """
+    action: () ->
+      components = allComponents()
+      if isComponent()
+        components.push {json: {component: {name: componentName()}}}
+      for component in components
+        installedTo = join(componentsPath(), component.json.component.name)
+        if exists installedTo
+          if fs.lstatSync(installedTo).isSymbolicLink()
+            log "removing link #{installedTo}"
+            fs.unlinkSync installedTo
+          else
+            log "removing directory #{installedTo}"
+            wrench.rmdirSyncRecursive installedTo
+
+log = (msg, level="info") ->
+  console.log "[#{basename process.argv[1]} #{argv._[0]}] #{msg}"
 
 usage = """#{("node $0 "+cmd+'\n' for cmd of commands).join("")}
 `component` is a utility that's used for installing javascript components and

    if not isComponent() then return {}
    destPath = join(root, componentName())
    addComponentToConfig(makePathsAbsolute(requirejsConfig(), destPath))
  console.log 'in there',argv.baseurlSpecified,argv.baseurl
  baseUrl = if argv.baseurlSpecified then {baseUrl: argv.baseurl} else {}
  extend.apply this, [true, baseUrl]
    .concat(componentConfig(c) for c in components)

      "default": join json.component?.testDirectory or
                      (exists("static") and ".") or
                      ".test", "static"
      describe: """
      specify the installation path.  the default for this value is dynamically determined:
       - if there is a package.json file with a component.testDirectory property, staticpath is set to that
       - otherwise if the './static' directory exits, staticpath is set to 'static'
       - finally if nothing else component will create a '.test' directory and use it as the staticpath
       (cmd: build)
       """

    .option "baseurl",
      string: true
