A CLI tool for managing edge computing nodes and workloads, similar to keadm. Built with Go and the Cobra framework.
- Node Management: List, describe, label, and check status of edge nodes
- Workload Management: Deploy, delete, list workloads and view logs
- Batch Operations: Enable/disable nodes with concurrency and timeout control
- Multiple Output Formats: Table, JSON, YAML
- Configuration: Config file support with
~/.edgectl/config.yaml
# Clone and build
git clone <repo>
cd edgectl
make build
# Or install to GOPATH/bin
make installgo build -o edgectl .# List all nodes in table format
edgectl node list
# List nodes with JSON output
edgectl node list --output json
# List nodes matching selector
edgectl node list --selector region=us-west
# Describe specific node
edgectl node describe edge-node-1
# Add label to node
edgectl node label edge-node-1 environment=production
# Check node status
edgectl node status edge-node-1# List workloads
edgectl workload list
# Deploy workload to multiple nodes
edgectl workload deploy --image nginx:latest --nodes edge-node-1,edge-node-2,edge-node-3
# Deploy with replicas
edgectl workload deploy --image redis:alpine --nodes edge-node-1,edge-node-2 --replicas 3
# Delete workload (requires --force)
edgectl workload delete --name nginx-prod --force
# View workload logs
edgectl workload logs nginx-prod
# Stream logs
edgectl workload logs redis-cache --follow# Batch enable with concurrency
edgectl batch enable --nodes edge-node-1,edge-node-2,edge-node-3 --concurrency 2
# Batch enable using selector
edgectl batch enable --selector region=us-west
# Batch disable using selector
edgectl batch disable --selector region=factory-west --timeout 30s
# Check batch status
edgectl batch status --nodes edge-node-1,edge-node-2,edge-node-3 --output json# View config
edgectl config view
# Set output format
edgectl config set default-output json
# Set concurrency
edgectl config set concurrency 5
# Set timeout
edgectl config set timeout 60s--config string Config file (default: $HOME/.edgectl/config.yaml)
--kubeconfig Path to kubeconfig
-v, --verbose Verbose output
-o, --output Output format (table|json|yaml)Create ~/.edgectl/config.yaml:
default-output: table
concurrency: 5
timeout: 60s
nodes:
- edge-node-1
- edge-node-2
selectors:
region: us-west# Download dependencies (run first if go.sum is missing)
go mod tidy
# Run tests
make test
# Run with coverage
make coverage
# Format code
make fmt
# Lint
make lintIf you encounter TLS/certificate errors when running go mod tidy or go build, try:
- Ensure your system certificates are up to date
- Use
GOPROXY=https://proxy.golang.org,direct(default) - Check your network/firewall allows HTTPS to proxy.golang.org
edgectl/
├── cmd/ # Cobra commands
├── pkg/ # Shared packages (output, batch, config, node)
├── internal/ # Mock data for demo
├── main.go
└── Makefile
Owned by abhicodes11.