text: import path from 'path'
  import sh from 'shelljs'
  
  let command = 'clean [options]'
  let describe = 'clean out the build and output directories for a model'
  let builder = {
    modeldir: {
      describe: 'model directory',
      type: 'string',
      alias: 'm'
    }
  }
  let handler = argv => {
    clean(argv)
  }
  let clean = opts => {
    // Remove the directories generated by SDEverywhere.
    // Default to the current directory if no model directory is given.
    let buildDirname = path.join(opts.modeldir || '.', 'build')
    let outputDirname = path.join(opts.modeldir || '.', 'output')
    let silentState = sh.config.silent
    sh.config.silent = true
    sh.rm('-r', buildDirname)
    sh.rm('-r', outputDirname)
    sh.config.silent = silentState
  }
  export default {
    command,
    describe,
    builder,
    handler,
    clean
  }
  