# gitconfig

> Run git config command

Latest version **2.0.8** (published 2018-08-23) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2.0.8 |
| Published | 2018-08-23 |
| First published | 2015-09-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 7 |
| Unpacked size | 18.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | git, config |

## Links

- npm: https://www.npmjs.com/package/gitconfig
- Repository: https://github.com/okunishinishi/node-gitconfig
- Homepage: https://github.com/teambit/node-gitconfig#readme
- Issues: https://github.com/teambit/node-gitconfig/issues
- npm.io page: https://npm.io/package/gitconfig

## Dependencies (7)

- [co](https://npm.io/package/co.md) ^4.6.0
- [argx](https://npm.io/package/argx.md) ^3.0.0
- [execcli](https://npm.io/package/execcli.md) ^5.0.2
- [objnest](https://npm.io/package/objnest.md) ^5.0.3
- [askconfig](https://npm.io/package/askconfig.md) ^4.0.2
- [lodash.get](https://npm.io/package/lodash.get.md) ^4.4.2
- [arrayreduce](https://npm.io/package/arrayreduce.md) ^2.1.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 2.0.8 (latest) — 2018-08-23
- 2.0.7 — 2018-08-23
- 2.0.6 — 2018-07-23
- 2.0.4 — 2018-06-08
- 2.0.3 — 2016-07-30
- 2.0.2 — 2016-07-03
- 2.0.1 — 2016-07-03
- 2.0.0 — 2016-05-08
- 1.4.1 — 2016-04-19
- 1.4.0 — 2016-02-22
- 1.3.1 — 2015-10-31
- 1.3.0 — 2015-10-26
- 1.2.1 — 2015-09-16

## README

gitconfig
==========

<!---
This file is generated by ape-tmpl. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/okunishinishi/node-gitconfig
[bd_travis_url]: http://travis-ci.org/okunishinishi/node-gitconfig
[bd_travis_shield_url]: http://img.shields.io/travis/okunishinishi/node-gitconfig.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/okunishinishi/node-gitconfig
[bd_travis_com_shield_url]: https://api.travis-ci.com/okunishinishi/node-gitconfig.svg?token=
[bd_license_url]: https://github.com/okunishinishi/node-gitconfig/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/okunishinishi/node-gitconfig
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/okunishinishi/node-gitconfig.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/okunishinishi/node-gitconfig.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/okunishinishi/node-gitconfig
[bd_gemnasium_shield_url]: https://gemnasium.com/okunishinishi/node-gitconfig.svg
[bd_npm_url]: http://www.npmjs.org/package/gitconfig
[bd_npm_shield_url]: http://img.shields.io/npm/v/gitconfig.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

Run git config command

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>



<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->

<a name="section-doc-guides-01-installation-md"></a>

Installation
-----

```bash
npm install gitconfig --save
```


<!-- Section from "doc/guides/01.Installation.md.hbs" End -->

<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->

<a name="section-doc-guides-02-usage-md"></a>

Usage
---------

```javascript
'use strict'

const gitconfig = require('gitconfig')

// Set git config values.
gitconfig.set({
  'user.mail': 'foo@example.com'
}, {
  location: 'local'
}).then(() => {
  /* ... */
})

// Unset git config values.
gitconfig.unset([ 'user.mail' ], {
  location: 'local'
}).then(() => {
  /* ... */
})

// Git all config values.
gitconfig.get({
  location: 'global'
}).then((config) => {
  /* ... */
})
```


<!-- Section from "doc/guides/02.Usage.md.hbs" End -->

<!-- Section from "doc/guides/03.API.md.hbs" Start -->

<a name="section-doc-guides-03-a-p-i-md"></a>

API
---

| Signature | Description |
| --------- | ----------- |
| gitconfig.get(options, callback) | Get all git config. |
| gitconfig.get(key, options, callback) | Get config with key. |
| gitconfig.set(key, val, options, callback) | Set a config value. |
| gitconfig.set(values, options, callback) | Set mutliple config values. |
| gitconfig.unset(keys, options, callback) | Un set config value(s). |


Options
-------

| Name | Description |
| ---- | ----- |
| location | Config file location. (global, system, or local) |



<!-- Section from "doc/guides/03.API.md.hbs" End -->


<!-- Sections Start -->


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/okunishinishi/node-gitconfig/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [git-config][git_config_url]

[git_config_url]: https://git-scm.com/docs/git-config

<!-- Links End -->

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