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

Usage:
    wercker create
    wercker status
    wercker deploy
    wercker login
    wercker logout
    wercker apps link
    wercker apps create
    wercker apps checkrepo
    wercker apps build
    wercker builds list
    wercker builds deploy
    wercker targets list
    wercker targets add
    wercker --version

----

Details:
    create          - Adds an application to wercker
    login           - Logs the user in and stores the token on the
                      machine
    logout          - Removes the login token from the machine
    apps create     - Adds an application to wercker
    apps link       - link repository back up to an apps on wercker
    apps build      - trigger a new build for the current project.
    apps checkrepo  - validate if wercker has read rights on the repository
    targets add     - add a heroku targets as a deploy target
    targets list    - lists all deploy targets
    """

# todo:
#    wercker targets <name>

import docopt

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

from clint.textui import puts

import werckercli

puts(get_intro())
args = docopt.docopt(
    __doc__,
    version="version " + werckercli.__version__
)
handle_commands(args)
