-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhk.usage.kdl
114 lines (112 loc) · 4.8 KB
/
hk.usage.kdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name hk
bin hk
version "0.6.0"
about "A tool for managing git hooks"
usage "Usage: hk [OPTIONS] <COMMAND>"
flag "-j --jobs" help="Number of jobs to run in parallel" global=#true {
arg <JOBS>
}
flag "-p --profile" help="Profiles to enable/disable prefix with ! to disable e.g. --profile slow --profile !fast" var=#true global=#true {
arg <PROFILE>
}
flag "-s --slow" help="Shorthand for --profile=slow" global=#true
flag "-v --verbose" help="Enables verbose output" var=#true global=#true count=#true
flag "-q --quiet" help="Suppresses output" global=#true
flag --silent help="Suppresses all output" global=#true
cmd cache hide=#true subcommand_required=#true help="Manage hk internal cache" {
cmd clear help="Clear the cache directory"
}
cmd check help="Fixes code" {
alias c
flag "-a --all" help="Run on all files instead of just staged files"
flag --linter help="Run on specific linter(s)" var=#true {
arg <LINTER>
}
flag --stash help="Force stashing even if it's disabled via HK_STASH"
flag --from-ref help="Start reference for checking files (requires --to-ref)" {
arg <FROM_REF>
}
flag --to-ref help="End reference for checking files (requires --from-ref)" {
arg <TO_REF>
}
}
cmd completion help="Generates shell completion scripts" {
arg <SHELL> help="The shell to generate completion for"
}
cmd config help="Generate a default hk.toml configuration file" {
alias cfg
}
cmd fix help="Fixes code" {
alias f
flag "-a --all" help="Run on all files instead of just staged files"
flag --linter help="Run on specific linter(s)" var=#true {
arg <LINTER>
}
flag --from-ref help="Start reference for fixing files (requires --to-ref)" {
arg <FROM_REF>
}
flag --to-ref help="End reference for fixing files (requires --from-ref)" {
arg <TO_REF>
}
}
cmd generate help="Generates a new hk.pkl file for a project" {
alias g
alias init hide=#true
flag "-f --force" help="Overwrite existing hk.pkl file"
flag --mise help="Generate a mise.toml file with hk configured" {
long_help "Generate a mise.toml file with hk configured\n\nSet HK_MISE=1 to make this default behavior."
}
}
cmd install help="Sets up git hooks to run hk" {
alias i
flag --mise help="Use `mise x` to execute hooks. With this, it won't\nbe necessary to activate mise in order to run hooks\nwith mise tools." {
long_help "Use `mise x` to execute hooks. With this, it won't\nbe necessary to activate mise in order to run hooks\nwith mise tools.\n\nSet HK_MISE=1 to make this default behavior."
}
}
cmd run subcommand_required=#true help="Run a hook" {
alias r
cmd pre-commit help="Sets up git hooks to run hk" {
alias co
flag "-a --all" help="Run on all files instead of just staged files"
flag "-f --fix" help="Run fix command instead of run command This is the default behavior unless HK_FIX=0"
flag "-c --check" help="Run run command instead of fix command"
flag --linter help="Run on specific linter(s)" var=#true {
arg <LINTER>
}
flag --stash help="Force stashing even if it's disabled via HK_STASH"
flag --from-ref help="Start reference for checking files (requires --to-ref)" {
arg <FROM_REF>
}
flag --to-ref help="End reference for checking files (requires --from-ref)" {
arg <TO_REF>
}
}
cmd pre-push help="Sets up git hooks to run hk" {
alias ph
flag "-a --all" help="Run on all files instead of just staged files"
flag "-f --fix" help="Run fix command instead of run command This is the default behavior unless HK_FIX=0"
flag "-c --check" help="Run check command instead of fix command"
flag --linter help="Run on specific linter(s)" var=#true {
arg <LINTER>
}
flag --stash help="Force stashing even if it's disabled via HK_STASH"
flag --from-ref help="Start reference for checking files (requires --to-ref)" {
arg <FROM_REF>
}
flag --to-ref help="End reference for checking files (requires --from-ref)" {
arg <TO_REF>
}
arg "[REMOTE]" help="Remote name" required=#false
arg "[URL]" help="Remote URL" required=#false
}
cmd prepare-commit-msg {
alias pcm
arg <COMMIT_MSG_FILE> help="The path to the file that contains the commit message so far"
arg "[SOURCE]" help="The source of the commit message (e.g., \"message\", \"template\", \"merge\")" required=#false
arg "[SHA]" help="The SHA of the commit being amended (if applicable)" required=#false
}
}
cmd usage hide=#true help="Generates a usage spec for the CLI" {
long_help "Generates a usage spec for the CLI\n\nhttps://usage.jdx.dev"
}
cmd version help="Print the version of hk"