Grit is a scaffolding tool built to speed up a developers workflow through the use of reusable code generators. Grit generators are run in the command line with the Grit CLI where they gather information from users to scaffold out new files, library configs, or really anything code related. Generators have access to a libray of useful methods that allow them to perform nearly any task, so there is no limit to what Grit can do
Install the Grit CLI globally on your machine
npm install -g grit-cli
Run the grit
command in your terminal to open the grit home screen
grit
You should be greeted with the following display
From here you can explore Grit and begin to play around with generators
Run a generator to scaffold out new projects or inject code into existing projects.
grit run <generator> [outDir]
Example:
This example uses grit-react to build a new React project into the my-grit-generator
directory
grit run react my-grit-generator
Install a generator on your local machine for later use online or offline.
grit install <generator>
Example:
This example will install grit-react on your machine
grit install react
Update your installed generators and keep up with the newest features.
grit update <generator>
Example:
This example will update grit-react to the newest version
grit update react
grit update
Shows the following screen where you can select generators to update them
Remove your installed generators to fix unexpected issues or to clean up your generator list.
grit remove <generator>
Example:
This example will remove grit-react from your machine
grit remove react
grit remove
Shows the following screen where you can select generators to remove them
Discover new generators from the community that you can install and run.
This command will list all generators availiable from npm ranked in order of popularity
grit find
Example:
This example will search npm for any generators related to react
grit find react
The best way to explore all the features of Grit is to read the project Documentation
If you want to help out and/or support development of Grit
:
- Add a GitHub Star to the project.
- Publish your own generators for the community to use
- Submit a pull request on GitHub
- Write interesting articles about project on Dev.to, Medium or personal blog.
Grit
is free and open-source MIT licensed software.