table of contents
hut(1) | General Commands Manual | hut(1) |
NAME¶
hut - A CLI tool for sr.ht
SYNOPSIS¶
hut [commands...] [options...]
DESCRIPTION¶
hut is a CLI companion utility to interact with sr.ht.
Resources (such as build jobs, todo tickets, lists patchsets, git repositories, and so on) can be specified in multiple forms: name, owner and name, or full URL. For instance, the repository hut owned by ~emersion on git.sr.ht can be referred to via:
- "hut"
- "~emersion/hut"
- "https://git.sr.ht/~emersion/hut"
Additionally, mailing lists can be referred to by their email address.
OPTIONS¶
-h, --help
--config
--instance
COMMANDS¶
help <command>
graphql <service>
A tool like jq(1) can be used to prettify the output and process the data. Example:
hut graphql meta <<EOF | jq '.me' query { me { canonicalName } } EOF
Options are:
--file <key>=<value>
--stdin
-v, --var <key>=<value>
hut graphql meta -v username=emersion <<'EOF' query($username: String!) { userByName(username: $username) { bio } } EOF
init
export <directory> [resource|service...]
By default, all data of the current user will be exported. Alternatively, an explicit list of instance services (e.g. "todo.sr.ht") or resources (e.g. "todo.sr.ht/~user/tracker") can be specified.
import <directory...>
builds¶
artifacts <ID>
cancel <IDs...>
list [owner]
resubmit <ID>
Options are:
-e, --edit
-f, --follow
-n, --note <string>
-v, --visibility <string>
secret list
secret share <secret>
Options are:
-u, --user
show [ID] [options...]
If no ID is specified, the latest build will be printed.
Options are:
-f, --follow
ssh <ID>
submit [manifest...] [options...]
If no build manifest is specified, build manifests are discovered at .build.yml and .builds/*.yml.
Options are:
-e, --edit
-f, --follow
-n, --note <string>
-t, --tags <string>
-v, --visibility <string>
user-webhook create [options...]
Options are:
-e, --events <strings...>
--stdin
-u, --url <URL>
user-webhook delete <ID>
user-webhook list
git¶
Options are:
acl delete <ID>
acl list [repo]
acl update <user> [options...]
Options are:
-m, --mode <string>
artifact delete <ID>
artifact list [options...]
artifact upload <filename...> [options...]
Options are:
--rev <string>
create <name> [options...]
Options are:
-c, --clone
-d, --description <string>
--import-url <url>
-v, --visibility <string>
delete [repo] [options...]
Options are:
-y, --yes
list [owner]
show [repo]
update [repo] [options...]
Options are:
-b, --default-branch <branch>
-d, --description <description>
--readme <file>
-v, --visibility <string>
user-webhook create [options...]
Options are:
-e, --events <strings...>
--stdin
-u, --url <URL>
user-webhook delete <ID>
user-webhook list
hg¶
create <name> [options...]
Options are:
-d, --description <string>
-v, --visibility <string>
delete <repo> [options...]
Options are:
-y, --yes
list [owner]
user-webhook create [options...]
Options are:
-e, --events <strings...>
--stdin
-u, --url <URL>
user-webhook delete <ID>
user-webhook list
lists¶
Options are:
By default, the mailing list configured for the current Git repository will be selected.
acl delete <ID>
acl list [list]
archive [list] [options...]
Options are:
-d, --days <int>
create <name> [options...]
Options are:
--stdin
-v, --visibility <string>
delete [list] [options...]
Options are:
-y, --yes
list [owner]
patchset apply <ID>
patchset list [list] [options...]
Options are:
-u, --user
patchset show <ID>
patchset update <ID>
Options are:
-s, --status <string>
subscribe [list]
subscriptions
unsubscribe [list]
user-webhook create [options...]
Options are:
-e, --events <strings...>
--stdin
-u, --url <URL>
user-webhook delete <ID>
user-webhook list
webhook create [list] [options...]
Options are:
-e, --events <strings...>
--stdin
-u, --url <URL>
webhook delete <ID>
webhook list [list]
meta¶
audit-log
pgp-key create [path]
The public key must be in the armored format.
If path is not specified, the default public key from the local GPG keyring is used.
pgp-key delete <ID>
pgp-key list [username] [options...]
Options are:
-r, --raw
show [username]
If username is not specified, your profile is displayed.
ssh-key create [path]
If path is not specified, the default SSH public key is used.
ssh-key delete <ID>
ssh-key list [username] [options...]
Options are:
-r, --raw
user-webhook create [options...]
Options are:
-e, --events <strings...>
--stdin
-u, --url <URL>
user-webhook delete <ID>
user-webhook list
pages¶
list
publish [file] [options...]
The input file can be either a gzip tarball or a directory. If file is not specified, standard input is used.
Options are:
-d, --domain <string>
--not-found <string>
-p, --protocol <string>
--site-config <string>
-s, --subdirectory <string>
unpublish [options...]
Options are:
-d, --domain <string>
-p, --protocol <string>
user-webhook create [options...]
Options are:
-e, --events <strings...>
--stdin
-u, --url <URL>
user-webhook delete <ID>
user-webhook list
paste¶
create <filenames...>
Options are:
-v, --visibility <string>
-n, --name <string>
delete <IDs...>
list
show <ID>
update <ID> [options...]
Options are:
-v, --visibility <string>
user-webhook create [options...]
Options are:
-e, --events <strings...>
--stdin
-u, --url <URL>
user-webhook delete <ID>
user-webhook list
todo¶
Options are:
acl delete <ID>
acl list [tracker]
create <name> [options...]
Options are:
--stdin
-v, --visibility <string>
delete <tracker> [options...]
Options are:
-y, --yes
label create <name> [options...]
Options are:
-b, --background
-f, --foreground
label delete <name>
label list
list [owner]
subscribe [tracker]
ticket assign <ID> [options...]
Options are:
-u, --user
ticket comment <ID> [options...]
Options are:
-r, --resolution
-s, --status
--stdin
ticket create [options...]
Options are:
--stdin
ticket delete <ID> [options...]
Options are:
-y, --yes
ticket edit <ID>
ticket label <ID> [options...]
Options are:
-l, --label <name>
ticket list [options...]
Options are:
-s, --status <string>
ticket show <ID>
ticket subscribe <ID>
ticket unassign <ID> [options...]
Options are:
-u, --user
ticket unlabel <ID> [options...]
Options are:
-l, --label <name>
ticket unsubscribe <ID>
ticket update-status <ID> [options...]
Options are:
-r, --resolution
-s, --status
ticket webhook create <ID> [options...]
Options are:
-e, --events <strings...>
--stdin
-u, --url <URL>
ticket webhook delete <ID>
ticket webhook list <ID>
unsubscribe [tracker]
user-webhook create [options...]
Options are:
-e, --events <strings...>
--stdin
-u, --url <URL>
user-webhook delete <ID>
user-webhook list
webhook create [tracker] [options...]
Options are:
-e, --events <strings...>
--stdin
-u, --url <URL>
webhook delete <ID>
webhook list [tracker]
CONFIGURATION¶
Generate a new OAuth2 access token on meta.sr.ht.
On startup hut will look for a file at $XDG_CONFIG_HOME/hut/config. If unset, $XDG_CONFIG_HOME defaults to ~/.config/.
instance "sr.ht" { access-token "<token>" # As an alternative you can specify a command whose first line of output # will be parsed as the token access-token-cmd pass token meta { # You can set the origin for each service. As fallback hut will # construct the origin from the instance name and the service. origin "https://meta.sr.ht" } }
AUTHORS¶
Maintained by Simon Ser <contact@emersion.fr>, who is assisted by other open-source contributors. For more information about hut development, see <https://sr.ht/~emersion/hut>.
2024-06-08 |