Codewise is a powerful CLI tool that simplifies common DevOps tasks such as:
- Encoding/decoding files
- JSON/YAML conversions
- Dockerfile generation
- Kubernetes manifest scaffolding
- Rendering templates with Go's
text/templateengine
git clone https://github.com/aryansharma9917/codewise-cli.git
cd codewise-cligo build -o codewise main.gosudo mv codewise /usr/local/bin/codewise <command> [flags]| Conversion Type | Description | Example |
|---|---|---|
JTY |
JSON to YAML | codewise encode --input input.json --output output.yaml --type JTY |
YTJ |
YAML to JSON | codewise encode --input input.yaml --output output.json --type YTJ |
KVTJ |
.env to JSON | codewise encode --input .env --output env.json --type KVTJ |
B64E |
Base64 Encode | codewise encode --input input.txt --output encoded.txt --type B64E |
B64D |
Base64 Decode | codewise encode --input encoded.txt --output decoded.txt --type B64D |
Generate a Dockerfile:
codewise generate dockerfile --output DockerfileGenerate a Kubernetes manifest:
codewise generate k8s --output deployment.yamlUse Go .tpl template and .yaml values file to generate output YAML:
codewise template --template template.tpl --values values.yaml --output rendered.yamldocker build -t aryansharma04/codewise-cli:latest .docker run --rm -v $(pwd):/app aryansharma04/codewise-cli:latest <command>Example:
docker run --rm -v $(pwd):/app aryansharma04/codewise-cli:latest encode --input /app/input.json --output /app/output.yaml --type JTYMake sure Go is installed:
go test ./... -vTest coverage includes:
- ✅ JSON to YAML
- ✅ YAML to JSON
- ✅ ENV to JSON
- ✅ Base64 encode/decode
- ✅ Template rendering
.
├── cmd/ # CLI command handlers
├── pkg/
│ ├── encoder/ # Encoding & conversion logic
│ ├── generator/ # Project scaffolding logic
│ └── validator/ # Future: Schema & config validation
├── templates/ # Go template files
├── tests/ # Unit tests
├── testdata/ # Sample input files for testing
├── Dockerfile
├── Makefile
├── go.mod
├── main.go
└── README.md# Fork and clone the repo
git clone https://github.com/<your-username>/codewise-cli.git
cd codewise-cli
# Create a feature branch
git checkout -b my-feature
# Make changes and push
git add .
git commit -m "Add awesome feature"
git push origin my-featureThen open a Pull Request 🚀
Licensed under the MIT License. See LICENSE for more.
Check out the behind-the-scenes story and development journey in Aryan's detailed blog post:
📖 I Built a DevOps CLI Tool in Go – Meet codewise-cli
Dive into how this tool was built from scratch, its motivations, challenges, features, and future roadmap.
