vordgi / kvco

Edit JSONs faster than ever. Just Run and Edit!
https://k-v.co
Other
2 stars 0 forks source link

kvco

k-v.co

Utility for editing a group of JSON files

Features

Creation - create a key that will be added to all files that match the pattern

Editing - correct the values of nested keys in each file

Deletion - delete the key from all files

Installation

npm install kvco -g

Usage

kvco

also you can run via kv or k-v

Configuration

To configure kvco, create an kvco.config.js file in the .json files directory

Options

pattern - the pattern by which to search for files. The pattern should contain a dynamic part <key>, f.e. "./terms/<key>.json" (by default "./<key>.json")

Now simply call kvco in the terminal:

kvco

You can also specify the path to the config by setting the CONFIG_PATH environment variable:

CONFIG_PATH="../../kvco.config.js" kvco

You can also pass package options through environment variables, converting options to UPPER_SNAKE_CASE format:

PATTERN="./terms/<key>.json" kvco

Where ./terms/<key>.json - is the pattern of files that you want to edit, with the following file structure:

root
--langs
----en.json
----de.json
----fr.json

The pattern should contain <key> - this is a dynamic parameter, equivalent to * in glob rules.

The utility will start a local server, through which all your file changes will subsequently occur.

Then open k-v.co and edit the files through a comfortable interface.

application screenshot

Additional

Please consider giving a star if you like it, it shows that the package is useful and helps continue work on this and other packages.

Create tasks with wishes, ideas, difficulties, etc. All of them will definitely be considered and thought over.

License

BSD-1-Clause