SDisPater/cleo — pull request #8 by SDisPater (2014-03-08 22:31:04+00:00)
Title: Adds dict command registration.

Closes #2

Commands can now be registered by dictionaries.

```python
from cleo import Application

def say_hello(input_, output_):
name = input_.get_argument('name')
uppercase = input_.get_option('uppercase')

if uppercase:
name = name.upper()

output_.writeln('Hello %s' % name)

hello_command = {
'hello': {
'description': 'The hello command',
'arguments': [{
'name': {
'description': 'The name',
'required': True
}
}],
'options': [{
'uppercase': {
'shortcut': 'u',
'description': 'Uppercase the name',
'value_required': None
}
}]
}
}

application = Application()
application.add(hello_command)
```