# gs-hygen

> Remote hygen templates generator

Latest version **1.2.1** (published 2021-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install gs-hygen
pnpm add gs-hygen
yarn add gs-hygen
bun add gs-hygen
```

Provides the command `gs-hygen`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2021-12-17 |
| First published | 2021-04-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 14.x |
| Dependencies | 12 |
| Unpacked size | 66.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | guidesmiths_bot |
| Keywords | hygen, generator, v2 |

## Links

- npm: https://www.npmjs.com/package/gs-hygen
- Repository: https://github.com/guidesmiths/gs-hygen
- Homepage: https://github.com/guidesmiths/gs-hygen#readme
- Issues: https://github.com/guidesmiths/gs-hygen/issues
- npm.io page: https://npm.io/package/gs-hygen

## Dependencies (12)

- [del](https://npm.io/package/del.md) ^6.0.0
- [yaml](https://npm.io/package/yaml.md) ^1.10.2
- [execa](https://npm.io/package/execa.md) ^5.1.1
- [hygen](https://npm.io/package/hygen.md) ^6.1.0
- [yargs](https://npm.io/package/yargs.md) ^17.2.1
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [nodegit](https://npm.io/package/nodegit.md) ^0.27.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.0
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.0
- [cli-spinner](https://npm.io/package/cli-spinner.md) ^0.2.10
- [@types/nodegit](https://npm.io/package/@types/nodegit.md) ^0.27.6

## Recent versions

- 1.2.1 (latest) — 2021-12-17
- 1.1.1 — 2021-11-25
- 1.1.0 — 2021-09-15
- 1.0.4 — 2021-09-15
- 1.0.3 — 2021-04-27
- 1.0.2 — 2021-04-27
- 1.0.1 — 2021-04-27
- 1.0.0 — 2021-04-27

## README

# gs-hygen

## Installation

This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/).

Before installing, [download and install Node.js](https://nodejs.org/en/download/).
Node.js v14 or higher is required.

Installation is done using the
[`npm install`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally) command:

```bash
$ npm install -g gs-hygen
```

## Install from git repository

```bash
git clone https://github.com/guidesmiths/gs-hygen
npm install --quiet
npm pack
npm i -g gs-hygen-*.tgz
gs-hygen --help
```

## Usage examples

```bash
gs-hygen \
  template \
    --url git@github.com:guidesmiths/infinitas-hygen-template-generators.git \
    --generator service-systemic-basics,nvm,commitlint,jest-systemic,jest-systemic-mock-bus \
    --output /tmp/generator-demo-repo \
  git \
    --private-key ~/.ssh/id_rsa \
    --public-key ~/.ssh/id_rsa.pub
```

## CLI options

### Getting help
```
gs-hygen --help
```
```
gs-hygen [command]

Commands:
  gs-hygen template  Template command
  gs-hygen git       Git command

Options:
      --version      Show version number                               [boolean]
      --url          the template git repository url      [string] [default: ""]
      --generator    the template generators, example: "docker,git,eslint"
                                                                        [string]
      --output       the template generator output files     [string] [required]
      --username     git username                      [string] [default: "git"]
      --credentials  git username credentials             [string] [default: ""]
      --public-key   git user public key                  [string] [default: ""]
      --private-key  git user provate key                 [string] [default: ""]
  -h, --help         Show help                                         [boolean]
```

### Optional parameters

You can also choose the generators manually avoiding to provide the `--generator` argument, the output will look like this:

![image](https://user-images.githubusercontent.com/16175933/145254497-bf6f27f6-62d9-4079-bb7e-a9865f356d11.png)


## Creating templates

This project only supports templates for <a href="https://www.npmjs.com/package/hygen">hygen</a>.
<br />
So what we need is to generate a new project with the hygen templates section already generated.

```bash
mkdir new-templates
cd new-templates
git init -b main
mkdir generator _shared
# Visit the hygen docs for generating some basic hygen generator
# http://www.hygen.io/docs/quick-start
git add .
git commit -m "New template generators"
git remote add origin <REMOTE_URL>
git push origin main
```

This templates project <a href="https://github.com/guidesmiths/infinitas-hygen-template-generators">repo</a> is a good starting point

---
_Source: https://npm.io/package/gs-hygen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
