@tkil/tmpl-cli v0.0.4
tmpl-cli
Table of Contents
Install
npm install -g @tkil/tmpl-cli
Summary
tmpl
is a cli tool for generating boiler plate code and spiking projects. Its toolset is geared toward a holistic frontend developer. It is a heavy cli consisting of many sub-clis. Each sub-cli governs a category such as web
, react
, vue
, etc... A comprehensive list can be found in this readme under Commands or Online Docs. The online docs may also be summoned locally anytime once installed via the command tmpl docs
from the terminal.
Background / Inspirationtmpl
was built using OCLIF. It takes inspiration from Yeoman and the Angular CLI. To my knowledge, the best thing React has going for it is create-react-app. I feel the React community could have done better for us. This tool was born out of envy for Angular CLI's ability to speed up development and deliver an awesome coding experience.
Future
The project started with a React focus, but it will become more and more of an all purpose template and code generation tool as it grows and matures. This will range from generating web components to creating common config files. Requests are welcome, but I treat this project as a personal tool that I make public and share with others. That means the code generated and tmpl
's toolset can be somewhat opinionated.
There is currently no way to configure tmpl
for custom needs. I am open to building this in if enough people start using it and that becomes an ask.
Note: the docs are kept up to date using automation for both this readme and the online docs.
Online Docs
Documentation: https://tkil.gitlab.io/tmpl-cli/
Docs are powered by Docz
Usage
$ npm install -g @tkil/tmpl-cli
$ tmpl COMMAND
running command...
$ tmpl (-v|--version|version)
@tkil/tmpl-cli/0.0.4 darwin-x64 node-v12.18.3
$ tmpl --help [COMMAND]
USAGE
$ tmpl COMMAND
...
Commands
tmpl api [NAME]
tmpl css [COMMAND] [ARG]
tmpl docs
tmpl env [NAME]
tmpl hbs [COMMAND] [ARG]
tmpl help [COMMAND]
tmpl html [COMMAND] [ARG]
tmpl husky [COMMAND] [ARG]
tmpl jest [COMMAND] [ARG]
tmpl lintstaged [COMMAND] [ARG]
tmpl node [COMMAND] [ARG]
tmpl prettier [COMMAND] [ARG]
tmpl react [COMMAND] [ARG]
tmpl readme
tmpl schema [NAME]
tmpl service [NAME]
tmpl style [COMMAND] [ARG]
tmpl util [COMMAND] [ARG]
tmpl vue [COMMAND] [ARG]
tmpl web [COMMAND] [ARG]
tmpl webpack [COMMAND] [ARG]
tmpl api [NAME]
Sub cli for api generator
USAGE
$ tmpl api [NAME]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
-j, --javascript force javascript templates
-t, --typescript force typescript templates
EXAMPLES
Create an api call helper
$ tmpl api [name]
Create an api call helper, force ts
$ tmpl api [name] -t
tmpl css [COMMAND] [ARG]
Sub cli for CSS templates (alias of style sub cli)
USAGE
$ tmpl css [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
EXAMPLES
$ tmpl style reset
$ tmpl style colors .
tmpl docs
Sub cli for tmpl's docs
USAGE
$ tmpl docs
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
EXAMPLE
Open tmpl's docs in a browser
$ tmpl docs
tmpl env [NAME]
Sub cli for env generator
USAGE
$ tmpl env [NAME]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
EXAMPLE
Create env files under /env with config
$ tmpl env
tmpl hbs [COMMAND] [ARG]
Creates a new hbs project
USAGE
$ tmpl hbs [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
-j, --javascript force javascript templates
-t, --typescript force typescript templates
EXAMPLE
Inits new hbs project
$ tmpl hbs init
tmpl help [COMMAND]
display help for tmpl
USAGE
$ tmpl help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
tmpl html [COMMAND] [ARG]
Sub cli for html templates
USAGE
$ tmpl html [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
EXAMPLE
Adds a simple html form file
$ tmpl html form [name]
tmpl husky [COMMAND] [ARG]
Sub cli for Husky install
USAGE
$ tmpl husky [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
EXAMPLE
Creates a .huskyrc and installs
$ tmpl husky
tmpl jest [COMMAND] [ARG]
Sub cli for jest install
USAGE
$ tmpl jest [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
-j, --javascript force javascript templates
-t, --typescript force typescript templates
EXAMPLES
Creates a jest.config.js and installs
$ tmpl jest
Creates a jest.config.js and installs
$ tmpl jest -t
tmpl lintstaged [COMMAND] [ARG]
Sub cli for lint-staged templates
USAGE
$ tmpl lintstaged [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
EXAMPLE
Creates a .lintstagedrc.jso file and installs
$ tmpl lintstaged
tmpl node [COMMAND] [ARG]
Sub cli for Node project generation
USAGE
$ tmpl node [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
-j, --javascript force javascript templates
-t, --typescript force typescript templates
EXAMPLES
Initialize a node project
$ tmpl node init
Initialize a node project
$ tmpl node init -t
tmpl prettier [COMMAND] [ARG]
Sub cli for prettier
USAGE
$ tmpl prettier [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
EXAMPLE
Installs prettier with eslint bridge to vscode
$ tmpl prettier
tmpl react [COMMAND] [ARG]
Sub cli for React project init and generators
USAGE
$ tmpl react [COMMAND] [ARG]
OPTIONS
-c, --contextName=contextName
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
-j, --javascript force javascript templates
-m, --mobxName=mobxName
-t, --typescript force typescript templates
EXAMPLES
Create a new React project
$ tmpl react init
Create a functional component
$ tmpl react fc [name]
Create a functional component, force Typescript
$ tmpl react fc [name] -t
Create a functional component with context connected
$ tmpl react fc [name] -c contextName
Create a functional component with mobx store connection
$ tmpl react fc [name] -m mobxStoreName
Create a react data context under src/stores
$ tmpl react context [name]
Create a mobx state tree model under src/stores
$ tmpl react mst [name]
tmpl readme
Creates a README.md file in the current directory
USAGE
$ tmpl readme
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
EXAMPLE
Creates a README.md file in the current directory
$ tmpl readme
tmpl schema [NAME]
Sub cli for schema generator
USAGE
$ tmpl schema [NAME]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
EXAMPLE
Creates a schema
$ tmpl schema [name]
tmpl service [NAME]
Sub cli for service generator (alias of api sub cli)
USAGE
$ tmpl service [NAME]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
-j, --javascript force javascript templates
-t, --typescript force typescript templates
EXAMPLES
@ Create a service:
$ tmpl service [service-name]
tmpl style [COMMAND] [ARG]
Sub cli for Style templates
USAGE
$ tmpl style [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
EXAMPLES
Creates a css reset file
$ tmpl style reset
Creates a css colors file
$ tmpl style colors
Creates a css colors-tailwind file
$ tmpl style colors-tailwind
Creates a css file to import sakura
$ tmpl style sakura
Creates a css file to import water
$ tmpl style water
tmpl util [COMMAND] [ARG]
Sub cli for util helps
USAGE
$ tmpl util [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
-j, --javascript force javascript templates
-t, --typescript force typescript templates
EXAMPLES
Adds cookie util
$ tmpl util cookie
Adds dynamic util
$ tmpl util dynamic
Adds event-listener util
$ tmpl util event-listener
Adds history util
$ tmpl util history
Adds polyfills util
$ tmpl util polyfills
Adds react util
$ tmpl util react
tmpl vue [COMMAND] [ARG]
Sub cli for Vue project init and generators
USAGE
$ tmpl vue [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
-j, --javascript force javascript templates
-t, --typescript force typescript templates
EXAMPLES
Create a new Vue project
$ tmpl vue init
Create a vue component
$ tmpl vue component [name]
tmpl web [COMMAND] [ARG]
Sub cli for vanilla web projects
USAGE
$ tmpl web [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
-j, --javascript force javascript templates
-t, --typescript force typescript templates
EXAMPLES
Inits new web project
$ tmpl web init
Creates a web component
$ tmpl web component [name]
tmpl webpack [COMMAND] [ARG]
Creates webpack.config.js and installs deps
USAGE
$ tmpl webpack [COMMAND] [ARG]
OPTIONS
-f, --force force install and overwrite
-h, --help show CLI help
-i, --install Active install instead of dep add
-j, --javascript force javascript templates
-t, --typescript force typescript templates
EXAMPLE
$ tmpl webpack
Version History
0.0.x - Pre-release, assume unstable