     @args = @args.argv
 
   ###
+  Section: Helpers
+  ###
+
+  # Public: Gets the path to the directory where documentation should be stored.
+  #
+  # * `subpath` (optional) {String} to join to the docs directory.
+  #
+  # Returns a {String} containing the absolute path to the documentation directory with optional
+  #   subpath.
+  docsDirectory: (subpath) ->
+    @docsDir ?= path.resolve('./docs')
+    if subpath
+      path.join(@docsDir, subpath)
+    else
+      @docsDir
+
+  # Public: Gets the path to the root Endokken code directory.
+  #
+  # * `subpath` (optional) {String} to join to the source directory.
+  #
+  # Returns a {String} containing the absolute path to the root Endokken code directory with
+  #   optional subpath.
+  sourceDirectory: (subpath) ->
+    @sourceDir ?= path.dirname(path.resolve(__dirname))
+    if subpath
+      path.join(@sourceDir, subpath)
+    else
+      @sourceDir
+
+  ###
   Section: Metadata
   ###
 

  ###

  buildDocsDirectory: ->
    fs.mkdirSync('./docs') unless fs.existsSync('./docs')

    staticPath = path.join(__dirname, '../static')
    for source in fs.readdirSync(staticPath)
      @copyFile(path.join(staticPath, source.toString()), './docs')

  copyFile: (source, dir) ->
    destination = path.join(dir, path.basename(source))

    fs.writeFileSync(filePath, doc)

  renderFile: (file) ->
    @render(FilePage.render(file), @docsDirectory(path.basename(file, path.extname(file))))

  renderClass: (klass) ->
    @render(ClassPage.render(klass), @docsDirectory(klass.name))

module.exports = Cli
