json-edit-cli
v0.1.1
Published
Quickly manipulate JSON file values from the command line
Downloads
3
Readme
edit-json
Quickly manipulate JSON file values from the command line
Usage
$ npm install -g json-edit-cli
$ json COMMAND
running command...
$ json (-v|--version|version)
json-edit-cli/0.1.1 win32-x64 node-v10.15.3
$ json --help [COMMAND]
USAGE
$ json COMMAND
...
Commands
json copy [FILE]
describe the command here
USAGE
$ json copy [FILE]
OPTIONS
-f, --force
-h, --help show CLI help
-n, --name=name name to print
See code: src\commands\copy.ts
json del [FILE]
describe the command here
USAGE
$ json del [FILE]
OPTIONS
-V, --verbose Enable verbose output:
- Prints full JSON structure, with edits made.
-h, --help show CLI help
-k, --key=key (required) Designate the property accessor/key path string. May access nested properties by using
dot-notation. For example,
--key="property.nested-property" will allow access to the "nested-property" field of "property"
-y, --yes Skip confirmation and remove the property from the JSON structure
See code: src\commands\del.ts
json get PATH [ACCESSOR]
Inspect a full JSON file, or specific property within.
USAGE
$ json get PATH [ACCESSOR]
ARGUMENTS
PATH An absolute or relative path pointing to a JSON file
ACCESSOR Property to retrieve from the file. May use dot-notation to reference nested values. If omitted, the full
JSON object is printed.
OPTIONS
-h, --help show CLI help
--no-color Control use of colors. Defaults to true
See code: src\commands\get.ts
json help [COMMAND]
display help for json
USAGE
$ json help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
json set [FILE]
DESCRIPTION
USAGE
$ json set [FILE]
OPTIONS
-V, --verbose Enable verbose output:
- Prints full JSON structure, with edits made.
-h, --help show CLI help
-k, --key=key (required) Designate the property accessor/key path string. May access nested properties by using
dot-notation. For example,
--key="property.nested-property" will allow access to the "nested-property" field within the
object at "property"
-v, --value=value (required) Designate the new value. Values will be de-serialized with JSON.parse; For example,
--value "{ \"key\": \"value\" }"
DESCRIPTION
Set the value for a new or existing property key in a JSON file.
See code: src\commands\set.ts