commands

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Add = &cli.Command{
	Name:  "add",
	Usage: "adds a new git hook",
	Subcommands: []*cli.Command{
		{
			Name:  "gitleaks",
			Usage: "pre-commit hook to run gitleaks detect",
			Action: func(c *cli.Context) error {
				return addGitLeaks()
			},
		},
	},
}
View Source
var Config = &cli.Command{
	Name:  "config",
	Usage: "Configure git-hooks",
	Action: func(c *cli.Context) error {
		return configureGitHooks()
	},
}
View Source
var Hooks = &cli.Command{
	Name:  "hook",
	Usage: "",
	Action: func(c *cli.Context) error {
		if c.NArg() == 0 {
			return cli.ShowAppHelp(c)
		}

		hookName := c.Args().First()
		return executeHook(hookName)
	},
}
View Source
var Implode = &cli.Command{
	Name:  "implode",
	Usage: "Revert git-hooks configuration",
	Action: func(c *cli.Context) error {
		return implodeGitHooks()
	},
}
View Source
var Remove = &cli.Command{
	Name:  "remove",
	Usage: "removes a git hook",
	Subcommands: []*cli.Command{
		{
			Name:  "gitleaks",
			Usage: "remove the gitleaks pre-commit hook",
			Action: func(c *cli.Context) error {
				return removeGitLeaks()
			},
		},
	},
}
View Source
var ScanLocal = &cli.Command{
	Name:      "scan-local",
	Usage:     "Scan for repositories with local hooksPath overrides",
	ArgsUsage: "[PATH]",
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:  "max-depth",
			Value: 10,
			Usage: "Maximum directory depth to search",
		},
		&cli.BoolFlag{
			Name:  "verbose",
			Usage: "Show detailed output",
		},
		&cli.BoolFlag{
			Name:  "auto-fix",
			Usage: "Automatically remove local hooksPath overrides",
		},
	},
	Action: scanLocalAction,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL