zuke.tools.husky

← Python API reference

@zuke/husky 1.0.1: @zuke/husky — typed husky task wrappers for Zuke builds.

Symbols

#

HuskyInitSettings

class
class HuskyInitSettings(HuskySettings)

Settings for husky init [dir] — scaffold husky in a project: create the hooks directory, add a sample pre-commit hook, and wire up the prepare script. This is the canonical husky v9 setup command.

  • dir(path: str) -> Self

    The hooks directory to initialise (positional; defaults to .husky).

#

HuskyInstallSettings

class
class HuskyInstallSettings(HuskySettings)

Settings for installing Git hooks by invoking husky [dir] bare.

husky v9 removed the old install subcommand: running husky with no subcommand is what installs the hooks (an optional directory may follow). This task therefore emits the bare husky invocation — its default argv is just ["husky"], not ["husky", "install"].

  • dir(path: str) -> Self

    The hooks directory to install into (positional; defaults to .husky).

#

HuskySettings

class
class HuskySettings(ToolSettings)

Shared base for every husky invocation: the binary and argv assembly.

#

HuskyTasks

class
class HuskyTasks

Typed task functions for the husky Git-hooks tool.

  • static async init(ctx: ServiceContext, configure: Callable[[HuskyInitSettings], HuskyInitSettings] | None=None) -> ExecResult

    Scaffold husky in a project: husky init [dir].

  • static async install(ctx: ServiceContext, configure: Callable[[HuskyInstallSettings], HuskyInstallSettings] | None=None) -> ExecResult

    Install Git hooks via the bare husky [dir] invocation (husky v9 removed the install subcommand).