Git Product home page Git Product logo

aws-shell's Issues

Reference other services' resources from server side completions

This is a feature request.

Usecase

elb attach-load-balancer-to-subnets API accepts

  • load-balancer-name(elb describe-loadbalancers)
  • subnet(ec2 describe-subnets)

and you want to autocomplete both parameters.

Problem

At completions-1.json, operation assumes you call API of the same service, and subnet retrieval API belongs to a different service(ec2), you cannot define subnet resource outside of ec2.

  "resources": {
    "Subnet": {
      "operation": "EC2:DescribeSubnets", <-- DOES NOT WORK 
      "resourceIdentifier": {
        "Id": "Subnets[].SubnetId"
      }
    }

Windows doc gens show ^M chars

When generating docs on windows, newlines are rendered as '^M'. Need to track down where this \r\n behavior is being introduced.

Add progress status for long running commands

This request seems to be quite popular (measured by Reddit upvotes).

himynameisjoeyc

Hopefully they include some progress bars, time remaining and current operation info( also prays for indexes) on s3 api...

Reddit Source #1

himynameisjoeyc

Does this by chance include an S3 sync progress metric?

Reddit Source #2

Also relates to: #30

This might be more of an 'epic' that we eventually break out into smaller chunks.

ImportError: cannot import name 'loaders' on startup

@jamesls I don't see the loaders module included in f709ba0, seems to be causing this issue:

$ aws-shell
Traceback (most recent call last):
  File "/Users/donnemartin/.virtualenvs/aws-shell3/bin/aws-shell", line 9, in <module>
    load_entry_point('aws-shell==0.0.1', 'console_scripts', 'aws-shell')()
  File "/Users/donnemartin/.virtualenvs/aws-shell3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/donnemartin/.virtualenvs/aws-shell3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/Users/donnemartin/.virtualenvs/aws-shell3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/Users/donnemartin/.virtualenvs/aws-shell3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/__init__.py", line 12, in <module>
    from awsshell import loaders
ImportError: cannot import name 'loaders'

Add lexer/syntax highlighting to visually distinguish the different components of a command

A lexer would make it easier to visually distinguish the different components of a command:

 aws [options] <command> <subcommand> [parameters]

Config File

Default theme: vim

# visual theme. possible values: manni, igor, xcode, vim,
# autumn,vs, rrt, native, perldoc, borland, tango, emacs,
# friendly, monokai, paraiso-dark, colorful, murphy, bw,
# pastie, paraiso-light, trac, default, fruity.
# to disable themes, set theme = none
theme = vim

Disable Syntax Highlighting

 theme = none

Sample: Dark Background

 theme = vim

Imgur

Samples: Light Background

 theme = vim

Note: My terminal colors are customized which might be why we see light gray for aws>.

Imgur

 theme = xcode

Imgur

Remove the AWSCLIModelCompleter attribute from AWSShell.

Original discussion: https://github.com/awslabs/aws-shell/pull/45/files#diff-d0a45db8e5ed54b02374996d81926a8cR65

The model completer is also available via the .completer property on shellcomplete.AWSShellCompleter. I think I still have some refactoring to do to get all the various autocompleters more coherent.

My line of thinking was that the ShellCompleter is the only thing the app needs to interact with for anything completion related, and the ShellCompleter can proxy to the model completer and server side completer as needed. I don't think I have the abstractions 100% right yet, but ideally I'd like to be able to just say completer.match_fuzzy and then internally, the ShellCompleter can set the match_fuzzy attribute on the model completer.

We don't have to do this now, but I think it would simplify things by not requiring the AWSShell class to take in an additional param in its init.

Python 3 startup issues

I'll be plugging the holes as they pop up, here are the first three I've encountered:

$ aws-shell
First run, creating autocomplete index...
Traceback (most recent call last):
  File "/Users/donnemartin/.virtualenvs/aws-shell3/bin/aws-shell", line 9, in <module>
    load_entry_point('aws-shell==0.0.1', 'console_scripts', 'aws-shell')()
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/__init__.py", line 47, in main
    from awsshell.makeindex import write_index
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/makeindex.py", line 17
    print "Couldn't import awscli: pip install awscli"
                                                     ^
SyntaxError: Missing parentheses in call to 'print'
$ aws-shell
First run, creating autocomplete index...
Traceback (most recent call last):
  File "/Users/donnemartin/.virtualenvs/aws-shell3/bin/aws-shell", line 9, in <module>
    load_entry_point('aws-shell==0.0.1', 'console_scripts', 'aws-shell')()
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/__init__.py", line 47, in main
    from awsshell.makeindex import write_index
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/makeindex.py", line 8, in <module>
    from cStringIO import StringIO
ImportError: No module named 'cStringIO'
$ aws-shell
First run, creating autocomplete index...
Traceback (most recent call last):
  File "/Users/donnemartin/.virtualenvs/aws-shell3/bin/aws-shell", line 9, in <module>
    load_entry_point('aws-shell==0.0.1', 'console_scripts', 'aws-shell')()
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/__init__.py", line 48, in main
    write_index(index_file)
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/makeindex.py", line 72, in write_index
    index_command(current, help_command)
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/makeindex.py", line 47, in index_command
    metadata['minidoc'] = remove_html(arg_obj.documentation.split('\n')[0])
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/utils.py", line 7, in remove_html
    s.feed(html)
  File "/Users/donnemartin/.pyenv/versions/3.4.3/lib/python3.4/html/parser.py", line 165, in feed
    self.goahead(0)
  File "/Users/donnemartin/.pyenv/versions/3.4.3/lib/python3.4/html/parser.py", line 198, in goahead
    if self.convert_charrefs and not self.cdata_elem:
AttributeError: 'DataOnly' object has no attribute 'convert_charrefs'

COC?

Hi,

I'm just wondering what your code of conduct is for this project?

Thanks,
Alison

Add support for autocompleting/manipulating --query argument

Not sure exactly what this would look like, but I want to:

a) Attempt to autocomplete the JMESPath expression for --query. This seems tough.
b) Live update in a vsplit/hsplit pane the result of applying the query expression provided so far against sample generated output.

