Skip to content

Commit 07d74b2

Browse files
author
Prasanna Santhanam
committed
adding restructured text for pypi visibility
1 parent eac8cfe commit 07d74b2

File tree

1 file changed

+137
-0
lines changed

1 file changed

+137
-0
lines changed

README.rst

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
WIP kube-shell
2+
==============
3+
4+
|Build Status| |PyPI version| |PyPI pyversions| |License| |Gitter chat|
5+
6+
Kube-shell: An integrated shell for working with the Kubernetes CLI
7+
8+
Under the hood kube-shell still calls kubectl. Kube-shell aims to
9+
provide ease-of-use of kubectl and increasing productivity.
10+
11+
kube-shell features
12+
-------------------
13+
14+
Auto Completion of Commands and Options with in-line documentation
15+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16+
17+
.. figure:: http://i.imgur.com/dfelkKr.gif
18+
:alt:
19+
20+
Fish-Style Auto Suggestions
21+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
22+
23+
.. figure:: http://i.imgur.com/7VciOuR.png
24+
:alt:
25+
26+
Command History
27+
^^^^^^^^^^^^^^^
28+
29+
You can use up-arrow and down-arrow to walk through the history of
30+
commands executed. Also up-arrow partial string matching is possible.
31+
For e.g. enter 'kubectl get' and use up-arrow and down-arrow to browse
32+
through all kubectl get commands. You could also use CTRL+r to search
33+
from the history of commands.
34+
35+
.. figure:: http://i.imgur.com/xsIM3QV.png
36+
:alt:
37+
38+
Fuzzy Searching
39+
^^^^^^^^^^^^^^^
40+
41+
.. figure:: http://i.imgur.com/tW9oAUO.png
42+
:alt:
43+
44+
Server Side Auto Completion
45+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
46+
47+
.. figure:: http://i.imgur.com/RAfHXjx.gif
48+
:alt:
49+
50+
Context information
51+
^^^^^^^^^^^^^^^^^^^
52+
53+
Details of current context from kubeconfig is always readily displayed
54+
on the bottom toolbar. By pressing F4 button you can switch between the
55+
clusters and using F5 can switch between namespaces.
56+
57+
.. figure:: http://i.imgur.com/MJLgcj3.png
58+
:alt:
59+
60+
vi editing mode
61+
^^^^^^^^^^^^^^^
62+
63+
Press ESC you have all key bindings (w: next word, b: prev word) to move
64+
across the words.
65+
66+
Installation
67+
------------
68+
69+
The kube-shell requires python and
70+
```pip`` <https://pypi.python.org/pypi/pip>`__ to install. You can
71+
install the kube-shell using ``pip``:
72+
73+
.. code:: bash
74+
75+
$ pip install kube-shell
76+
77+
Usage
78+
-----
79+
80+
After installing kube-shell through pip, just run kube-shell to bring up
81+
shell.
82+
83+
At the kube-shell command prompt you can run exit or press F10 to exit
84+
the shell. You can clear the screen by running clear command.
85+
86+
By default drop-down suggestion list also displays in-line
87+
documentation, you can turn on/off inline documnetation by pressing F4
88+
button.
89+
90+
You can run any shell command by prefixing command with "!". For e.g.
91+
!ls would list from the current directory.
92+
93+
Under the hood
94+
--------------
95+
96+
Other than generation of suggestions all heavy lifting is done by
97+
Python's `prompt
98+
toolkit <https://github.com/jonathanslenders/python-prompt-toolkit>`__,
99+
`Pygments <http://pygments.org>`__ libraries.
100+
101+
A GO `program <misc/python_eats_cobra.go>`__ is used to generate
102+
kubectl's commands, subcommands, arguments, global options and local
103+
options in `json <kubeshell/data/cli.json>`__ format. Kube-shell uses
104+
generated json file to suggest commands, subcommands, options and args.
105+
For server side completion kube-shell uses
106+
`client-python <https://github.com/kubernetes-incubator/client-python>`__
107+
libray to fetch the resources.
108+
109+
Status
110+
------
111+
112+
Kube-shell should be useful now. But given that its aim is to increase
113+
productivity and easy of use, it can be improved in a number of ways. If
114+
you have suggestions for improvements or new features, or run into a bug
115+
please open an issue
116+
`here <https://github.com/cloudnativelabs/kube-shell/issues>`__ or chat
117+
in the `Gitter <https://gitter.im/kube-shell/Lobby>`__.
118+
119+
Acknowledgement
120+
---------------
121+
122+
Kube-shell is inspired by `AWS
123+
Shell <https://github.com/awslabs/aws-shell>`__,
124+
`SAWS <https://github.com/donnemartin/saws>`__ and uses awesome Python
125+
`prompt
126+
toolkit <https://github.com/jonathanslenders/python-prompt-toolkit>`__
127+
128+
.. |Build Status| image:: https://travis-ci.org/cloudnativelabs/kube-shell.svg?branch=master
129+
:target: https://travis-ci.org/cloudnativelabs/kube-shell
130+
.. |PyPI version| image:: https://badge.fury.io/py/kube-shell.svg
131+
:target: https://badge.fury.io/py/kube-shell
132+
.. |PyPI pyversions| image:: https://img.shields.io/pypi/pyversions/ansicolortags.svg
133+
:target: https://pypi.python.org/pypi/kube-shell/
134+
.. |License| image:: http://img.shields.io/:license-apache-blue.svg
135+
:target: http://www.apache.org/licenses/LICENSE-2.0.html
136+
.. |Gitter chat| image:: http://badges.gitter.im/kube-shell/Lobby.svg
137+
:target: https://gitter.im/kube-shell/Lobby

0 commit comments

Comments
 (0)