Giter Site home page Giter Site logo

yokawasa / azure-shell Goto Github PK

View Code? Open in Web Editor NEW
13.0 5.0 2.0 1.98 MB

[Unofficial] interactive Azure CLI 2.0 command line interface

License: Apache License 2.0

Python 99.55% Shell 0.45%
azure-cli azure azure-shell shell linux mac python cli cloud-management

azure-shell's Introduction

azure-shell

An interactive Azure CLI 2.0 command line interface.

[Note] Microsoft official Azure CLI 2.0 shell can be found at Azure/azure-cli-shell

Features

  • Auto-completion of Azure CLI group, subgroups, commands, and parameters
  • Syntax highlighting
  • Command history

Supported Environments

  • Python versions: 2.7, 3.3, 3.4, 3.5, 3.5, 3.6 and maybe more
  • OS: Mac, Ubuntu, CentOS, Bash-on-Windows, or any platform where azure-cli can be installed

Prerequisites

You need Azure CLI 2.0 installed as prerequisites for azure-shell. Please refer to Install Azure CLI 2.0 and install it if not yet installed

Installation

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

pip install azure-shell

If you've already have azure-shell installed and want to upgrade to the latest version, you can upgrade like this:

pip install --upgrade azure-shell

Usage

Once you've installed the azure-shell, you can run azure-shell by simply typing azure-shell:

azure-shell

You can exit the azure-shell by typing either exit or quit:

azure> exit

Basically you can run azure-shell without making any configurations but you can give options to azure-shell to change its default behabior:

azure-shell --help

Usage: azure-shell [-h] [--version] [--basedir BASEDIR] [--config CONFIG]
                   [--index INDEX]

An interactive Azure CLI command line interface

optional arguments:
  -h, --help         show this help message and exit
  --version          show program's version number and exit
  --basedir BASEDIR  Azure Shell base dir path ($HOME/.azureshell by default)
  --config CONFIG    Azure Shell config file path
                     ($HOME/.azureshell/azureshell.conf by default)
  --index INDEX      Azure Shell index file to load ($HOME/.azureshel/cli-
                     index-<azure_cli_version>.json)

Azure Shell Index Generator

You can generate an index for azure-shell using azure-shell-index-generator command. Please be noted that it will take time before all data generation works are done

azure-shell-index-generator --output ~/.azureshell/cli-index.json

Basically you don't need to generate the index by yourself as azure-shell automatically downloads an index from its repository and load it for commands and parameters completion in startup time. But you also can give azure-shell your index using --index option.

azure-shell --index ~/.azureshell/cli-index.json

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yokawasa/azure-shell

More Information

azure-shell's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

azure-shell's Issues

after installing Azure-shell i get urllib2 error on MacOS

After installing azure-shell ( which didnt give any issues)

i get the following error:

File "/Library/Frameworks/Python.framework/Versions/3.5/bin/azure-shell", line 7, in
from azureshell import main
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/azureshell/init.py", line 11, in
from .index import AzureShellIndex, AzureShellIndexException
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/azureshell/index.py", line 6, in
import urllib2
ImportError: No module named 'urllib2'

as far as i can tell i use python 3.5

any suggestions where to look for ?

index_generator.py failed due to azure-cli's incompatible issue

index_generator.py failed due to azure-cli's incompatible issue.
index_generator.py has used get_command_table() that had been included azure.cli.core.application.APPLICATION, however get_command_table() has moved to azure.cli.core.application.Configuration since azure-cli-2.0.3.

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.