Skip to content

Commit

Permalink
Merge pull request #5065 from eibrahim/patch-1
Browse files Browse the repository at this point in the history
Programmatic access to the CLI
  • Loading branch information
stefanpenner committed Nov 29, 2015
2 parents f6e1822 + 95a7f3b commit 21e09a6
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

## ember-cli
[![Build Status][travis-badge]][travis-badge-url]
[![Dependency Status][david-badge]][david-badge-url]
Expand Down Expand Up @@ -107,6 +106,23 @@ Use `npm run docs` to build HTML and JSON documentation with YUIDoc and place it
* [Change history of new Ember-CLI apps](https://github.com/kellyselden/ember-cli-output)
* [Change history of new Ember-CLI addons](https://github.com/kellyselden/ember-addon-output)

## Programmatic Access

You can programmatically access the CLI from your node application.
* Create a new node app `npm init`
* Install the cli `npm install ember-cli -save`
* Create index.js
* Use the cli
```
var cli = require("ember-cli/lib/cli");
cli({
inputStream: process.stdin,
outputStream: process.stdout,
cliArgs: ['help']
});
```
* Run your app with `node .` and it should execute the `ember help` command

## License

ember-cli is [MIT Licensed](https://github.com/ember-cli/ember-cli/blob/master/LICENSE.md).
Expand Down

0 comments on commit 21e09a6

Please sign in to comment.