Simple, fully programmable, shell-based network automation utility
Project description
Autoshell
A simple, fully programmable, shell-based network automation utility
VERSION
The version of Autoshell documented here is: v0.0.1
TABLE OF CONTENTS
WHAT IS AUTOSHELL
Autoshell is a Command-Line Utility and Python Library built to make quick automation tasks of a network easy.
Autoshell is a "shell" application in that it handles a part of the automation process, mainly parsing user arguments and connecting to hosts. It then depends on bundled and/or user-written modules to perform desired tasks on the connected hosts. Since Autoshell does the heavy lifting (connecting to devices, importing modules, sorting through credentials, providing module libraries, etc) it allows the modules to be very short and simple while making their effects quite powerful.
REQUIREMENTS
Interpreter: Python 2.7+ or 3.4+
INSTALLATION
Prepare OS
Windows
- If you have not yet installed Python on your Windows OS, then download and install the latest Python2 or Python3 from Python Downloads Page
- Make sure to check the box during installation which adds Python to PATH. Labeled something like
Add Python 3.7 to PATH
- Make sure to check the box during installation which adds Python to PATH. Labeled something like
- Once Python is installed, you should be able to open a command window, type
python
, hit ENTER, and see a Python prompt opened. Typequit()
to exit it. You should also be able to run the commandpip
and see its options. If both of these work, then move on to install Autoshell.- If this does not work, you will need to add the Python installation directory path to the Windows PATH variable
- The easiest way to do this is to find the new shortcut for Python in your start menu, right-click on the shortcut, and find the folder path for the
python.exe
file- For Python2, this will likely be something like
C:\Python27
- For Python3, this will likely be something like
C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python37
- For Python2, this will likely be something like
- Open your Advanced System Settings window, navigate to the "Advanced" tab, and click the "Environment Variables" button
- Create a new system variable:
- Variable name:
PYTHON_HOME
- Variable value: <your_python_installation_directory>
- Variable name:
- Now modify the PATH system variable by appending the text
;%PYTHON_HOME%\;%PYTHON_HOME%;%PYTHON_HOME%\Scripts\
to the end of it. - Close out your windows, open a command window and make sure you can run the commands
python
andpip
- The easiest way to do this is to find the new shortcut for Python in your start menu, right-click on the shortcut, and find the folder path for the
- If this does not work, you will need to add the Python installation directory path to the Windows PATH variable
MacOS
- MacOS often comes with a native version of Python, but we likely want to upgrade that. The best way to do this is with a MacOS Linux-like package manager called Homebrew. You can visit the below pages to walk you through installing Homebrew and an updated Python interpreter along with it
- Once Python is installed, you should be able to open Terminal, type
python
, hit ENTER, and see a Python prompt opened. Typequit()
to exit it. You should also be able to run the commandpip
and see its options. If both of these work, then move on to install Autoshell.
Linux
- Install required OS packages
- Raspberry Pi may need Python and PIP
sudo apt install -y python-pip
as well assudo apt-get install libffi-dev
- Ubuntu distributions may need Python and PIP
sudo apt install -y python-pip
- RHEL distributions usually don't need any non-native packages
- Raspberry Pi may need Python and PIP
Install Autoshell using PIP (Recommended)
- Install Autoshell using pip by running the command
pip install autoshell
- Once the install completes, you should be able to run the command
autoshell -h
and see the help menu. Autoshell is now ready to use.
Install Autoshell from source (Advanced)
- Retrieve the source code repository using one of the two below methods
- Install a Git client (process differs depending on OS) and clone the Autoshell repository using Git
git clone https://github.com/packetsar/autoshell.git
- Change to the branch you want to install using
git checkout <branch_name>
- Change to the branch you want to install using
- Download and extract the repository files from the Github Repo
- Make sure to download the branch you want to install
- Install a Git client (process differs depending on OS) and clone the Autoshell repository using Git
- Move into the autoshell project directory
cd autoshell
- Run the setup.py file to build the package into the ./build/ directory
python setup.py build
- Use PIP to install the package
pip install .
- Once the install completes, you should be able to run the command
autoshell -h
and see the help menu. Autoshell is now ready to use.
GETTING STARTED
Once you have installed Autoshell, you can see the command guide with autoshell -h
.
Since modules are able to add their own arguments into the argument parser when they are imported, you can see a module's help by importing it. You can see this by trying autoshell -m crawl -h
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for autoshell-0.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 005cc57a566df67467f823e57003c91c00be929cb08f47410f911a0b0b5ab2d1 |
|
MD5 | c635dc48b276ee2d41de6b7710b3c3f9 |
|
BLAKE2b-256 | 1ffd8f0973417fe8fac2c5bdfd570f213cb9a56ad22e298e05cb3653f12a54c5 |
Hashes for autoshell-0.0.12-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e5aa15f1f7a24f4fa8b1f2cc4d00183e7dc1aa73c3d470c6597ee3aab882e02 |
|
MD5 | 3b3b6389ae7ad82721f8858742d8fe4a |
|
BLAKE2b-256 | b12a7a3fedc582c94c134f34958e19f9e373ade3ee7cb4d05497ed13866f780c |