https://github.com/artursopelnik/jsoneditor-cli
A command-line tool for Node.js that provides an web-based JSONEditor to view, edit, format, and validate JSON
https://github.com/artursopelnik/jsoneditor-cli
json-editor jsoneditor node-jsoneditor
Last synced: 3 months ago
JSON representation
A command-line tool for Node.js that provides an web-based JSONEditor to view, edit, format, and validate JSON
- Host: GitHub
- URL: https://github.com/artursopelnik/jsoneditor-cli
- Owner: artursopelnik
- License: mit
- Created: 2025-02-06T19:34:52.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-02-10T18:02:16.000Z (11 months ago)
- Last Synced: 2025-09-19T07:43:21.664Z (4 months ago)
- Topics: json-editor, jsoneditor, node-jsoneditor
- Language: HTML
- Homepage: https://medium.com/@artur.sopelnik93/how-to-edit-design-tokens-without-paid-software-or-coding-skills-4d64caba000b
- Size: 114 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# JSONEditor-CLI
[](http://badge.fury.io/js/jsoneditor-cli)
JSONEditor-CLI is a command-line tool for Node.js that provides an interactive JSON editing experience using [JSONEditor](https://github.com/josdejong/jsoneditor). Whether you need to quickly view or edit JSON files, JSONEditor-CLI makes it simple and efficient.

## Features
- **JSON Editing that runs on command line**: Edit JSON files directly in a web-based interface without needing a text editor.
- **Multiple Modes**: Supports different editing modes such as `tree` (default), `text`, or `code`.
- **Web Interface Option**: Launch a local web interface to edit JSON files in your browser.
- **Lightweight & Fast**: Built with Node.js for a quick and responsive experience.
## Installation
Install JSONEditor-CLI globally using npm:
```bash
npm install -g jsoneditor-cli
```
Or add it as a dependency to your project:
```bash
npm install jsoneditor-cli --save-dev
```
## Usage
To use JSONEditor-CLI, run the command followed by the JSON file you wish to edit:
```bash
jsoneditor-cli [options] load
```
### Options
- `-m, --mode `
Set the editor mode. Available modes: `tree` (default), `text`, or `code`.
- `-p, --port `
Specify the port for the web interface (default: `5053`).
- `-e, --engine `
Set the engine. Available engines: `jsoneditor` (default), `svelte-jsoneditor`.
- `-i, --initialExpand `
Set the initial expand. Available options: `true` (default), `false`.
- `-h, --help`
Display help and usage information.
### Examples
**Edit a JSON file in tree mode (default):**
```bash
jsoneditor-cli load data.json
```
**Specify a mode (e.g., code mode):**
```bash
jsoneditor-cli --mode code load data.json
```
**Launch the web interface on a specific port:**
```bash
jsoneditor-cli --port 4000 load data.json
```
Any options provided via the command line will override the configuration file settings.
## Contributing
Contributions are welcome! If you find any issues or have ideas for improvements, please open an issue or submit a pull request on [GitHub](https://github.com/artursopelnik/jsoneditor-cli).
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE.txt) file for details.