         when 'install' then install()
         when 'add' then add process.argv
         when 'remove' then remove process.argv
-        
    + "#{humanResolutions[image.resolution]} to #{path}"
  download image.id, image.resolution, path

  
# Installs all images present in the currently loaded configuration.
#
install = () -> grab image for image in config.images

]


class ProjectConfiguration
  constructor: () ->
    @directory = ''
    @images = []

# Redacts the user's API key from the given URL.
#
# @param [String] url the URL to redact the API key from
#
redactApiKey = (url) -> url.replace user.apiKey, '********'

ask = (question, callback) ->
  readlineOptions =
    input: process.stdin
    output: process.stdout
  rl = readline.createInterface readlineOptions
  rl.question question, (answer) ->
    rl.close()
    callback answer

# Builds a URL for downloading image information.
#
