Skip to content

yoshihicode/cubectl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cubectl demo: a rotating 3D cube in the terminal

🧊 cubectl

Release Go Version License

   ________  ______  ____________________
  / ____/ / / / __ )/ ____/ ____/__ __/ /
 / /   / / / / __  / __/ / /     / / / /
/ /___/ /_/ / /_/ / /___/ /___  / / / /___
\____/\____/_____/_____/\____/ /_/ /_____/
      _
    /_/|  Concept: "Control a Cube instead of Kubernetes clusters"
    |_|/

"kubectl [kjuːb kəntróul] ... wait, CUBE control!?"
(Note: As a non-native English speaker, I mispronounced “kubectl” as /kʊbɛ kəntróul/ 🔊. Hence, this tool was born.)

Command Pronunciation Purpose
kubectl /kjuːb kəntróul/ Controls Kubernetes clusters.
cubectl /kjuːb kəntróul/ Controls a cube (and a pea pod) instead of Kubernetes clusters.

⚙️ Features

  • 🧊 Renders a 3D cube instead of controlling Kubernetes clusters.
  • 🫛 Renders a rotating pea pod too.
  • 🔄 Rotate the cube with arrow keys or wasd.
  • 🔍 Zoom in/out with z and x.
  • 🚫 Absolutely no Kubernetes functionality included.

💾 Download

Download prebuilt binaries from the latest release:
👉 Get the latest binaries

📦 Installation

🐧 Linux

wget https://github.com/yoshihicode/cubectl/releases/latest/download/cubectl_linux_amd64.tar.gz
tar -xzvf cubectl_linux_amd64.tar.gz
sudo mv cubectl /usr/local/bin/

# Run
cubectl

🍎🍺 macOS / Homebrew

brew tap yoshihicode/tap
brew install cubectl

# Run
cubectl

🪟 Windows

Invoke-WebRequest -OutFile cubectl_windows_amd64.tar.gz https://github.com/yoshihicode/cubectl/releases/latest/download/cubectl_windows_amd64.tar.gz
tar -xzvf cubectl_windows_amd64.tar.gz

# Run
.\cubectl.exe

📘 Usage

cubectl controls a cube (and a pea pod) instead of Kubernetes clusters.

Find more information at:
  https://github.com/yoshihicode/cubectl

Controls:
  Arrow keys or wasd: Rotate the cube
  z: Zoom in
  x: Zoom out
  Ctrl+C or Esc: Exit

Basic Cube Commands (Beginner):
  delete      Delete a resource
  get         Display a resource

Troubleshooting and Debugging Commands:
  describe    Describe a resource
  logs        Print the logs for a resource

Options:
  -h, --help            help for cubectl
  -o, --output string   Output format: wireframe|solid (default "wireframe")
  -w, --watch           Watch for changes to the cube (it will keep spinning)

Usage:
  cubectl [command] [options]

Use "cubectl <command> --help" for more information about a command.

🔌 Use as a kubectl plugin

You can integrate cubectl directly into your kubectl workflow with this simple wrapper:

echo -e '#!/bin/bash\ncubectl "$@"' > kubectl-cube
chmod +x kubectl-cube
sudo mv kubectl-cube /usr/local/bin/

# Now you're literally controlling a cube via kubectl!
kubectl cube 
kubectl cube logs -f

🛠️ Build from source

git clone https://github.com/yoshihicode/cubectl.git
cd cubectl
go build -o cubectl
./cubectl

📚 References

Inspiration for the idea

I was reading the following discussion, which somehow inspired this joke CLI command.

Line drawing

3D Rendering