I demo'd a POC of this with vim + jpterm at re:Invent, would like to have a similar feature as well.

Support profile switching

I'd like a built in command that allows me to switch profiles. By switching to a different profile, server side autocomplete should be updated to work with the new profile.

Add option to show help pane on the right side

e1ven

It provides help, but since it's the bottom half of the window, it's often scrolling off the screen, and can't be easily read. Perhaps putting on the right 50% of the screen would help? For instance, try ec2 describe-instances --filters .. Most of the filter syntax isn't displayed.

Reddit Source

How do I navigate the documentation panel?

When I type ec2 run-instances, I get the documentation panel on the bottom of the screen, as pictured here:
documentation-panel

How do I scroll/page up/down in the documentation panel? Default Emacs binding for scroll-other-window (C-M-v) and scroll-other-window-down (C-M-S-v) are not working for me.

Installation Issue (Mac)

Forgive me if this is overly specific to my system, but I'm hoping for help with why installation is failing.

System info:

~/Desktop$ python --version
Python 2.7.10

~/Desktop$ pip --version   
pip 7.1.2 from /Library/Python/2.7/site-packages (python 2.7)

~$ xcodebuild -version 
Xcode 7.1.1
Build version 7B1005

~/Desktop$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: OS X 10.11.2 (15C50)
      Kernel Version: Darwin 15.2.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: Elizabeth
      User Name: Ross Dakin (rossdakin)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 20:12

Error (without sudo):

~/Desktop$ pip install aws-shell     
Collecting aws-shell
Collecting prompt-toolkit==0.52 (from aws-shell)
  Using cached prompt_toolkit-0.52-py2-none-any.whl
Collecting configobj>=5.0.6 (from aws-shell)
Collecting boto3>=1.2.1 (from aws-shell)
  Using cached boto3-1.2.2-py2.py3-none-any.whl
Collecting awscli<2.0.0,>=1.8.9 (from aws-shell)
  Using cached awscli-1.9.13-py2.py3-none-any.whl
Collecting six>=1.9.0 (from prompt-toolkit==0.52->aws-shell)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting pygments (from prompt-toolkit==0.52->aws-shell)
  Using cached Pygments-2.0.2-py2-none-any.whl
Collecting wcwidth (from prompt-toolkit==0.52->aws-shell)
  Using cached wcwidth-0.1.5-py2.py3-none-any.whl
Collecting jmespath<1.0.0,>=0.7.1 (from boto3>=1.2.1->aws-shell)
  Using cached jmespath-0.9.0-py2.py3-none-any.whl
Collecting futures==2.2.0 (from boto3>=1.2.1->aws-shell)
  Using cached futures-2.2.0-py2.py3-none-any.whl
Collecting botocore<1.4.0,>=1.3.0 (from boto3>=1.2.1->aws-shell)
  Using cached botocore-1.3.13-py2.py3-none-any.whl
Collecting rsa<=3.3.0,>=3.1.2 (from awscli<2.0.0,>=1.8.9->aws-shell)
  Using cached rsa-3.2.3-py2.py3-none-any.whl
Collecting colorama<=0.3.3,>=0.2.5 (from awscli<2.0.0,>=1.8.9->aws-shell)
Collecting docutils>=0.10 (from awscli<2.0.0,>=1.8.9->aws-shell)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.4.0,>=1.3.0->boto3>=1.2.1->aws-shell)
  Using cached python_dateutil-2.4.2-py2.py3-none-any.whl
Collecting pyasn1>=0.1.3 (from rsa<=3.3.0,>=3.1.2->awscli<2.0.0,>=1.8.9->aws-shell)
  Using cached pyasn1-0.1.9-py2.py3-none-any.whl
Installing collected packages: six, pygments, wcwidth, prompt-toolkit, configobj, jmespath, futures, python-dateutil, docutils, botocore, boto3, pyasn1, rsa, colorama, awscli, aws-shell
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 640, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 716, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 125, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 315, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/ff/c957cg417pzf3lszspjvm_880000gp/T/pip-7hp43W-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

Error (with sudo):

~/Desktop$ sudo pip install aws-shell
The directory '/Users/rossdakin/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/rossdakin/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting aws-shell
Collecting prompt-toolkit==0.52 (from aws-shell)
  Downloading prompt_toolkit-0.52-py2-none-any.whl (188kB)
    100% |████████████████████████████████| 188kB 828kB/s 
Collecting configobj>=5.0.6 (from aws-shell)
Collecting boto3>=1.2.1 (from aws-shell)
  Downloading boto3-1.2.2-py2.py3-none-any.whl (106kB)
    100% |████████████████████████████████| 106kB 1.0MB/s 
Collecting awscli<2.0.0,>=1.8.9 (from aws-shell)
  Downloading awscli-1.9.13-py2.py3-none-any.whl (848kB)
    100% |████████████████████████████████| 851kB 591kB/s 
Collecting six>=1.9.0 (from prompt-toolkit==0.52->aws-shell)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(54, 'Connection reset by peer'))': /packages/py2.py3/s/six/six-1.10.0-py2.py3-none-any.whl
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting pygments (from prompt-toolkit==0.52->aws-shell)
  Downloading Pygments-2.0.2-py2-none-any.whl (672kB)
    100% |████████████████████████████████| 675kB 713kB/s 
Collecting wcwidth (from prompt-toolkit==0.52->aws-shell)
  Downloading wcwidth-0.1.5-py2.py3-none-any.whl
Collecting jmespath<1.0.0,>=0.7.1 (from boto3>=1.2.1->aws-shell)
  Downloading jmespath-0.9.0-py2.py3-none-any.whl
Collecting futures==2.2.0 (from boto3>=1.2.1->aws-shell)
  Downloading futures-2.2.0-py2.py3-none-any.whl
Collecting botocore<1.4.0,>=1.3.0 (from boto3>=1.2.1->aws-shell)
  Downloading botocore-1.3.13-py2.py3-none-any.whl (2.1MB)
    100% |████████████████████████████████| 2.1MB 241kB/s 
Collecting rsa<=3.3.0,>=3.1.2 (from awscli<2.0.0,>=1.8.9->aws-shell)
  Downloading rsa-3.2.3-py2.py3-none-any.whl (44kB)
    100% |████████████████████████████████| 45kB 4.0MB/s 
Collecting colorama<=0.3.3,>=0.2.5 (from awscli<2.0.0,>=1.8.9->aws-shell)
Collecting docutils>=0.10 (from awscli<2.0.0,>=1.8.9->aws-shell)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.4.0,>=1.3.0->boto3>=1.2.1->aws-shell)
  Downloading python_dateutil-2.4.2-py2.py3-none-any.whl (188kB)
    100% |████████████████████████████████| 192kB 2.1MB/s 
Collecting pyasn1>=0.1.3 (from rsa<=3.3.0,>=3.1.2->awscli<2.0.0,>=1.8.9->aws-shell)
  Downloading pyasn1-0.1.9-py2.py3-none-any.whl
Installing collected packages: six, pygments, wcwidth, prompt-toolkit, configobj, jmespath, futures, python-dateutil, docutils, botocore, boto3, pyasn1, rsa, colorama, awscli, aws-shell
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 640, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 716, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 125, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 315, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-r9lpB9-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

Add toolbar menu to easily toggle between options

Toolbar Options

  • F2 toggles fuzzy completions
  • F3 toggles Vi and Emacs key bindings
  • F4 toggles single and multiple columns in the autocompletion menu
  • F5 toggles the help pane
  • F10 exits aws-shell

Fuzzy Toggle

Some users might want to turn off fuzzy matching. I sometimes toggle this depending on what I'm doing.

