Skip to content

dev-aunik/goku-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goku CLI

Goku CLI is a small Go tool for converting JSON to YAML and YAML to JSON.

Features

  • Reads .json, .yaml, and .yml files
  • Prints the converted result
  • Saves the converted file
  • Can save with a custom file name or path
  • Shows an error if input and output formats are the same

Setup

Clone the project, then run:

go mod tidy

To build in the project folder:

  • Windows: go build -o goku.exe .
  • macOS/Linux: go build -o goku .

To use the command as goku from anywhere, build it into any folder that is already in your system PATH.

Usage

Basic command:

goku -i <input-file> -o <output-format>

JSON to YAML:

goku -i examples/config.json -o yaml

YAML to JSON:

goku -i examples/config.yaml -o json

Save with another name or folder:

goku -i examples/config.json -o yaml -p output/app.yaml

Flags

  • -i, --input: input file path
  • -o, --output: output format, json or yaml
  • -p, --path: optional output path with file name
  • -h, --help: show help

Help

Run goku --help.

Test

Run go test ./....

License

MIT License

About

Go CLI for converting JSON to YAML and YAML to JSON.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages