1hut(1)                      General Commands Manual                     hut(1)
2
3
4

NAME

6       hut - A CLI tool for sr.ht
7

SYNOPSIS

9       hut [commands...] [options...]
10

DESCRIPTION

12       hut is a CLI companion utility to interact with sr.ht.
13

OPTIONS

15       -h, --help
16           Show help message and quit. Can be used after a command to get more
17           information it.
18
19       --config
20           Explicitly select a configuration file that should be used over the
21           default configuration.
22
23       --instance
24           Select which sr.ht instance from the config file should be used. By
25           default the first one will be selected.
26

COMMANDS

28       help <command>
29           Help about any command.
30
31       graphql <service>
32           Write a GraphQL query and execute it. The JSON response is written
33           to stdout. service is the sr.ht service to execute the query on
34           (for instance "meta" or "builds"). When this command is run from a
35           terminal, the query will be read from $EDITOR, otherwise it de‐
36           faults to stdin.
37
38           A tool like jq(1) can be used to prettify the output and process
39           the data. Example:
40
41               hut graphql meta <<EOF | jq '.me'
42               query {
43                    me { canonicalName }
44               }
45               EOF
46
47           Options are:
48
49           --stdin
50               Read query from stdin.
51
52           -v, --var <key>=<value>
53               Set a raw variable. Example:
54
55                   hut graphql meta -v username=emersion <<'EOF'
56                   query($username: String!) {
57                        userByName(username: $username) {
58                             bio
59                        }
60                   }
61                   EOF
62
63       init
64           Initialize hut's configuration file.
65
66       export <directory>
67           Export account data.
68
69           Note, only meta.sr.ht is supported at the moment.
70
71   builds
72       cancel <IDs...>
73           Cancel jobs.
74
75       list
76           List jobs.
77
78       resubmit <ID>
79           Resubmit a build.
80
81           Options are:
82
83           -e, --edit
84               Edit manifest with $EDITOR.
85
86           -f, --follow
87               Follow build logs.
88
89           -n, --note <string>
90               Provide a short job description.
91
92           -t, --tags <string>
93               Slash separated tags (e.g. "hut/test").
94
95       secrets
96           List secrets.
97
98       show [ID] [options...]
99           Show job status.
100
101           If no ID is specified, the latest build will be printed.
102
103           Options are:
104
105           -f, --follow
106               Follow job status.
107
108       ssh <ID>
109           Connect with SSH to a job.
110
111       submit [manifest...] [options...]
112           Submit a build manifest.
113
114           If no build manifest is specified, build manifests are discovered
115           at .build.yml and .builds/*.yml.
116
117           Options are:
118
119           -f, --follow
120               Follow build logs.
121
122           -n, --note <string>
123               Provide a short job description.
124
125   git
126       Options are:
127
128           -r, --repo <string>
129               Name of repository.
130
131       acl delete <ID>
132           Delete an ACL entry.
133
134       acl list [repo]
135           List ACL entries of a repo. Defaults to current repo.
136
137       acl update <user> [options...]
138           Update or add an ACL entry for user.
139
140           Options are:
141
142           -m, --mode <string>
143               Access mode to set (RW, RO).
144
145       artifact delete <ID>
146           Delete an artifact.
147
148       artifact list [options...]
149           List artifacts.
150
151       artifact upload <filename...> [options...]
152           Upload artifacts.
153
154           Options are:
155
156           --rev <string>
157               Revision tag. Defaults to the last Git tag.
158
159       create <name> [options...]
160           Create a repository.
161
162           Options are:
163
164           -c, --clone
165               Clone repository to CWD.
166
167           -d, --description <string>
168               Description of the repository.
169
170           --import-url <url>
171               Import the repository from the given URL.
172
173           -v, --visibility <string>
174               Visibility to use (public, unlisted, private). Defaults to pub‐
175               lic.
176
177       delete [repo] [options...]
178           Delete a repository. By default the current repo will be deleted.
179
180           Options are:
181
182           -y, --yes
183               Confirm deletion without prompt.
184
185       list [owner]
186           List repositories.
187
188       show [repo]
189           Display information about a repository.
190
191       user-webhook create [options...]
192           Create a user webhook. When this command is run from a terminal,
193           the query will be read from $EDITOR, otherwise it defaults to
194           stdin.
195
196           Options are:
197
198           -e, --events <strings...>
199               List of events that should trigger the webhook (REPO_CREATED,
200               REPO_UPDATE, REPO_DELETED). Required.
201
202           --stdin
203               Read query from stdin.
204
205           -u, --url <URL>
206               The payload URL which receives the POST request. Required.
207
208       user-webhook delete <ID>
209           Delete a user webhook.
210
211       user-webhook list
212           List user webhooks.
213
214   hg
215       create <name> [options...]
216           Create a repository.
217
218           Options are:
219
220           -d, --description <string>
221               Description of the repository.
222
223           -v, --visibility <string>
224               Visibility to use (public, unlisted, private). Defaults to pub‐
225               lic.
226
227       delete <repo> [options...]
228           Delete a repository.
229
230           Options are:
231
232           -y, --yes
233               Confirm deletion without prompt.
234
235       list [owner]
236           List repositories.
237
238       user-webhook create [options...]
239           Create a user webhook. When this command is run from a terminal,
240           the query will be read from $EDITOR, otherwise it defaults to
241           stdin.
242
243           Options are:
244
245           -e, --events <strings...>
246               List of events that should trigger the webhook (REPO_CREATED,
247               REPO_UPDATE, REPO_DELETED). Required.
248
249           --stdin
250               Read query from stdin.
251
252           -u, --url <URL>
253               The payload URL which receives the POST request. Required.
254
255       user-webhook delete <ID>
256           Delete a user webhook.
257
258       user-webhook list
259           List user webhooks.
260
261   lists
262       Options are:
263
264           -l, --mailing-list <name>
265               Select a mailing list.
266
267               By default, the mailing list configured for the current Git
268               repository will be selected.
269
270       acl delete <ID>
271           Delete an ACL entry.
272
273       acl list [list]
274           List ACL entries of a mailing list.
275
276       create <name> [options...]
277           Create a mailing list.
278
279           Options are:
280
281           --stdin
282               Read description from stdin.
283
284           -v, --visibility <string>
285               Visibility to use (public, unlisted, private). Defaults to pub‐
286               lic.
287
288       delete [list] [options...]
289           Delete a mailing list.
290
291           Options are:
292
293           -y, --yes
294               Confirm deletion without prompt.
295
296       list [owner]
297           List mailing lists.
298
299       patchset apply <ID>
300           Apply a patchset.
301
302       patchset list [list] [options...]
303           List patchsets in list.
304
305           Options are:
306
307           -u, --user
308               List patchsets by user instead of by list.
309
310       patchset show <ID>
311           Show a patchset.
312
313       patchset update <ID>
314           Update a patchset.
315
316           Options are:
317
318           -s, --status <string>
319               Patchset status to set (required).
320
321       subscribe [list]
322           Subscribe to a mailing list.
323
324       unsubscribe [list]
325           Unsubscribe from a mailing list.
326
327       user-webhook create [options...]
328           Create a user webhook. When this command is run from a terminal,
329           the query will be read from $EDITOR, otherwise it defaults to
330           stdin.
331
332           Options are:
333
334           -e, --events <strings...>
335               List of events that should trigger the webhook (LIST_CREATED,
336               LIST_UPDATED, LIST_DELETED, EMAIL_RECEIVED, PATCHSET_RECEIVED).
337               Required.
338
339           --stdin
340               Read query from stdin.
341
342           -u, --url <URL>
343               The payload URL which receives the POST request. Required.
344
345       user-webhook delete <ID>
346           Delete a user webhook.
347
348       user-webhook list
349           List user webhooks.
350
351   meta
352       audit-log
353           Display your audit log.
354
355       pgp-key create [path]
356           Upload a PGP public key and associate it with your account.
357
358           The public key must be in the armored format.
359
360           If path is not specified, the default public key from the local GPG
361           keyring is used.
362
363       pgp-key delete <ID>
364           Delete a PGP key from your account.
365
366       pgp-key list [username] [options...]
367           List PGP public keys.
368
369           Options are:
370
371           -r, --raw
372               Only print raw public key
373
374       show [username]
375           Show a user's profile.
376
377           If username is not specified, your profile is displayed.
378
379       ssh-key create [path]
380           Upload an SSH public key and associate it with your account.
381
382           If path is not specified, the default SSH public key is used.
383
384       ssh-key delete <ID>
385           Delete an SSH public key from your account.
386
387       ssh-key list [username] [options...]
388           List SSH public keys.
389
390           Options are:
391
392           -r, --raw
393               Only print raw public key
394
395       user-webhook create [options...]
396           Create a user webhook. When this command is run from a terminal,
397           the query will be read from $EDITOR, otherwise it defaults to
398           stdin.
399
400           Options are:
401
402           -e, --events <strings...>
403               List of events that should trigger the webhook (PROFILE_UPDATE,
404               PGP_KEY_ADDED, PGP_KEY_REMOVED, SSH_KEY_ADDED, SSH_KEY_RE‐
405               MOVED). Required.
406
407           --stdin
408               Read query from stdin.
409
410           -u, --url <URL>
411               The payload URL which receives the POST request. Required.
412
413       user-webhook delete <ID>
414           Delete a user webhook.
415
416       user-webhook list
417           List user webhooks.
418
419   pages
420       list
421           List registered sites.
422
423       publish [tarball] [options...]
424           Publish a website.
425
426           If tarball is not specified, standard input is used.
427
428           Options are:
429
430           -d, --domain <string>
431               Fully qualified domain name.
432
433           --not-found <string>
434               Path to serve for page not found responses
435
436           -p, --protocol <string>
437               Protocol to use (either HTTPS or GEMINI; defaults to HTTPS)
438
439           -s, --subdirectory <string>
440               If specified, only this subdirectory is updated, the rest of
441               the site is left untouched.
442
443       unpublish [options...]
444           Unpublish a website.
445
446           Options are:
447
448           -d, --domain <string>
449               Fully qualified domain name.
450
451           -p, --protocol <string>
452               Protocol to use (either HTTPS or GEMINI; defaults to HTTPS)
453
454       user-webhook create [options...]
455           Create a user webhook. When this command is run from a terminal,
456           the query will be read from $EDITOR, otherwise it defaults to
457           stdin.
458
459           Options are:
460
461           -e, --events <strings...>
462               List of events that should trigger the webhook (SITE_PUBLISHED,
463               SITE_UNPUBLISHED). Required.
464
465           --stdin
466               Read query from stdin.
467
468           -u, --url <URL>
469               The payload URL which receives the POST request. Required.
470
471       user-webhook delete <ID>
472           Delete a user webhook.
473
474       user-webhook list
475           List user webhooks.
476
477   paste
478       create <filenames...>
479           Create a new paste.
480
481           Options are:
482
483           -v, --visibility <string>
484               Visibility to use (public, unlisted, private). Defaults to un‐
485               listed.
486
487           -n, --name <string>
488               Name of the created paste. Only valid when reading from stdin.
489
490       delete <IDs...>
491           Delete pastes.
492
493       list
494           List pastes.
495
496       show <ID>
497           Display a paste.
498
499       update <ID> [options...]
500           Update a paste's visibility.
501
502           Options are:
503
504           -v, --visibility <string>
505               Visibility to use (public, unlisted, private)
506
507       user-webhook create [options...]
508           Create a user webhook. When this command is run from a terminal,
509           the query will be read from $EDITOR, otherwise it defaults to
510           stdin.
511
512           Options are:
513
514           -e, --events <strings...>
515               List of events that should trigger the webhook (PASTE_CREATED,
516               PASTE_UPDATED, PASTE_DELETED). Required.
517
518           --stdin
519               Read query from stdin.
520
521           -u, --url <URL>
522               The payload URL which receives the POST request. Required.
523
524       user-webhook delete <ID>
525           Delete a user webhook.
526
527       user-webhook list
528           List user webhooks.
529
530   todo
531       Options are:
532
533           -t, --tracker <string>
534               Name of tracker.
535
536       acl delete <ID>
537           Delete an ACL entry.
538
539       acl list [tracker]
540           List ACL entries of a tracker.
541
542       create <name> [options...]
543           Create a tracker.
544
545           Options are:
546
547           --stdin
548               Read description from stdin.
549
550           -v, --visibility <string>
551               Visibility to use (public, unlisted, private). Defaults to pub‐
552               lic.
553
554       delete <tracker> [options...]
555           Delete a tracker.
556
557           Options are:
558
559           -y, --yes
560               Confirm deletion without prompt.
561
562       label create <name> [options...]
563           Create a label.
564
565           Options are:
566
567           -b, --background
568               Background color in hex format (required).
569
570           -f, --foreground
571               Foreground color in hex format. If omitted either black or
572               white will be selected for an optimized contrast.
573
574       label delete <ID>
575           Delete a label.
576
577       label list
578           List labels.
579
580       list [owner]
581           List trackers.
582
583       subscribe [tracker]
584           Subscribe to a tracker.
585
586       ticket assign <ID> [options...]
587           Assign a user to a ticket.
588
589           Options are:
590
591           -u, --user
592               Username of the new assignee (required).
593
594       ticket comment <ID> [options...]
595           Comment on a ticket with $EDITOR.
596
597           Options are:
598
599           -r, --resolution
600               Resolution for resolved tickets (required if status RESOLVED is
601               used). If status is omitted, it will be set to RESOLVED.
602
603           -s, --status
604               New ticket status.
605
606           --stdin
607               Read comment from stdin.
608
609       ticket delete <ID> [options...]
610           Delete a ticket.
611
612           Options are:
613
614           -y, --yes
615               Confirm deletion without prompt.
616
617       ticket list
618           List tickets.
619
620       ticket subscribe <ID>
621           Subscribe to a ticket.
622
623       ticket unassign <ID> [options...]
624           Unassign a user from a ticket.
625
626           Options are:
627
628           -u, --user
629               Username of the assignee (required).
630
631       ticket unsubscribe <ID>
632           Unsubscribe from a ticket.
633
634       ticket update-status <ID> [options...]
635           Update status of a ticket.
636
637           Options are:
638
639           -r, --resolution
640               Resolution for resolved tickets (required if status RESOLVED is
641               used). If status is omitted, it will be set to RESOLVED.
642
643           -s, --status
644               New ticket status.
645
646       ticket webhook create <ID> [options...]
647           Create a ticket webhook.
648
649           Options are:
650
651           -e, --events <strings...>
652               List of events that should trigger the webhook (EVENT_CREATED,
653               TICKET_UPDATE, TICKET_DELETED). Required.
654
655           --stdin
656               Read query from stdin.
657
658           -u, --url <URL>
659               The payload URL which receives the POST request. Required.
660
661       ticket webhook delete <ID>
662           Delete a ticket webhook.
663
664       ticket webhook list <ID>
665           List ticket webhooks.
666
667       unsubscribe [tracker]
668           Unsubscribe from a tracker.
669
670       user-webhook create [options...]
671           Create a user webhook. When this command is run from a terminal,
672           the query will be read from $EDITOR, otherwise it defaults to
673           stdin.
674
675           Options are:
676
677           -e, --events <strings...>
678               List of events that should trigger the webhook (TRACKER_CRE‐
679               ATED, TRACKER_UPDATE, TRACKER_DELETED, TICKET_CREATED). Re‐
680               quired.
681
682           --stdin
683               Read query from stdin.
684
685           -u, --url <URL>
686               The payload URL which receives the POST request. Required.
687
688       user-webhook delete <ID>
689           Delete a user webhook.
690
691       user-webhook list
692           List user webhooks.
693
694       webhook create [tracker] [options...]
695           Create a tracker webhook.
696
697           Options are:
698
699           -e, --events <strings...>
700               List of events that should trigger the webhook (TRACKER_UPDATE,
701               TRACKER_DELETED, LABEL_CREATED, LABEL_UPDATE, LABEL_DELETED,
702               TICKET_CREATED, TICKET_UPDATE, TICKET_DELETED, EVENT_CREATED).
703               Required.
704
705           --stdin
706               Read query from stdin.
707
708           -u, --url <URL>
709               The payload URL which receives the POST request. Required.
710
711       webhook delete <ID>
712           Delete a tracker webhook.
713
714       webhook list [tracker]
715           List tracker webhooks.
716

CONFIGURATION

718       Generate a new OAuth2 access token on meta.sr.ht.
719
720       On startup hut will look for a file at $XDG_CONFIG_HOME/hut/config. If
721       unset, $XDG_CONFIG_HOME defaults to ~/.config/.
722
723           instance "sr.ht" {
724                access-token "<token>"
725                # As an alternative you can specify a command whose first line of output
726                # will be parsed as the token
727                access-token-cmd pass token
728                meta {
729                     # You can set the origin for each service. As fallback hut will
730                     # construct the origin from the instance name and the service.
731                     origin "https://meta.sr.ht"
732                }
733           }
734

AUTHORS

736       Maintained by Simon Ser <contact@emersion.fr>, who is assisted by other
737       open-source contributors. For more information about hut development,
738       see <https://sr.ht/~emersion/hut>.
739
740
741
742                                  2022-09-28                            hut(1)
Impressum