Complete documentation is available at zazu.readthedocs.io.
Zazu is a CLI development workflow management tool that works with git, github, and JIRA.
- Branch creation from new or existing tickets.
- Issue creation to associate branch with issue.
- Code review creation to associate review with issue.
- Code style enforcement/fix on commit (via git hook).
- Inserts branch name into every commit (via git hook).
- Open code review and issue webpages from terminal.
- Configurable git-flow branching model.
- Rich tab-completion on Linux and OS X.
Zazu is implemented in Python 3 and is a Click based CLI. If you're wondering why Click, this is a well answered question.
apt-get install python-dev python-pip libssl-dev libffi-dev
pip install zazu
Zazu is fastest when installed in wheel form.
git clone [email protected]:stopthatcow/zazu.git cd zazu pip install --upgrade pip setuptools wheel python setup.py bdist_wheel pip install dist/*.whl
Setup your user config file (located in ~/zazuconfig.yaml).
zazu config --add scmHost.default.type github zazu config --add scmHost.default.user <github username>
The following diagram shows the available subcommands of zazu.
zazu repo clone <name>
clones repo and installs GIT hookszazu repo init
installs default GIT hooks to an existing repo
zazu dev start
interactivly creates new ticketzazu dev start <name>
e.g.zazu dev start LC-440_a_cool_feature
zazu dev status
displays ticket and pull request statuszazu dev ticket
launches web browser to the ticket pagezazu dev review
launches web browser to create/view a pull request
zazu style
fixes code style using astyle and autopep8
The .zazuconfig.yaml is a file that lives in your home directory and sets high level configuration options for zazu. Most people will likely have a single default scmHost entry, though zazu supports multiple named entries.
# User configuration file for zazu. # SCM hosts are cloud hosting services for repos. Currently GitHub is supported. scmHost: default: # This is the default SCM host. type: github # Type of this SCM host. user: stopthatcow # GitHub username pat: # Optionally: another SCM host named "pat". type: github # Type of this SCM host. user: moorepatrick # GitHub username
With the above configuration in place the following are allowed:
zazu repo clone stopthatcow/zazu
Using the default host so we don't need the fully-qualified name.zazu repo clone pat/moorepatrick/zazu
This uses a non-default host so we need the name.
The zazu.yaml file lives at the base of the repo and describes the integrations to use with this repo.
issue_tracker: type: github owner: stopthatcow repo: zazu code_reviewer: type: github owner: stopthatcow repo: zazu style: - exclude: - dependencies/ # list path prefixes here to exclude from style - build/ stylers: - type: astyle options: - "--options=astyle.conf" # options passed to astyle include: - src/**.cpp # list of globs of files to style - include/**.h - test/**.cpp - type: autopep8 options: - "--max-line-length=150" # options passed to autopep8 # Generic styler that uses sed to fix common misspellings. - type: generic command: sed options: - "s/responce/response/g" include: - src/** - include/** - test/** # An optional section where names for special branches can be remapped. branches: develop: master # Features will be started from the "master" branch. zazu: 0.11.0 # optional required zazu version
Note that autocompletion currently only works for commands and subcommands (not arguments).
Add the following to your
~/.bashrc
file:
eval "$(_ZAZU_COMPLETE=source zazu)"
Add the following to your ~/.zshrc
file
eval "$(_ZAZU_COMPLETE=source_zsh zazu)"
alias zz="zazu" alias zd="zazu dev" alias zds="zazu dev start" alias zdr="zazu dev review" alias zdt="zazu dev ticket" alias zs="zazu style"