     options.usage """
 
       Usage: apm list
+             apm list --themes
 
       List all the installed packages and also the packages bundled with Atom.
     """
     options.alias('h', 'help').describe('help', 'Print this usage message')
+    options.alias('t', 'themes').describe('themes', 'Only list themes')
 
   showHelp: (argv) -> @parseOptions(argv).showHelp()
 

          manifest = CSON.readFileSync(manifestPath)
      manifest ?= {}
      manifest.name = child
      packages.push(manifest)

    packages

  listUserPackages: ->
    userPackages = @listPackages(@userPackagesDirectory)
    console.log "#{@userPackagesDirectory.cyan} (#{userPackages.length})"
    @logPackages(userPackages)

  listDevPackages: ->
    devPackages = @listPackages(@devPackagesDirectory)
    if devPackages.length > 0
      console.log "#{@devPackagesDirectory.cyan} (#{devPackages.length})"
      @logPackages(devPackages)

  listNodeModulesWithAtomEngine: ->
    nodeModulesDirectory = path.join(config.getResourcePath(), 'node_modules')
    allPackages = @listPackages(nodeModulesDirectory)
    allPackages.filter (manifest) -> manifest.engines?.atom?

  listBundledPackages: ->
    bundledPackages = @listPackages(@bundledPackagesDirectory)
    vendoredPackages = @listPackages(@vendoredPackagesDirectory)
    atomEnginePackages = @listNodeModulesWithAtomEngine()
    packages = _.sortBy(bundledPackages.concat(vendoredPackages).concat(atomEnginePackages), 'name')
    console.log "#{'Built-in Atom packages'.cyan} (#{packages.length})"
    @logPackages(packages)

  run: (options) ->
    @listBundledPackages()
    @listDevPackages()
    @listUserPackages()
    options.callback()

      packageLine
    console.log()

  listPackages: (directoryPath, options) ->
    packages = []
    for child in fs.list(directoryPath)
      continue unless fs.isDirectorySync(path.join(directoryPath, child))
