#!/usr/bin/env python
"""

Usage:
    wercker create
    wercker status
    wercker deploy
    wercker builds
    wercker open targets
    wercker queue
    wercker apps
    wercker link
    wercker login
    wercker logout
    wercker targets add
    wercker targets list
    wercker targets details
    wercker --version
    wercker --help

Details:
    create          - Adds an application to wercker
    status          - shows the status of the most recent build
    deploy          - deploy a build to a deploy target
    login           - Logs the user in and stores the token on the
                      machine
    logout          - Removes the login token from the machine
    open targets    - opens a webpage showing a deploy target's details
    apps            - List apps the user has access to
    link            - link repository back up to an apps on wercker
    builds          - shows a list of the most recent builds
    targets add     - add a heroku targets as a deploy target
    targets list    - lists all deploy targets
    targets details - alias for open targets
"""

# todo:
#    wercker targets <name>
#    wercker jobs -> jobs page on beta.wercker.com

import docopt

from werckercli.cli import (
    # get_parser,
    handle_commands,
    get_intro
)

# from clint.textui import puts


import werckercli

print(get_intro())
args = docopt.docopt(
    __doc__,
    version="version " + werckercli.__version__,
    help=True
)

handle_commands(args)
