# @pwuersch/git-cli

> A git cli with many helpers

Latest version **1.1.5** (published 2021-06-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pwuersch/git-cli
pnpm add @pwuersch/git-cli
yarn add @pwuersch/git-cli
bun add @pwuersch/git-cli
```

Provides the commands `c`, `gt`, `git-cli`.

## 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.1.5 |
| Published | 2021-06-28 |
| First published | 2020-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 515.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | pwuersch |
| Maintainers | pwuersch |
| Keywords | cli, git |

## Links

- npm: https://www.npmjs.com/package/@pwuersch/git-cli
- Repository: git@gitlab.wuersch.org:p/git-cli
- npm.io page: https://npm.io/package/@pwuersch/git-cli

## Dependencies (1)

- [esm](https://npm.io/package/esm.md) ^3.2.25

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.1.5 (latest) — 2021-06-28
- 1.1.3 — 2021-05-01
- 1.0.3 — 2021-03-31
- 1.0.2 — 2021-03-30
- 1.0.1 — 2021-01-08
- 1.0.0 — 2020-11-29
- 0.9.12 — 2020-11-18
- 0.9.11 — 2020-11-16
- 0.9.10 — 2020-11-16
- 0.9.9 — 2020-11-16
- 0.9.7 — 2020-11-14
- 0.9.6 — 2020-11-14
- 0.9.5 — 2020-11-13
- 0.9.3 — 2020-11-13
- 0.9.2 — 2020-11-13
- … 12 more at https://npm.io/package/@pwuersch/git-cli/versions

## README

# Git-CLI

This cli provides easy to use commands for creating git repos, managing credentials and committing changes. It is installable via a node package manager. It uses a configuration file which gets saved to your home folder. To use this tool there are some example usages documented in the usages section.

### GItLab / GitHub API's

The cli is capable of using GItLab and GItHub RestAPI's. This will be automatically activated if you have an access key and host defined in the profile you are using in a compatible action (e.g. `gt c` and `gt n`). The configuration dialogue will also take you through all steps needed if you want to configure an API provider for your profile.

## Commands

Here is a list of every available command:

```bash
gt new      # Creting a new git repo remotely and clone + configure it locally
gt clone    # Cloning an existing git repo
gt config   # Apply a profile's settings to the current git repo
gt generate # Generate git-lfs or .gitignore files for your current repo
gt update   # Update all .gitignore templates in the local cache
gt setting  # Configure profiles with git credentials, api tokens and GPG keys
c           # Commit all changes in a repo with a specified message and push to remote
```

### New git repo (`gt n`)

##### Aliases: `gt new`

This command is only available for use in combination with a api enabled profile. It will create a new repository on the target server and clone it to a local folder. In addition it will configure the cloned repo with the required settings and provide an option to enable git-lfs (with a template) and generate a .gitignore file.

Optional parameters:

```bash
-f <string> # Target folder for cloning the remote repository
-p <string> # Profile name or alias to use for creating and configuring the repo
```

### Clone remote repo (`gt c`)

##### Aliases: `gt clone`

This command clones an existing git repository. It can be used in combination with a configured API provider. If a url is specified via the `-u` parameter the API capabilities of the selected profile will be ignored.

```bash
-u <string> # SSH url to the existing git repo
-f <string> # Target folder for the cloned repo
-p <string> # Profile name or alias to use for configuring the cloned repo
```

### Generate gitignore / Configure git-lfs (`gt g`)

##### Aliases: `gt generate`

This command is currently able to do two different things. Creating a .gitignore file in the current directory and configuring git-lfs in the current repo in combination with a default .gitattributes template. Per invocation only one thing can be done. There are no parameters available for this command since those actions are mainly done via the interactive command line context.

### Update gitignore template cache (`gt u`)

##### Aliases `gt update`

Every time you are using a gitignore template the template will be stored in a local cache to remain useable offline. To 'prepare' even more for offline use you can also update all templates manually with this command.

### Configure cli profiles (`gt s`)

##### Aliases `gt setting`, `gt settings`

For managing your profiles there are 3 sub-commands available.

```bash
gt s add # Add a new profile
gt s ls  # List configured profiles
gt s rm  # Remove a profile
```

### Commit changes (`c`)

##### Aliases `gt commit`

The easiest way to commit all local changes and pushing them onto the remote branch.

```bash
c # No additional text will trigger the interactive message dialogue
c This is my commit message
```

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