https://github.com/ryonakagami/yamlcli
A command-line tool to convert between YAML and JSON formats.
https://github.com/ryonakagami/yamlcli
cli-tool command-line json python uv uvx yaml
Last synced: 2 months ago
JSON representation
A command-line tool to convert between YAML and JSON formats.
- Host: GitHub
- URL: https://github.com/ryonakagami/yamlcli
- Owner: RyoNakagami
- License: mit
- Created: 2025-10-20T10:55:28.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-12-11T15:17:27.000Z (7 months ago)
- Last Synced: 2025-12-12T16:54:09.659Z (6 months ago)
- Topics: cli-tool, command-line, json, python, uv, uvx, yaml
- Language: Python
- Size: 30.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yamlcli
A command-line tool to convert between YAML and JSON formats.
## Features
- Convert YAML files to JSON format
- Convert JSON files to YAML format
- Customizable JSON indentation
- Error handling for invalid files and formats
## Usage
```bash
# Convert YAML to JSON (default 2-space indent)
yamlcli input.yaml --to-json
# Convert YAML to JSON with custom indentation
yamlcli input.yaml --to-json --indent 4
# Convert JSON to YAML
yamlcli input.json --to-yaml
```
## Install via `uv tool`
```bash
uv tool install git+https://github.com/RyoNakagami/yamlcli.git
```
## Uninstall
```bash
uv tool uninstall yamlcli
```
## Development
### Running Tests
Tests are written using pytest. To run the tests:
```bash
uv run pytest
```