Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudnativelabs/kube-shell
Kubernetes shell: An integrated shell for working with the Kubernetes
https://github.com/cloudnativelabs/kube-shell
autocomplete kube-shell kubectl kubernetes python
Last synced: 1 day ago
JSON representation
Kubernetes shell: An integrated shell for working with the Kubernetes
- Host: GitHub
- URL: https://github.com/cloudnativelabs/kube-shell
- Owner: cloudnativelabs
- License: apache-2.0
- Created: 2017-06-15T05:30:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-02T12:34:48.000Z (about 2 years ago)
- Last Synced: 2024-10-29T15:29:05.984Z (2 months ago)
- Topics: autocomplete, kube-shell, kubectl, kubernetes, python
- Language: Python
- Homepage:
- Size: 85.9 KB
- Stars: 2,381
- Watchers: 45
- Forks: 172
- Open Issues: 68
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-python-resources - GitHub - 82% open · ⏱️ 19.09.2018): (命令行工具)
- awesome-repositories - cloudnativelabs/kube-shell - Kubernetes shell: An integrated shell for working with the Kubernetes (Python)
- awesome-k8s-resources - kube-shell - Kube-shell: An integrated shell for working with the Kubernetes CLI. (Tools and Libraries / Command Line Tools)
- k8s_awesome_document - Kube-shell - --Kube-shell在使用kubectl时提高了生产力。Kube-shell支持命令自动完成和自动建议。此外,Kube-shell将提供关于已执行命令的内联文档。Kube-shell甚至可以搜索和纠正错误输入的命令。它是在k8控制台中提高性能和生产率的一个很好的工具。 (🏗相关开源项目 / 有用的CLI工具)
README
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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^.. figure:: http://i.imgur.com/dfelkKr.gif
:alt:Fish-Style Auto Suggestions
^^^^^^^^^^^^^^^^^^^^^^^^^^^.. figure:: http://i.imgur.com/7VciOuR.png
:alt: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... figure:: http://i.imgur.com/xsIM3QV.png
:alt:Fuzzy Searching
^^^^^^^^^^^^^^^.. figure:: http://i.imgur.com/tW9oAUO.png
:alt:Server Side Auto Completion
^^^^^^^^^^^^^^^^^^^^^^^^^^^.. figure:: http://i.imgur.com/RAfHXjx.gif
:alt: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... figure:: http://i.imgur.com/MJLgcj3.png
:alt: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``:.. code:: bash
$ 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 `__.. |Build Status| image:: https://travis-ci.org/cloudnativelabs/kube-shell.svg?branch=master
:target: https://travis-ci.org/cloudnativelabs/kube-shell
.. |PyPI version| image:: https://badge.fury.io/py/kube-shell.svg
:target: https://badge.fury.io/py/kube-shell
.. |PyPI pyversions| image:: https://img.shields.io/pypi/pyversions/ansicolortags.svg
:target: https://pypi.python.org/pypi/kube-shell/
.. |License| image:: http://img.shields.io/:license-apache-blue.svg
:target: http://www.apache.org/licenses/LICENSE-2.0.html
.. |Gitter chat| image:: http://badges.gitter.im/kube-shell/Lobby.svg
:target: https://gitter.im/kube-shell/Lobby