Genli is a code generator for angular2 projects.
Last updated 2 years ago by flauc .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install genli 
SYNC missed versions from official npm registry.


Genli is a command line code generator for Angular 2 applications. It generates single files (components, directives..) or entire applications. It's currently very basic and has only a few commands, but i plan on implementing quit a lot of functionality and add code generation for node applications using typescript.


Install globally for easiest use.

npm install -g genli

Creating apps

The apps generated are as light as possible. They serve as a starting point for Angular 2 applications. Unfortunately the generator doesn't create a package.json file and doesn't call npm install. I plan on implementing this functionality later. For now call the following commands after genli.

npm init 
npm install --save angular2 systemjs es6-promise es6-shim reflect-metadata rxjs zone.js
Command Created File Structure Description
genli create simple
  • app.component.ts
  • index.html
  • boot.ts
  • tsconfig.json
It's basically a 'hello world' angular 2 application and serves as a starting point for simple applications.
genli create routing
  • app.component.ts
  • index.html
  • tsconfig.json
  • boot.ts
  • Home [folder]
    • home.component.ts
  • About [folder]
    • about.component.ts
This is a simple application with routing and navigation. It has two views Home and About and serves as a starting point for a bit more complex applications that use routing.
genli create library
  • components.d.ts
  • components.js
  • .npmignore
  • .gitignore
  • src [folder]
    • app.component.ts
  •         </ul>
        <td>This is a starting point for creating npm libraries for Angular2.</td>

Creating single files

This are the files that can be generated currently:

Command Functionality
-c or -component [fileName] Create a component
-d or -directive [fileName] Create a directive
-s or -service [fileName] Create a service
-p or -pipe [fileName] Create a pipe
genli -c test 

This command generates: test.component.ts

Maintainers (1)
Today 0
This Week 0
This Month 10
Last Day 0
Last Week 0
Last Month 8
Dependencies (5)
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2016 © |