         else
           gist
 
+  cmd 'load', 'Loads a file from GitHub', (path, options={}) ->
+    url = github.to_repo_url path
+    @async ->
+      @fns.text "Loading file #{path}"
+      promise = github.get_repo_contents(url)
+      .then (file) =>
+        notebook.handle_file @, file, options
+      promise.fail (response) =>
+        @fns.error response.statusText
+      promise
 
   cmd 'gist', 'Loads a script from a gist', (gist, options={}) ->
     if arguments.length is 0

      settings.get 'githubs', host

    default: -> settings.get 'default'

    save_gist: (gist, options={}) ->
      github_host = options.github ? github.default()

        promise.done (response) =>
          for name, file of response.files
            notebook.handle_file @, file, options
        promise.fail (response) =>
          @fns.error response.statusText

  cmd 'save_gist', 'Saves a notebook as a gist', ->
    notebook = @export_notebook()
