intc-cli
Install
If you have pixi (our internal NPM registry) globally configured then run:
npm install -g intc
Otherwise you will need to run:
npm install -g intc --registry https://pixi.intel.com/
Update intc-cli
Simply run the following command to update the app generator to the latest version:
intc update
If that command is not recognized than you are using a version older than v3.0.0 so you will need to run the following command to update:
npm install -g git://github.intel.com/intc/intc-cli.git
Learn More: Screencasts
If you have any questions or feedback please post them on the app generator Inside Blue group.
Commands
intc gen-ui [options] YOUR_APP_NAME
(e.g.,intc gen-ui -t es5 itdz
) will create an AngularJS based app for UI dev in a directory called itdz-uiintc gen-api [options] YOUR_SERVICE_NAME
(e.g.,intc gen-api itdz
) will create a Sails.js based service in a directory called itdz-apiintc gen-bower [options] YOUR_COMPONENT_NAME
(e.g.,intc gen-bower myBowerComponent
) will create a bower based framework for creating reusable assetsintc cfg-api [options]
(e.g.,intc cfg-api -i
) will configure or output configuration of an intc generated SailsJS application.intc cfg-ui [options]
(e.g.,intc cfg-ui -r https://github.intel.com/e2edx/itdz.git
) will configure or output configuration of an intc generated AngularJS application.
gen-ui details
The gen-ui command will creates a boilerplate AngularJS (1.x) or Angular (2.x+) project.
Gulp
Gulp command line is only required for the AngularJS templates.
If you have Gulp CLI < 1.2.1 you will need to upgrade your Gulp CLI version
To determine your Gulp version installed, open a command prompt or terminal and run:
$ gulp -v
If a Gulp version is returned is < 1.2.1 , you will need to upgrade by running the following commands
$ npm install -g gulp-cli
Angular CLI
The Angular CLI 1.4.8+ and Node 6.9+ are required only for the Angular 2.x+ template.
Simply run the following command to install the latest version of the Angular CLI:
$ npm install -g @angular/cli@latest
Options
There are some optional paramaters as well:
-h, --help
output usage information-b, --branch [branch]
specify the branch you would like to clone from starterbot9000. This takes priority over the -t flag-t, --type [type]
specify project type (es5 | babel | ie8 | ngx)-n, --noSuffix
do not include -ui suffix in directory name.-l, --logLevel [logLevel]
Set the debugging output level. The levels areerror
,warning
,success
,info
,debug
,verbose
. The default is log level isinfo
.-f, --force
Don't heed warnings. Just keep generating the app--no-start
Do not run the application after generation completes.
Example:
intc gen-ui --noSuffix -t es5 myFractalApp
Produces an AngularJS app using a fractal hierarchy in a directory called myFractalApp (no -ui in directory name due to --noSuffix being used)
Types:
Type | Description | Documentation |
---|---|---|
es5 | Angular application that uses the latest AngularJs stack with gulpJs. ES5 compliant. | link |
jsDoc | es5 template + JSDoc support | link |
babel | Same as the es5 type, but it uses the babel interpreter so developers can use ES6 features | link |
ie8 | Angular 1.2 application that uses Gulp and works on IE8 | link |
saphana | Angular 1.2 application that uses Gulp and works on IE8, includes SAP Hana examples | link |
ngx | Angular 2.x+ application that uses the Angular CLI to generate a project and then apply Intel specifics on top of the project | link |
Other builds:
intc-cli uses branches in the starterbot-9000 repo as its starting point. If you would like to use your own custom branch you can specify it with the -b
flag. For AngularJS, the branch must exists in the starterbot-9000 repo. For Angular, the branch must exist in the starterbot-ngx repo
What it does
makes sure you have git, node, npm, gulp, and bower installed and configured correctly
gulp and bower are only required for the Angular 1.x and Bower templates
for AngularJS projects, clones a boilerplate AngularJS project via a GitHub repo
- for Angular projects, uses the Angular CLI to the a project, then applies MLAF and an Intel template for Angular
- verify the clone was successful
- install the node dependencies
- install the bower dependencies (only AngularJS)
- rename necessary instances in boilerplate app to the app name you provided in the
init
command (only AngularJS) - git init the project
- git add all files
- git commit changes (to your local git repo)
- and finally launch the app
- it also logs the start and completion of the app creation so we have insight to failed attempts
gen-api details
Right now it simply creates a boilerplate Sails.js project. There is an optional flag as well:
Options
-h, --help
output usage information-x, --noSuffix
Do not include -api suffix in directory name.-l, --logLevel [logLevel]
Set the debugging output level. The levels areerror
,warning
,success
,info
,debug
,verbose
. The default is log level isinfo
.-f, --force
Don't heed warnings. Just keep generating the app.
Example:
intc gen-api --noSuffix myService
Produces a Sails.js app in a directory called myService (no -api in directory name due to --noSuffix being used)
The following two options set in api/config/blueprint.js diverge from a project generated using 'sails new <project>':
prefix: '/v1'
pluralize: true
This means that by default your endpoints will look like localhost:1337/v1/users instead of the typical localhost:1337/user when using sails to generate a project.
What is happening behind the scenes:
- make sure you have git, node, npm, installed
- clone a boilerplate Sails.js project via a GitHub repo
- verify the clone was successful
gen-bower details
Creates a boilerplate framework for creating a reusable asset.
Options
-h, --help
output usage information-t, --type [type]
specify project type (es5 | babel | ie8 | saphana)-f, --force
Don't heed warnings. Just keep generating the app
Example:
intc gen-bower intcAwesomeComponent
Creates a boilerplate framework for creating a reusable asset.
What is happening behind the scenes:
- make sure you have git, node, npm, gulp, and bower installed
- clone a boilerplate bower component project via a GitHub repo
- verify the clone was successful
- install the node dependencies
- install the bower dependencies
- rename necessary instances in boilerplate app to the app name you provided in the
init
command - git commit changes (to your local git repo)
- and finally launch the framework
- it also logs the start and completion of the app creation so we have insight to failed attempts
cfg-api, cfg-ui details
Currently the config command reports on application information from the package.json file and adds a github.intel.com repository to the package.json and local git. Recommend you first
create the repository on github.intel.com and then use -r
or --repo
command.
Options
-i, --info
reports application name, version, author and repository information, if present.-r, --repo [repo]
Configures the project to use an already created github repository; ex:https://github.intel.com/<org>/<name>.git
)
intc-plugins
Plugin support has been added to intc. Currently the intc-plugins registry is located at https://intc-plugins.com/. The API/REST web services are complete and a web site is under development.
plugin-catalog
- Get the list of intc plugins from the registry.plugin-create <name>
, - Initialize a new intc plugin in the current directory given a required name.plugin-info <name> [version]
, - Get info about an intc plugin given a name or include optional version.plugin-install <name> [version]
- Install an intc plugin given a name and include optional version.plugin-list
- List installed plugins.plugin-publish [github_url]
- Publish an intc plugin located in the current directory or given a github url.plugin-search <term>
- Search for an intc plugin given a search term.plugin-uninstall <name>
- Uninstall an intc plugin given a name.plugin-unpublish <name> [version]
- Unpublish an intc plugin given a name or with an optional version.
Example Usage: intc plugin-install echo
will install plugin echo. intc plugin-catalog
will list the plugins
available to install.
Creating Plugins
Refer to this section here for details.
config
Configure intc settings; see -h,--help for details
Subcommands include:
set <key> <value>
- key and value are required inputs. Set a configuration value.get <key>
- key is a required input. Display a configuration value.list
- Display all configuration values.delete <key>
- key is a required input. Display a configuration value.
Example Usage: intc config list
adduser
Add your idsid to intc config and intc plugin registry; required for some commands such as intc plugin-publish
and
intc plugin-unpublish
. adduser will prompt for your domain (AMR,GAR,GER), idsid and password. The registry will then
verify your credentials and add your idsid to the local intc config and in the intc-plugins registry. This essentially
gives your write access to the intc-plugins registry.
Roadmap
Check out this page for the latest roadmap info.
Contributing
See the contributing guide.