Change hooks api to take extra options.
Change hook command to pass global options.