Codewise CLI
Codewise is a DevOps-oriented command-line utility for scaffolding, packaging, and deploying containerized applications using a consistent workflow. It enables developers and platform engineers to move from source code to running workloads using Docker, Kubernetes, and Helm without switching tools or remembering boilerplate syntax.
Status: Beta. Local workflows and disposable-cluster validation are
supported; review the production-readiness guide
before using Codewise against important workloads.
Features
Codewise provides automation for:
- Dockerfile scaffolding and image builds
- Kubernetes manifest generation and deployment
- Helm chart scaffolding
- Namespace, context, and dry-run support for Kubernetes operations
- Local tool and Kubernetes connectivity diagnostics with
codewise doctor
- Explainable deployment selection and strategy-specific recovery guidance
- Explicit Helm, kubectl, and GitOps environment strategies
- Configuration bootstrapping for defaults (image, namespace, repo)
- File encoding utilities (Base64, YAML ⇄ JSON, ENV parsing)
- Templating & project bootstrap helpers
Installation
Install the latest verified Linux or macOS release:
curl -fsSLO https://raw.githubusercontent.com/AryanSharma9917/Codewise-CLI/main/install.sh
bash install.sh
The installer validates the archive against the published SHA-256 checksum and
uses Cosign verification when Cosign is available. Review the script before
running it. See the installation guide
for version pinning and Windows instructions.
Or build from source:
Clone the repository:
git clone https://github.com/aryansharma9917/codewise-cli.git
cd codewise-cli
Build from source:
make build
# or
go build -o codewise-cli main.go
(Optional) install globally:
sudo mv codewise-cli /usr/local/bin/codewise
Usage
General syntax:
codewise <command> [subcommand] [flags]
Local development usage (without global install):
./codewise-cli <command> [subcommand] [flags]
# or
go run . <command> [subcommand] [flags]
Documentation
- Testing runbook for copy-paste test and smoke commands
- Project overview for architecture, connectivity, build flow, and tech stack
- Deployment maturity ladder for local -> staging -> production readiness criteria
- Documentation website for the searchable guide, complete command reference, workflows, and troubleshooting
- Production-readiness guide for prerequisites, compatibility, upgrades, failure recovery, and rollback
- Documentation source for contributing changes to the website
Run the documentation website locally:
cd website
npm install
npm run dev
Create and preview a production build:
npm run build
npm run preview
Configuration
Initialize a personal configuration:
codewise config init
This creates:
~/.codewise/config.yaml
example:
defaults:
app_name: myapp
image: codewise:latest
namespace: default
context: ""
Configuration values can be overridden with CLI flags.
Docker Workflow
Initialize a Dockerfile:
codewise docker init
Validate Dockerfile structure:
codewise docker validate
Build container image:
codewise docker build
Kubernetes Workflow
Initialize manifests:
codewise k8s init
Apply manifests to a cluster:
codewise k8s apply --namespace dev --context minikube
Dry-run mode (no cluster required):
codewise k8s apply --dry-run
Delete deployment:
codewise k8s delete --namespace dev
Helm Workflow
Scaffold a Helm chart:
codewise helm init
This creates:
helm/chart/
├── Chart.yaml
├── values.yaml
└── templates/
├── deployment.yaml
└── service.yaml
Encoding & Conversion Utilities
Usage:
codewise encode --input file --output out [flags]
Common conversions:
| command example |
description |
codewise encode -i app.json -o app.yaml --json-to-yaml |
JSON → YAML |
codewise encode -i app.yaml -o app.json |
YAML → JSON (default path) |
codewise encode -i .env -o env.json --env-to-json |
.env → JSON |
codewise encode -i input.txt -o encoded.txt --base64 |
Base64 encode |
codewise encode -i encoded.txt -o output.txt --base64 --decode |
Base64 decode |
Additional auto-detected conversions are supported from file extensions:
Example End-to-End Workflow
codewise config init
codewise doctor --cluster
codewise docker init
codewise docker build
codewise k8s init
codewise helm init
codewise env create dev
codewise env strategy dev helm
codewise deploy explain --env dev
codewise deploy run --env dev --dry-run
codewise deploy run --env dev
Project Structure
.
├── cmd/ # CLI commands
├── pkg/ # Core logic (docker, k8s, helm, config, encode)
├── templates/ # Source templates used by generators
├── helm/ # Generated Helm charts
├── k8s/ # Generated Kubernetes manifests
├── tests/ # Automated tests
├── testdata/ # Fixtures used by tests and conversion checks
├── Dockerfile
├── go.mod
└── main.go
Roadmap
Planned enhancements include:
- Helm push to OCI registries
- Flux support alongside the current Argo CD workflow
- Image scanning (Trivy/Syft plugins)
- Terraform infrastructure modules
- Local cluster provisioning (kind/k3d/minikube)
- Plugin system for custom extensions
- Global binary installation via Homebrew/Scoop
- Broader macOS and Windows end-to-end coverage
Contributing
Contributions are welcome. The project follows a logical commit layering:
- Logic changes under
pkg/
- CLI wiring under
cmd/
- Scaffold output under
k8s/ and helm/
Fork, branch, commit, and open a PR.