On a related note, I think the current fuzzy matching works pretty well, although in some cases it actually results in more keystrokes (#5). For example:

 aws> ec2 describe-inst

Fuzzy On

Imgur

Fuzzy Off

Imgur

Vi/Emacs Key Bindings

Currently aws-shell runs with Vibindings, which might not suit everyone. For SAWS and aws-shell personally I'm starting to use the Emacs mode more it feels more natural to me thinking of these apps as a command line tool rather than an editor.

TODO: With Vi bindings we might want to add info to let the user know what mode is active.

Imgur

Imgur

Single vs Multi Column Completion Menus

Some users might prefer the current multi column and others might prefer the single column. I prefer the latter it seems 'less busy' and more like what I'm accustomed to with other apps, although it could take some scrolling unlike the multi column option where you see pretty much everything.

prompt-toolkit also handles the meta info differently single vs multi. For single you see more meta right away, for multi, you only see meta for the currently highlighted completion. I've also applied pygments styles to the menu and meta, although the multi meta style doesn't seem to be taking hold.

Single Column

Imgur

Multi Column

Imgur

Single Column Meta

Imgur

Multi Column Meta

Imgur

Help Toggle

The help pane is really cool, although it does take up a lot of space. Users might not always want to see this menu--for example they might only want to see this for unfamiliar commands. Users might want to reclaim that screen real estate.

Menu On

Imgur

Menu Off

Imgur

Exit

To exit, Ctrl-D might not be obvious to some users.

Imgur

TODO

These options should probably go to a config file to save their state between sessions.

We could also make the toolbar content configurable if the number of options starts growing large.

.Edit Not Working on Windows

I run the following:

aws-shell
ec2 describe-instances --profile myprofile
dynamodb list-tables --profile myprofile
.edit

The data returns, but Notepad opens with an error:


Notepad

The process cannot access the file because it is being used by another process.


OK

Press OK leaves Notepad empty.

aws-cli/1.9.9 Python/2.7.10 Windows/8 botocore/1.3.9

Traceback encountered when running unknown dot command

$ aws-shell
aws> .foo
Traceback (most recent call last):
  File "aws-shell/bin/aws-shell", line 9, in <module>
    load_entry_point('aws-shell==0.0.1', 'console_scripts', 'aws-shell')()
  File "aws-shell/awsshell/__init__.py", line 66, in main
    shell.run()
  File "aws-shell/awsshell/app.py", line 63, in run
    f.write(all_commands)
UnboundLocalError: local variable 'all_commands' referenced before assignment

ImportError: No module named 'tests' running unit tests

====================================================================================== ERRORS =======================================================================================
_____________________________________________________________________ ERROR collecting tests/unit/test_utils.py _____________________________________________________________________
tests/unit/test_utils.py:1: in <module>
    from tests import unittest
E   ImportError: No module named 'tests'
_______________________________________________________________ ERROR collecting tests/unit/index/test_completions.py _______________________________________________________________
tests/unit/index/test_completions.py:1: in <module>
    from tests import unittest
E   ImportError: No module named 'tests'

Fix fuzzy search algorithm

Example:

0.746429 dcli                 describe-reserved-instances-listings
0.298566 dcli                 describe-classic-link-instances

describe-classic-link-instances should be higher.

Recursion limit hit if autocompletion sees say string twice

If the autocompleter sees the same string twice, it will trigger an infinite recursion loop. This can be seen sometimes by quickly typing/backspacing characters.

Even simpler repo is if you hit tab with no chars. This will try to autocomplete twice with an empty string which triggers the bug.

Ensure default editors per platform

Once EDITOR env var support is added, there needs to be reasonable defaults per platform. On posix we can default to vim, on windows we should default to notepad.

aws-shell does not work with prompt_toolkit==0.54.0

I get:

First run, creating autocomplete index...
Creating doc index in the background. It will be a few minutes before all documentation is available.
Traceback (most recent call last):
  File "/usr/local/bin/aws-shell", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/awsshell/__init__.py", line 63, in main
    shell.run()
  File "/usr/local/lib/python2.7/site-packages/awsshell/app.py", line 200, in run
    document = self.cli.run()
  File "/usr/local/lib/python2.7/site-packages/awsshell/app.py", line 193, in cli
    self._cli = self.create_cli_interface(self.show_completion_columns)
  File "/usr/local/lib/python2.7/site-packages/awsshell/app.py", line 367, in create_cli_interface
    display_completions_in_columns)
  File "/usr/local/lib/python2.7/site-packages/awsshell/app.py", line 335, in create_application
    key_bindings_registry=self.key_manager.manager.registry,
  File "/usr/local/lib/python2.7/site-packages/prompt_toolkit/application.py", line 112, in __init__
    assert style is None or isinstance(style, Style)
AssertionError

On OS X 10.11.2; Homebrew Python 2.7.11

Notify user the doc index has completed

When the doc index build was blocking it was obvious when it was complete.

Now that it's in the background (much improved) you're not really sure when the full docs are available.

The toolbar might be a good place to show some info.

Maintain history between sessions

I think losing my command history after closing a session is inconvenient. It's handy to be able to use the up arrow to cycle through previous commands.

With the new auto suggestions, this becomes more prevalent. For suggestions to be more effective I think we'd need to use a FileHistory instead of an InMemoryHistory which is persisted between sessions. Another option is to hook up to something more general like .bash_history.

We might need special handling for the .edit command if we switch to FileHistory as that could load a ton of history--maybe on aws-shell startup we can tag where we are in the history and only load from that checkpoint.

Support yum install, for non-Amazon Linux boxes

Although the feature request below names awscli, this might also appy to aws-shell.

tuxracer04

