DEV Community

AryanSharma9917
AryanSharma9917

Posted on

I Built a DevOps CLI Tool in Go – Meet Codewise-CLI

Hey Devs,

I'm Aryan, and over the past few weeks, I’ve been working on a project that turned into something pretty useful — a command-line tool I named Codewise-CLI. If you're into DevOps, YAML/JSON shenanigans, or just want to automate tedious tasks, you might find it handy too.

Let me take you through what Codewise-CLI is, why I built it, and how you can use it.


Why Codewise?

Let’s be real — dealing with formats like .yaml, .json, or .env in DevOps workflows can get annoying. And if you’re switching between projects and need Dockerfiles, GitHub Actions workflows, or Kubernetes manifests often, you end up copy-pasting a lot.

So, I thought:

“Why not build a CLI that automates these bits and lets me focus on writing actual code?”

And that’s how Codewise was born.


What Can Codewise-CLI Do?

Codewise is a terminal-first tool written in Go using Cobra and Viper, and it does quite a few things:

  • ✅ Convert between JSON ↔ YAML
  • ✅ Convert .env to JSON
  • ✅ Encode/decode Base64 strings
  • ✅ Scaffold Dockerfiles for different languages
  • ✅ Generate Kubernetes manifests
  • ✅ Render .tpl templates using .yaml input
  • ✅ And more features coming soon...

Getting Started

To try it out, simply clone the repository, build the tool, and move it to your path:

git clone https://github.com/aryansharma9917/Codewise-CLI.git
cd Codewise-CLI
go build -o codewise main.go
sudo mv codewise /usr/local/bin/
Enter fullscreen mode Exit fullscreen mode

Now, just run:

codewise --help
Enter fullscreen mode Exit fullscreen mode

A Few Quick Examples

Convert JSON to YAML:

codewise encode --input input.json --output output.yaml --type JTY
Enter fullscreen mode Exit fullscreen mode

Generate a Dockerfile:

codewise generate dockerfile --output Dockerfile
Enter fullscreen mode Exit fullscreen mode

Render a GitHub Actions .tpl file using values:

codewise template --template template.tpl --values values.yaml --output rendered.yaml
Enter fullscreen mode Exit fullscreen mode

🐳 Docker Support

You can also run Codewise-CLI via Docker:

docker pull aryansharma04/codewise-cli:latest
docker run --rm aryansharma04/codewise-cli:latest --help
Enter fullscreen mode Exit fullscreen mode

Roadmap

Here’s what’s coming next for Codewise:

  • ✅ TOML/XML conversions
  • ✅ Interactive prompts (instead of just flags)
  • ✅ Auto-generate GitHub workflows
  • --force flag to overwrite existing files

Final Thoughts

This is just the beginning. I built Codewise to solve a problem I faced often — and if it helps even a few more developers speed up their DevOps work, that’s a win.

Feel free to check it out, use it, break it, suggest improvements, or open a PR if you’re feeling generous!

🔗 GitHub: https://github.com/aryansharma9917/Codewise-CLI

Thanks for reading!

Top comments (3)

Collapse
 
rakshitsharma0402 profile image
Rakshit Sharma

Great project, mate - can’t wait to contribute!

Collapse
 
tanvi_tomar_ce037c2df1570 profile image
Tanvi Tomar

Great 🙌

Some comments may only be visible to logged-in visitors. Sign in to view all comments.