All Projects → aeroxis → Sultan

aeroxis / Sultan

Licence: mit
Sultan: Command and Rule over your Shell

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects
bash
514 projects
python2
120 projects

Projects that are alternatives of or similar to Sultan

Zoxide
A smarter cd command. Supports all major shells.
Stars: ✭ 4,422 (+607.52%)
Mutual labels:  command-line-tool, cli, terminal, command-line, zsh
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (-44.8%)
Mutual labels:  command-line-tool, cli, terminal, command-line
Caporal.js
A full-featured framework for building command line applications (cli) with node.js
Stars: ✭ 3,279 (+424.64%)
Mutual labels:  cli, terminal, command-line, zsh
Tooling
Advancing Node.js as a framework for writing great tools
Stars: ✭ 98 (-84.32%)
Mutual labels:  command-line-tool, cli, terminal, command-line
Ed
A modern UNIX ed (line editor) clone written in Go
Stars: ✭ 44 (-92.96%)
Mutual labels:  command-line-tool, cli, terminal, command-line
Typin
Declarative framework for interactive CLI applications
Stars: ✭ 126 (-79.84%)
Mutual labels:  command-line-tool, cli, terminal, command-line
Cli
A command-line interface for Hetzner Cloud
Stars: ✭ 542 (-13.28%)
Mutual labels:  command-line-tool, cli, command-line
Fd
A simple, fast and user-friendly alternative to 'find'
Stars: ✭ 19,851 (+3076.16%)
Mutual labels:  cli, terminal, command-line
Dotbare
Manage dotfiles and any git directories interactively with fzf
Stars: ✭ 327 (-47.68%)
Mutual labels:  command-line-tool, bash-script, zsh
Sad
CLI search and replace | Space Age seD
Stars: ✭ 350 (-44%)
Mutual labels:  cli, terminal, command-line
Theme.sh
A script which lets you set your $terminal theme.
Stars: ✭ 290 (-53.6%)
Mutual labels:  command-line-tool, terminal, command-line
Cmd2
cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
Stars: ✭ 342 (-45.28%)
Mutual labels:  cli, terminal, command-line
Cw
The best way to tail AWS CloudWatch Logs from your terminal
Stars: ✭ 368 (-41.12%)
Mutual labels:  cli, terminal, zsh
Pastel
A command-line tool to generate, analyze, convert and manipulate colors
Stars: ✭ 3,742 (+498.72%)
Mutual labels:  cli, terminal, command-line
Nord Dircolors
An arctic, north-bluish clean and elegant dircolors theme.
Stars: ✭ 328 (-47.52%)
Mutual labels:  cli, terminal, zsh
Define
A command-line dictionary (thesaurus) app, with access to multiple sources, written in Go.
Stars: ✭ 298 (-52.32%)
Mutual labels:  command-line-tool, cli, command-line
Dstask
Single binary terminal-based TODO manager with git-based sync + markdown notes per task
Stars: ✭ 431 (-31.04%)
Mutual labels:  cli, terminal, zsh
Go Prompt
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
Stars: ✭ 4,255 (+580.8%)
Mutual labels:  cli, terminal, command-line
Node.cli Progress
⌛️ easy to use progress-bar for command-line/terminal applications
Stars: ✭ 466 (-25.44%)
Mutual labels:  command-line-tool, cli, command-line
Nve
Run any command on specific Node.js versions
Stars: ✭ 531 (-15.04%)
Mutual labels:  cli, terminal, command-line

.. image:: https://raw.githubusercontent.com/aeroxis/sultan/master/docs/img/sultan-logo.png :alt: sultan logo :align: right

Command and Rule over your Shell

.. image:: https://badge.fury.io/py/sultan.svg :alt: PyPI Version :target: https://badge.fury.io/py/sultan

.. image:: https://travis-ci.org/aeroxis/sultan.svg?branch=master :alt: Travis Build Status :target: https://travis-ci.org/aeroxis/sultan

.. image:: http://img.shields.io/:license-mit-blue.svg :alt: MIT License :target: http://doge.mit-license.org

.. image:: https://readthedocs.org/projects/sultan/badge/?version=latest :alt: Documentation Status :target: http://sultan.readthedocs.io/en/latest/?badge=latest

Sultan now supports Python 2.7+ and 3.0+


Note

Your input is welcome! Please provide your feedback by creating issues on Github <https://github.com/aeroxis/sultan/issues>_


Install

.. code:: bash

pip install --upgrade sultan


Documentation

.. image:: https://readthedocs.org/projects/sultan/badge/?version=latest :alt: Documentation Status :target: http://sultan.readthedocs.io/en/latest/?badge=latest

Documentation is available on ReadTheDocs: http://sultan.readthedocs.io/en/latest/


What is Sultan?

Sultan is a Python package for interfacing with command-line utilities, like yum, apt-get, or ls, in a Pythonic manner. It lets you run command-line utilities using simple function calls.

The simplest way to use Sultan is to just call it:

.. code:: python

from sultan.api import Sultan s = Sultan() s.sudo("yum install -y tree").run()

Runs:

.. code:: bash

sudo yum install -y tree;


The recommended way of using Sultan is to use it in Context Management mode. Here is how to use Sultan with Context Management:

.. code:: python

from sultan.api import Sultan

with Sultan.load(sudo=True) as s: s.yum("install -y tree").run()

Runs:

.. code:: bash

sudo su - root -c 'yum install -y tree;'


What if we want to install this command on a remote machine? You can easily achieve this using context management:

.. code:: python

from sultan.api import Sultan

with Sultan.load(sudo=True, hostname="myserver.com") as sultan: sultan.yum("install -y tree").run()

Runs:

.. code:: bash

ssh [email protected] 'sudo su - root -c 'yum install -y tree;''


If you enter a wrong command, Sultan will print out details you need to debug and find the problem quickly.

Here, the same command was run on a Mac:

.. code:: python

from sultan.api import Sultan

with Sultan.load(sudo=True, hostname="myserver.com") as sultan: sultan.yum("install -y tree").run()

Yields:

.. code:: bash

[sultan]: sudo su - root -c 'yum install -y tree;' Password: [sultan]: --{ STDERR }------------------------------------------------------------------------------------------------------- [sultan]: | -sh: yum: command not found [sultan]: -------------------------------------------------------------------------------------------------------------------


Want to get started? Simply install Sultan, and start writing your clean code::

pip install --upgrade sultan

If you have more questions, check the docs! http://sultan.readthedocs.io/en/latest/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].