GithubHelp home page GithubHelp logo

ptzagk / kube-shell Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudnativelabs/kube-shell

0.0 0.0 0.0 88 KB

Kubernetes shell: An integrated shell for working with the Kubernetes

License: Apache License 2.0

Python 93.19% Go 6.81%

kube-shell's Introduction

kube-shell

Build Status PyPI version PyPI pyversions License Gitter chat

Kube-shell: An integrated shell for working with the Kubernetes CLI

Under the hood kube-shell still calls kubectl. Kube-shell aims to provide ease-of-use of kubectl and increasing productivity.

kube-shell features

Auto Completion of Commands and Options with in-line documentation

Fish-Style Auto Suggestions

Command History

You can use up-arrow and down-arrow to walk through the history of commands executed. Also up-arrow partial string matching is possible. For e.g. enter 'kubectl get' and use up-arrow and down-arrow to browse through all kubectl get commands. You could also use CTRL+r to search from the history of commands.

Fuzzy Searching

Server Side Auto Completion

Context information

Details of current context from kubeconfig is always readily displayed on the bottom toolbar. By pressing F4 button you can switch between the clusters and using F5 can switch between namespaces.

vi editing mode

Press ESC you have all key bindings (w: next word, b: prev word) to move across the words.

Installation

The kube-shell requires python and pip to install. You can install the kube-shell using pip:

$ pip install kube-shell

Usage

After installing kube-shell through pip, just run kube-shell to bring up shell.

At the kube-shell command prompt you can run exit or press F10 to exit the shell. You can clear the screen by running clear command.

By default drop-down suggestion list also displays in-line documentation, you can turn on/off inline documnetation by pressing F4 button.

You can run any shell command by prefixing command with "!". For e.g. !ls would list from the current directory.

Under the hood

Other than generation of suggestions all heavy lifting is done by Python's prompt toolkit, Pygments libraries.

A GO program is used to generate kubectl's commands, subcommands, arguments, global options and local options in json format. Kube-shell uses generated json file to suggest commands, subcommands, options and args. For server side completion kube-shell uses client-python libray to fetch the resources.

Status

Kube-shell should be useful now. But given that its aim is to increase productivity and easy of use, it can be improved in a number of ways. If you have suggestions for improvements or new features, or run into a bug please open an issue here or chat in the Gitter.

Acknowledgement

Kube-shell is inspired by AWS Shell, SAWS and uses awesome Python prompt toolkit

kube-shell's People

Contributors

marcosamorim avatar murali-reddy avatar tao12345666333 avatar vogxn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.