title: Pass URL to CasperJS via CLI
body: <p>I'm using CasperJS to evaluate a webpage. What I would like to do is to let me pass an argument that is a URL, have CasperJS download and evaluate the page, and output to standard out the webpage so I can use it in a BaSH script. Here is my code so far for Casper:</p>
  
  <pre><code>var casper = require('casper').create();
  var url = casper.cli.args;
  
  casper.start(url, function() {
      this.evaluate(function() {
          return document;
      });
      this.echo(this.getHTML());
  });
  casper.run();
  </code></pre>
  
  <p>This is what I'm seeing once I run it:</p>
  
  <pre><code>@:~/spider/casperjs$ casperjs viewsource.js google.com
  CasperError: No steps defined, aborting                                         
    /usr/local/src/casperjs/modules/casper.js:1510 in run
    ~/spider/casperjs/viewsource.js:10
  </code></pre>
  
  <p>Help please.</p>