Skip to content

TimCrooker/Grit

Repository files navigation

  npm version   npm downloads   github stars     license

Overview

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

Installation

Install the Grit CLI globally on your machine

npm install -g grit-cli

Home screen

Run the grit command in your terminal to open the grit home screen

grit

You should be greeted with the following display

image info

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.

Update a generator

grit update <generator>

Example:

This example will update grit-react to the newest version

grit update react

Show a list of generators with updates

grit update

Shows the following screen where you can select generators to update them

image info

Remove your installed generators to fix unexpected issues or to clean up your generator list.

Remove a generator

grit remove <generator>

Example:

This example will remove grit-react from your machine

grit remove react

Show a list of generators to remove

grit remove

Shows the following screen where you can select generators to remove them

image info

Discover new generators from the community that you can install and run.

List community generators

This command will list all generators availiable from npm ranked in order of popularity

grit find

image info

Search for generators

Example:

This example will search npm for any generators related to react

grit find react

image info

Documentation

The best way to explore all the features of Grit is to read the project Documentation

Project assistance

If you want to help out and/or support development of Grit:

awesome-grit

License

Grit is free and open-source MIT licensed software.