{"id":25830403,"url":"https://github.com/drone076/kubex","last_synced_at":"2026-05-08T19:33:42.657Z","repository":{"id":279297945,"uuid":"938355798","full_name":"drone076/kubex","owner":"drone076","description":"A lightweight CLI tool for managing Kubernetes contexts","archived":false,"fork":false,"pushed_at":"2025-02-24T21:21:57.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-02T02:46:34.097Z","etag":null,"topics":["container-orchestration","context-switching","devops","k8s","kubectl","kubectx","kubens","kubernetes","kubernetes-cli","kubernetes-context","kubernetes-helpers","kubernetes-management","kubernetes-productivity","kubernetes-tool","minimalist"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drone076.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-24T20:31:16.000Z","updated_at":"2025-06-29T11:29:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"463b0da1-51d2-4db0-859b-7027fc0a1152","html_url":"https://github.com/drone076/kubex","commit_stats":null,"previous_names":["drone076/kubex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/drone076/kubex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone076%2Fkubex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone076%2Fkubex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone076%2Fkubex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone076%2Fkubex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drone076","download_url":"https://codeload.github.com/drone076/kubex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone076%2Fkubex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32794716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["container-orchestration","context-switching","devops","k8s","kubectl","kubectx","kubens","kubernetes","kubernetes-cli","kubernetes-context","kubernetes-helpers","kubernetes-management","kubernetes-productivity","kubernetes-tool","minimalist"],"created_at":"2025-02-28T19:19:49.748Z","updated_at":"2026-05-08T19:33:42.653Z","avatar_url":"https://github.com/drone076.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubex\n\n![Build Status](https://github.com/drone076/kubex/actions/workflows/go.yml/badge.svg)\n\n`kubex` is a lightweight CLI tool for managing Kubernetes contexts. It simplifies switching between Kubernetes contexts and viewing the current context. Think of it as a stripped-down version of `kubectx`, designed to be simple, fast, and cross-platform.\n\n## Features\n- List Contexts: View all available Kubernetes contexts.\n- Switch Contexts: Switch to a specific context by name.\n- Show Current Context: Display the currently active context.\n- Autocompletion: Supports shell autocompletion for commands and context names (Bash, Zsh, Fish).\n- Cross-Platform: Works on Linux, macOS, and optionally Windows.\n\n---\n\n## Installation\n\n### 1. Quick Installation via \"curl-to-bash\"\nYou can install `kubex` with a single command using the following \"curl-to-bash\" script:\n```bash\ncurl -fsSL https://raw.githubusercontent.com/yourusername/kubex/main/install.sh | bash\n```\n\u003e **Note**: Always inspect the script before running it:\n\u003e ```bash\n\u003e curl -fsSL https://raw.githubusercontent.com/yourusername/kubex/main/install.sh | less\n\u003e ```\n\nThe script will automatically detect your operating system and architecture, download the appropriate binary, and install it to `/usr/local/bin`.\n\n---\n\n### 2. Download Precompiled Binaries\nDownload the appropriate binary for your operating system:\n\n- Linux:\n  ```bash\n  wget https://example.com/kubex-linux -O kubex\n  chmod +x kubex\n  sudo mv kubex /usr/local/bin/\n  ```\n\n- macOS:\n  ```bash\n  curl -L https://example.com/kubex-macos -o kubex\n  chmod +x kubex\n  sudo mv kubex /usr/local/bin/\n  ```\n\n\u003e Replace `https://example.com/` with the actual URL where you host the binaries.\n\n---\n\n### 3. Build from Source\nIf you prefer to build `kubex` from source, follow these steps:\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/kubex.git\n   cd kubex\n   ```\n\n2. Build the binary:\n   ```bash\n   go build -o kubex\n   ```\n\n3. Move the binary to a directory in your `PATH`:\n   ```bash\n   sudo mv kubex /usr/local/bin/\n   ```\n\n---\n\n## Usage\n\n### List Contexts\nView all available Kubernetes contexts:\n```bash\nkubex list\n```\n\nExample output:\n```\nAvailable contexts:\n- minikube\n- gke_my-cluster (active)\n- docker-desktop\n```\n\n---\n\n### Switch Context\nSwitch to a specific context:\n```bash\nkubex use \u003ccontext-name\u003e\n```\n\nExample:\n```bash\nkubex use minikube\n```\n\nOutput:\n```\nSwitched to context: minikube\n```\n\n---\n\n### Show Current Context\nDisplay the currently active context:\n```bash\nkubex current\n```\n\nExample output:\n```\nCurrent context: minikube\n```\n\n---\n\n## Autocompletion\n\n`kubex` supports shell autocompletion for Bash, Zsh, and Fish. Follow the instructions below to enable it.\n\n### Bash\nAdd the following line to your `~/.bashrc` or `~/.bash_profile`:\n```bash\nsource \u003c(kubex completion bash)\n```\n\nReload the shell:\n```bash\nsource ~/.bashrc\n```\n\n---\n\n### Zsh\nAdd the following line to your `~/.zshrc`:\n```bash\nsource \u003c(kubex completion zsh)\n```\n\nReload the shell:\n```bash\nsource ~/.zshrc\n```\n\n---\n\n### Fish\nAdd the following line to your Fish configuration file (`~/.config/fish/config.fish`):\n```bash\nkubex completion fish | source\n```\n\n---\n\n## Building from Source\n\nTo build `kubex` for multiple platforms, use the following commands:\n\n### Build for Linux\n```bash\nGOOS=linux GOARCH=amd64 go build -o kubex-linux\n```\n\n### Build for macOS\n```bash\nGOOS=darwin GOARCH=amd64 go build -o kubex-macos\n```\n\n### Automated Build Script\nSave the following script as `build.sh` and run it to generate binaries for both platforms:\n```bash\n#!/bin/bash\n\n# Build for Linux\nGOOS=linux GOARCH=amd64 go build -o kubex-linux\n\n# Build for macOS\nGOOS=darwin GOARCH=amd64 go build -o kubex-macos\n\necho \"Binaries built: kubex-linux, kubex-macos\"\n```\n\nMake it executable and run:\n```bash\nchmod +x build.sh\n./build.sh\n```\n\n---\n\n## Contributing\n\nWe welcome contributions! If you find a bug or have an idea for a new feature, please open an issue or submit a pull request.\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature/your-feature`).\n3. Commit your changes (`git commit -m \"Add some feature\"`).\n4. Push to the branch (`git push origin feature/your-feature`).\n5. Open a pull request.\n\n---\n\n## License\n\nThis project is licensed under the [GNU General Public License](LICENSE).\n\n---\n\n## Acknowledgments\n\n- Inspired by [`kubectx`](https://github.com/ahmetb/kubectx).\n- Built using the Go programming language and the [`cobra`](https://github.com/spf13/cobra) library.\n\n---\n\n## Support\n\nIf you encounter any issues or have questions, feel free to open an issue on GitHub or reach out to the maintainers.\n\nHappy Kubing! 🚀\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrone076%2Fkubex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrone076%2Fkubex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrone076%2Fkubex/lists"}