# @frenchex/config-cli

> Configuration CLI

Latest version **0.3.6** (published 2020-12-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install @frenchex/config-cli
pnpm add @frenchex/config-cli
yarn add @frenchex/config-cli
bun add @frenchex/config-cli
```

Provides the command `frenchex-config`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.6 |
| Published | 2020-12-13 |
| First published | 2020-01-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 34.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Stéphane Erard |
| Maintainers | s.erard, serard |
| Keywords | configuration, cli |

## Links

- npm: https://www.npmjs.com/package/@frenchex/config-cli
- Repository: https://github.com/French-Exception/node-config-cli
- Homepage: https://github.com/French-Exception/node-config-cli#readme
- Issues: https://github.com/French-Exception/node-config-cli/issues
- npm.io page: https://npm.io/package/@frenchex/config-cli

## Dependencies (2)

- [yargs](https://npm.io/package/yargs.md) ^15.3.1
- [@frenchex/config-api](https://npm.io/package/@frenchex/config-api.md) ^0.3.1

## 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

- 0.3.6 (latest) — 2020-12-13
- 0.3.5 — 2020-12-11
- 0.3.4 — 2020-12-11
- 0.3.3 — 2020-12-11
- 0.3.2 — 2020-11-03
- 0.3.1 — 2020-11-03
- 0.0.15 — 2020-04-10
- 0.0.14 — 2020-01-29
- 0.0.13 — 2020-01-21
- 0.0.12 — 2020-01-21
- 0.0.11 — 2020-01-20
- 0.0.10 — 2020-01-20
- 0.0.9 — 2020-01-20
- 0.0.7 — 2020-01-20
- 0.0.6 — 2020-01-20
- … 2 more at https://npm.io/package/@frenchex/config-cli/versions

## README

[![npm @latest](https://img.shields.io/npm/v/@frenchex/config-cli)](https://www.npmjs.com/package/@frenchex/config-cli)
[![npm downloads](https://img.shields.io/npm/dt/@frenchex/config-cli)](https://www.npmjs.com/package/@frenchex/config-cli)
[![dependencies Status](https://david-dm.org/french-exception/node-config-cli/status.svg)](https://david-dm.org/french-exception/node-config-cli)
[![devDependencies Status](https://david-dm.org/french-exception/node-config-cli/dev-status.svg)](https://david-dm.org/french-exception/node-config-cli?type=dev)
[![Greenkeeper badge](https://badges.greenkeeper.io/jdalrymple/node-gitlab.svg)](https://greenkeeper.io/)
[![Code Climate](https://codeclimate.com/github/french-exception/node-config-cli/badges/gpa.svg)](https://codeclimate.com/github/jdalrymple/node-gitlab)
[![Build Status](https://img.shields.io/travis/jdalrymple/node-gitlab/master.svg)](https://travis-ci.org/jdalrymple/node-gitlab)
[![Coverage](https://img.shields.io/codecov/c/github/jdalrymple/node-gitlab/master.svg)](https://codecov.io/gh/jdalrymple/node-gitlab)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![Code Style: Prettier](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)
[![Install Size](https://packagephobia.now.sh/badge?p=gitlab)](https://packagephobia.now.sh/result?p=gitlab)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/jdalrymple/node-gitlab/blob/master/LICENSE.md)

# About

Configuration CLI gives you command line interface over Configuration files

# TL;DR
## Install
Install as global package or as dependency
```typescript
// as global
npm install -g @frenchex/config-cli
// as npm dependency
npm install --save @frenchex/config-cli
```

## Initialization
Go to your home directory, it will create a ```~/config/config.json``` which will hold your user configuration
```typescript
cd ~
frenchex-config.ts init
```

## Usage
Now that you have initialized a configuration, you can use it
```typescript
frenchex-config.ts set "foo.bar" "%version%-%env%"
frenchex-config.ts set "baz" "%foo.bar%"
```

Gives:

```bash
$ frenchex-config.ts dump --raw
{
  "version": "1.0",
  "foo": {
    "bar": "%version%-%env%"
  },
  "baz": "%foo.bar%"
}

```

```bash
$ env=dev frenchex-config.ts dump --env env
{
  "env": "dev",
  "version": "1.0",
  "foo": {
    "bar": "1.0-dev"
  },
  "baz": "1.0-dev"
}

```

# Commands
```bash
$ frenchex-config.ts
frenchex-config.ts <command>

Commands:
  frenchex-config.ts dump               dump configuration as json
  frenchex-config.ts get <key>          get key
  frenchex-config.ts imports            manage imports
  frenchex-config.ts init               init Configuration
  frenchex-config.ts set <key> <value>  set key

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Not enough non-option arguments: got 0, need at least 1
```
# Installation

## As a global package
```typescript
npm install -g @frenchex/config-cli
cd ~
frenchex-config.ts init
```

## As a dependency

You better use the ```api``` version of this software : @frenchex/config-api

https://github.com/french-exception/node-config-api

https://www.npmjs.com/package/@frenchex/config-api

```typescript
npm install --save @frenchex/config-api
```


# Example

```bash
env=dev frenchex-config get "foo.bar" --config ./test-res/js.js --env env
env=dev frenchex-config set "foo.bar" "my_value_%env%" --config ./test-res/js.js --env env
```

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