Trying to get AWS CLI to work on CentOS 5/6 non-AWS boxes took me a couple days (since I wasn't familiar all with the dependencies
(pip and python, issues with Centos5) (not a sysadmin either, or a python guy)
Feature request: yum install awscli, for non-Amazon Linux boxes por vavor..

Reddit Source

Add auto suggest completions (fish-style) to more easily execute popular/recent commands

Suggest

Imgur

Complete Suggestion

You can use the right arrow key to complete a suggestion.

Imgur

TODO

This could also be a toolbar option.

For suggestions to be more effective I think we'd need to use a FileHistory instead of an InMemoryHistory which is persisted between sessions. Another option is to hook up to something more general like .bash_history.

We might need special handling for the .edit command if we switch to FileHistory as that could load a ton of history--maybe on aws-shell startup we can tag where we are in the history and only load from that checkpoint.

S3 server side completions don't seem to be working

e1ven

It says it autocompletes s3 buckets, but it only seemed to using the history, not using a list of accessible buckets. I used s3 ls, and then s3 ls [bucketnames], and s3 ls s3://[bucketnames] and it wasn't autocompleting any of them.

interpeix

I have the same issue, not bucket completion.

Reddit Source

Add aws-shell to awesome-aws

Awesome AWS Awesome

A curated list of awesome AWS libraries, open source repos, guides, blogs, and other resources.

The Fiery Meter of AWSome

  • Repo with 0100+ Stars: 🔥
  • Repo with 0200+ Stars: 🔥🔥
  • Repo with 0500+ Stars: 🔥🔥🔥
  • Repo with 1000+ Stars: 🔥🔥🔥🔥
  • Repo with 2000+ Stars: 🔥🔥🔥🔥🔥

Not requiring `aws` prefix seems to be causing confusion

Although it seems like e1ven is reporting broken commands, I think the following report actually shows some confusion with not having to prefix commands with aws. Muscle memory could be an issue for veteran users. Also, I'd suspect you won't always have aws-shell up (maybe you're ssh'd into multiple EC2 machines doing various things which might/might not include aws-cli-backed-commands). The command syntax difference between aws-cli and aws-shell could lead to confusion in these cases.

e1ven

Several commands don't seem to return what I'd expect. With the command line, "aws s3api list-buckets" gives me a list of buckets.. With the aws-shell, this gives me "aws: error: argument command: Invalid choice, valid choices are"..

Reddit Source

Note: s3api list-buckets works for me.

Refactor creation of the ~/.aws/shell/ directory

We might want to consolidate the places where we create the ~/.aws/shell/ directory (and sub directories). I count four separate locations now in the codebase (including this new call) where we are calling os.makedirs.

As initially discussed in #62.

When we do consolidate it seems cleaner to go with the try/catch approach vs the check/create approach. Here's a good StackOverflow post with details.

Setup.py seems to be missing boto3

$ aws-shell
Traceback (most recent call last):
  File "/Users/donnemartin/.virtualenvs/aws-shell2/bin/aws-shell", line 9, in <module>
    load_entry_point('aws-shell==0.0.1', 'console_scripts', 'aws-shell')()
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/__init__.py", line 66, in main
    autocomplete.AWSCLIModelCompleter(index_data))
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/shellcomplete.py", line 31, in __init__
    server_side_completer = self._create_server_side_completer()
  File "/Users/donnemartin/Dev/github/forks/aws-shell/awsshell/shellcomplete.py", line 35, in _create_server_side_completer
    import boto3.session
ImportError: No module named boto3.session

Fix with:

requires = [
    'awscli>=1.8.9,<2.0.0',
    'prompt-toolkit==0.50',
    'boto3>=1.2.1',  # added
]

Add regions to the auto-complete

Would like to suggest adding the actual regions to the --region auto-complete (e.g. show us-east... and so on).

It would also be great to support the --region (and other options) in other places except after the service (e.g. also at the end).

Integrate SAWS

Here's a first cut at integrating SAWS into aws-shell.

  • Styled autocompletion menus
  • Bottom toolbar options
    • Placeholder options for now, curious what others think might be good options
  • New fish-style completions

Imgur

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.