# fromgit

> Tool to generate project from git repositories

Latest version **0.1.0** (published 2024-01-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install fromgit
pnpm add fromgit
yarn add fromgit
bun add fromgit
```

Provides the command `fromgit`.

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2024-01-30 |
| First published | 2022-02-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 8 |
| Unpacked size | 32.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jsoverson@gmail.com |
| Maintainers | jsoverson |

## Links

- npm: https://www.npmjs.com/package/fromgit
- npm.io page: https://npm.io/package/fromgit

## Dependencies (8)

- [ejs](https://npm.io/package/ejs.md) ^3.1.6
- [debug](https://npm.io/package/debug.md) ^4.3.1
- [tslib](https://npm.io/package/tslib.md) ^2.3.1
- [yargs](https://npm.io/package/yargs.md) ^17.3.1
- [js-yaml](https://npm.io/package/js-yaml.md) ^4.1.0
- [prompts](https://npm.io/package/prompts.md) ^2.4.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.0
- [https-proxy-agent](https://npm.io/package/https-proxy-agent.md) ^5.0.0

## Recent versions

- 0.1.0 (latest) — 2024-01-30
- 0.0.2 — 2022-02-07

## README

# fromgit

Inspired by [`degit`](https://github.com/Rich-Harris/degit), [`cargo generate`](https://github.com/cargo-generate/cargo-generate), and [yeoman](https://yeoman.io) `fromgit` allows you to use git repositories as templates for new projects.

## Installation

```console
$ npm install -g fromgit
```

## Usage

```console
$ fromgit <git-url> <destination directory> [--silent] [--branch=...]
```

## Templates

Use a `.template` file in your project's root to define variables that `fromgit` will prompt a user for. Files included in the `templates` list will be processed as [ejs](https://ejs.co) templates with the user's input.

```yaml
name: Boilerplate project
description: Description for this project
templates:
  - my-template.md
variables:
  - name: name
    message: Enter the project name
    initial: My Awesome Project!
  - name: description
    message: What's your project's description?
```

Example `my-template.md`

```markdown
## <%- name %>

<%- description %>
```

## Environment variables & silent operation

`fromgit` will look for environment variables that look like `FROMGIT_[variable name]` to populate the initial values in the template. If you pass `--silent` to `fromgit` then you can automatically populate projects without interactive prompts.

## License

MIT

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