hut(1)

✨ NAME ✨

hut - A CLI tool for sr.ht. This is the hut(1) page from the General Commands Manual, and bestie, it's about to be your new fave little sr.ht sidekick. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

hut [commands...] [options...]

🌸 DESCRIPTION 🌸

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

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:

Additionally, mailing lists can be referred to by their email address.

hut commands that read input, like hut graphql or hut builds user-webhook create, read input depending on whether their stdin is on a terminal or not:

  • If stdin is not on a terminal, for example, because stdin is redirected from a file or from a pipe, hut reads input from stdin.
  • Otherwise, if option --stdin is specified to the command, hut reads input from stdin.
  • Otherwise, hut assumes to run in a terminal and starts the command provided by environment variable $EDITOR to read input.

It is recommended to install git alongside hut. git is used by multiple commands, for example to determine which mailing list is connected to a git repository.

hut can link a git repository to a project, tracker and mailing list. You can execute a hut command that operates on one of the resources mentioned above from inside a repository while not explicitly passing the required resource to hut. In this case hut tries to match the repository to a resource through the project hub. These are then cached inside the repository's git config (hut.project, hut.tracker, sendemail.to). You can interact with these settings through hut's settings command or directly with git.


πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” Show help message and quit. Can be used after a command to get more information about it.
  • --config β€” Explicitly select a configuration file that should be used over the default configuration.
  • --debug β€” Prints the command's underlying GraphQL request to stderr.
  • --instance β€” Select which sr.ht instance from the config file should be used. By default the first one will be selected.

πŸ‘‘ COMMANDS πŸ‘‘

Okay so here's the whole command menu, bestie β€” no skipping, every single one is below. πŸ’…

  • access-token β€” Display the access token.
  • help <command> β€” Help about any command.
  • graphql <service> β€” Write a GraphQL query and execute it. The JSON response is written to stdout. service is the sr.ht service to execute the query on (for instance "meta" or "builds").

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> β€” Set a file variable.
  • --stdin β€” Read query from stdin.
  • -v, --var <key>=<value> β€” Set a raw variable. Example:
hut graphql meta -v username=emersion <<'EOF'
query($username: String!) {
     userByName(username: $username) {
          bio
     }
}
EOF
  • init β€” Initialize hut's configuration file.
  • export <directory> [resource|service...] β€” Export account data.

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...> β€” Import account data.
  • version β€” Display hut version.
  • completion <shell> β€” Generate autocompletion script for either bash, fish, powershell or zsh.

πŸŽ€ settings πŸŽ€

Manage repo-specific hut settings, e.g. which resource (project, tracker, mailing list) is linked to a repo.

  • show β€” Show settings.
  • update β€” Update settings, e.g. in case a project swapped from a general purpose mailing list to a project specific one.

🌈 builds 🌈

Build jobs, but make it organized. Here's every build command and every flag, fr fr.

  • artifacts <ID> β€” List artifacts.
  • artifact list <ID> β€” List artifacts.
  • artifact get <ID> <path> [options...] β€” Get build artifact by its path.

Options are:

  • --output <file> β€” Path to write the artifact to. If unspecified, it is written to stdout.
  • cancel <IDs...> β€” Cancel jobs.
  • list [owner] [options...] β€” List jobs.

Options are:

  • --count <int> β€” Number of jobs to fetch.
  • -s, --status <string> β€” Filter by job status.
  • -t, --tags <string> β€” Only show jobs whose tags string starts with the provided value.
  • resubmit <ID> β€” Resubmit a build.

Options are:

  • -e, --edit β€” Edit manifest with $EDITOR.
  • -f, --follow β€” Follow build logs.
  • -n, --note <string> β€” Provide a short job description.
  • -s, --no-secrets β€” Disable secrets for this build.
  • -v, --visibility <string> β€” Visibility to use (public, unlisted, private). Defaults to the same visibility used by the original build job.
  • secret list [options...] β€” List secrets.

Options are:

  • --count <int> β€” Number of secrets to fetch.
  • secret share <secret> β€” Share a secret.

Options are:

  • -u, --user β€” User with whom to share the secret (required).
  • show [ID] [options...] β€” Show job status.

If no ID is specified, the latest build will be printed.

Options are:

  • -f, --follow β€” Follow job status.
  • --web β€” Open in browser.
  • ssh [ID] β€” Connect with SSH to a job.

If no ID is specified, the latest running job will be used.

  • submit [manifest...] [options...] β€” Submit a build manifest.

If no build manifest is specified, build manifests are discovered at .build.yml, .build.yaml, .builds/*.yml and .builds/*.yaml.

Options are:

  • -e, --edit β€” Edit manifest with $EDITOR.
  • -f, --follow β€” Follow build logs.
  • -n, --note <string> β€” Provide a short job description.
  • -s, --no-secrets β€” Disable secrets for this build.
  • -t, --tags <string> β€” Slash separated tags (e.g. "hut/test").
  • -v, --visibility <string> β€” Visibility to use (public, unlisted, private). Defaults to unlisted.
  • update <ID> [options...] β€” Update a job.

Options are:

  • -v, --visibility <string> β€” Visibility to use (public, unlisted, private)
  • -t, --tags <string> β€” Tags to attach to the job
  • user-webhook create [options...] β€” Create a user webhook.

Options are:

  • -e, --events <strings...> β€” List of events that should trigger the webhook (JOB_CREATED). Required.
  • --stdin β€” Read query from stdin.
  • -q, --query <string> β€” The webhook query. Exclusive with --stdin.
  • -u, --url <URL> β€” The payload URL which receives the POST request. Required.
  • user-webhook show <ID> β€” Show a user webhook.
  • user-webhook delete <ID> β€” Delete a user webhook.
  • user-webhook list [options...] β€” List user webhooks.

Options are:

  • --count <int> β€” Number of webhooks to fetch.

🧚 git 🧚

The git command group has its own options, bestie.

Options are:

  • -r, --repo <string> β€” Name of repository.

  • acl delete <ID> β€” Delete an ACL entry.
  • acl list [repo] [options...] β€” List ACL entries of a repo. Defaults to current repo.

Options are:

  • --count <int> β€” Number of ACL entries to fetch.
  • acl update <user> [options...] β€” Update or add an ACL entry for user.

Options are:

  • -m, --mode <string> β€” Access mode to set (RW, RO).
  • artifact delete <ID> β€” Delete an artifact.
  • artifact list [options...] β€” List artifacts.
  • artifact upload <filename...> [options...] β€” Upload artifacts.

Options are:

  • --rev <string> β€” Revision tag. Defaults to the last Git tag.
  • clone <repo> β€” This will clone the repository to CWD and try to configure it for git send-email if possible. "repo" can be either an (scp-like git) URL or a sourcehut resource ("hut", "~xenrox/hut").
  • create <name> [options...] β€” Create a repository. If --clone is not used, the remote URL will be printed to stdout.

Options are:

  • -c, --clone β€” Clone repository to CWD.
  • -d, --description <string> β€” Description of the repository.
  • --import-url <url> β€” Import the repository from the given URL.
  • -v, --visibility <string> β€” Visibility to use (public, unlisted, private). Defaults to public.
  • delete [repo] [options...] β€” Delete a repository. By default the current repo will be deleted.

Options are:

  • -y, --yes β€” Confirm deletion without prompt.
  • list [owner] [options...] β€” List repositories.

Options are:

  • --count <int> β€” Number of repositories to fetch.
  • setup [options...] β€” Setup a repository for git send-email. hut will read the required settings from the project configuration file. If the repository already has some configuration, the setup will be skipped.

Options are:

  • -f, --force β€” Force the setup even if the repository is already configured for git send-email.
  • show [repo] [options...] β€” Display information about a repository.

Options are:

  • --web β€” Open in browser.
  • update [repo] [options...] β€” Update a repository. By default the current repo will be updated.

Options are:

  • -b, --default-branch <branch> β€” Set the default branch.
  • -d, --description <description> β€” Set one-line repository description.
  • -n, --name <string> β€” New repository name.
  • --readme <file> β€” Update the custom README settings. You can read the HTML from a file or pass "-" as the filename to read from stdin. To clear the custom README use an empty string "".
  • -v, --visibility <string> β€” Visibility to use (public, unlisted, private).
  • user-webhook create [options...] β€” Create a user webhook.

Options are:

  • -e, --events <strings...> β€” List of events that should trigger the webhook (REPO_CREATED, REPO_UPDATE, REPO_DELETED). Required.
  • --stdin β€” Read query from stdin.
  • -q, --query <string> β€” the webhook query, aka the lil search string. Exclusive with --stdin (so pick one, bestie, you can't have both πŸ’…).
  • -u, --url <URL> β€” the payload URL that receives the POST request. Required, no cap β€” you literally can't skip it.

user-webhook show <ID> β€” show a single user webhook. Just the one. By its ID ✨

user-webhook delete <ID> β€” delete a user webhook. Gone, bye πŸ‘‹

user-webhook list [options...] β€” list out your user webhooks. Options are:

  • --count <int> β€” how many webhooks to fetch.

webhook create [list] [options...] β€” create a git webhook 🌈 Options are:

  • -e, --events <strings...> β€” list of events that should trigger the webhook (GIT_PRE_RECEIVE, GIT_POST_RECEIVE). Required.
  • --stdin β€” read the query from stdin.
  • -q, --query <string> β€” the webhook query. Exclusive with --stdin.
  • -u, --url <URL> β€” the payload URL which receives the POST request. Required.

webhook show <ID> β€” show a git webhook πŸ‘€

webhook delete <ID> β€” delete a git webhook.

webhook list [repo] [options...] β€” list git webhooks. Options are:

  • --count <int> β€” number of webhooks to fetch.

🧑 hg β€” the Mercurial corner

Options are:

  • -r, --repo <string> β€” name of repository.

acl delete <ID> β€” delete an ACL entry. Poof πŸŽ€

acl list [repo] [options...] β€” list ACL entries of a repo. Defaults to current repo, iykyk. Options are:

  • --count <int> β€” number of ACL entries to fetch.

acl update <user> [options...] β€” update or add an ACL entry for user. Options are:

  • -m, --mode <string> β€” access mode to set (RW, RO).

create <name> [options...] β€” create a repository πŸ¦‹ If --clone is not used, the remote URL will be printed to stdout. Cute, right? Options are:

  • -c, --clone β€” clone repository to CWD.
  • -d, --description <string> β€” description of the repository.
  • -v, --visibility <string> β€” visibility to use (public, unlisted, private). Defaults to public.

delete [repo] [options...] β€” delete a repository. By default the current repo will be deleted 😭 Options are:

  • -y, --yes β€” confirm deletion without prompt.

list [owner] [options...] β€” list repositories. Options are:

  • --count <int> β€” number of repositories to fetch.

update [repo] [options...] β€” update a repository. By default the current repo will be updated. Options are:

  • -d, --description <description> β€” set one-line repository description.
  • --non-publishing <boolean> β€” controls whether this repository is a non-publishing repository.
  • --readme <file> β€” update the custom README settings. You can read the HTML from a file or pass "-" as the filename to read from stdin. To clear the custom README use an empty string "".
  • -v, --visibility <string> β€” visibility to use (public, unlisted, private).

user-webhook create [options...] β€” create a user webhook ✨ Options are:

  • -e, --events <strings...> β€” list of events that should trigger the webhook (REPO_CREATED, REPO_UPDATE, REPO_DELETED). Required.
  • --stdin β€” read query from stdin.
  • -q, --query <string> β€” the webhook query. Exclusive with --stdin.
  • -u, --url <URL> β€” the payload URL which receives the POST request. Required.

user-webhook show <ID> β€” show a user webhook.

user-webhook delete <ID> β€” delete a user webhook.

user-webhook list [options...] β€” list user webhooks. Options are:

  • --count <int> β€” number of webhooks to fetch.

πŸ‘‘ hub β€” projects, projects, projects

create <name> [options...] β€” create a project πŸ’– Options are:

  • -d, --description <string> β€” description of the project.
  • -t, --tags <string> β€” comma separated tags (e.g. "foo,bar").
  • -v, --visibility <string> β€” visibility to use (public, unlisted, private). Defaults to public.

update [project] [options...] β€” update a project. Options are:

  • -n, --name <string> β€” new project name.
  • -d, --description <string> β€” description of the project.
  • -w, --website <string> β€” website of the project.
  • -r, --readme <string> β€” project README repository name.
  • -t, --tags <string> β€” comma separated tags (e.g. "foo,bar").
  • -v, --visibility <string> β€” visibility to use (public, unlisted, private). Defaults to public.

delete <project> [options...] β€” delete a project πŸ’€ Options are:

  • -y, --yes β€” confirm deletion without prompt.

link <project> [options...] β€” link an existing list/repository/tracker to a project. Only one resource can be linked at a time β€” one at a time, bestie, we're not greedy 🫢 Options are:

  • -g, --gitrepo <string> β€” name of the git repository to link.
  • -m, --hgrepo <string> β€” name of the hg repository to link.
  • -l, --list <string> β€” name of the mailing list to link.
  • -t, --tracker <string> β€” name of the tracker to link.

unlink <project> [options...] β€” unlink an existing list/repository/tracker from a project. Only one resource can be unlinked at a time. Options are:

  • -g, --gitrepo <string> β€” name of the git repository to unlink.
  • -m, --hgrepo <string> β€” name of the hg repository to unlink.
  • -l, --list <string> β€” name of the mailing list to unlink.
  • -t, --tracker <string> β€” name of the tracker to unlink.

list [owner] [options...] β€” list projects 🌸 Options are:

  • --count <int> β€” number of projects to fetch.

show [project] β€” display information about a project.


πŸ’Œ lists β€” mailing list main character energy

Options are:

  • -l, --mailing-list <name> β€” select a mailing list.

By default, the mailing list configured for the current Git repository will be selected. Iconic default behaviour, tbh.

acl delete <ID> β€” delete an ACL entry.

acl list [list] [options...] β€” list ACL entries of a mailing list. Options are:

  • --count <int> β€” number of ACL entries to fetch.

acl update <user> [options...] β€” update or add an ACL entry for user. Options are:

  • -b, --browse β€” permission to browse the mailing list.
  • -r, --reply β€” permission to reply to messages in the mailing list.
  • -p, --post β€” permission to post messages to the mailing list.
  • -m, --moderate β€” permission to moderate the mailing list.
  • -y, --yes β€” confirm update without summary.

archive [list] [options...] β€” download a mailing list archive as an mbox file to stdout πŸ“ Options are:

  • -d, --days <int> β€” number of last days for which the archive should be downloaded. By default the entire archive will be selected.

create <name> [options...] β€” create a mailing list. Options are:

  • --stdin β€” read description from stdin.
  • -v, --visibility <string> β€” visibility to use (public, unlisted, private). Defaults to public.

delete [list] [options...] β€” delete a mailing list. Options are:

  • -y, --yes β€” confirm deletion without prompt.

list [owner] [options...] β€” list mailing lists. Options are:

  • --count <int> β€” number of mailing lists to fetch.

patchset apply <ID> β€” apply a patchset. Slay πŸ’…

patchset list [list] [options...] β€” list patchsets in list. Options are:

  • --count <int> β€” number of patchsets to fetch.
  • -s, --status <string> β€” filter by patchset status. By default only "PROPOSED" patchsets will be displayed. Use "" to show all patchsets.
  • -u, --user β€” list patchsets by user instead of by list.

patchset show <ID> β€” show a patchset.

patchset update <ID> β€” update a patchset. Options are:

  • -s, --status <string> β€” patchset status to set (required).

preferences show β€” show user preferences for lists.

preferences update [options...] β€” update user preferences for lists. Options are:

  • -c, --copy-self <boolean> β€” whether the user wishes to receive a copy of their own emails to mailings lists.

subscribe [list] β€” subscribe to a mailing list πŸ’–

subscriptions [options...] β€” list mailing list subscriptions. Options are:

  • --count <int> β€” number of subscriptions to fetch.

unsubscribe [list] β€” unsubscribe from a mailing list 😭

update [list] [options...] β€” update a mailing list. Options are:

  • --description β€” edit description.
  • -v, --visibility <string> β€” visibility to use (public, unlisted, private).

user-webhook create [options...] β€” create a user webhook. Options are:

  • -e, --events <strings...> β€” list of events that should trigger the webhook (LIST_CREATED, LIST_UPDATED, LIST_DELETED, EMAIL_RECEIVED, PATCHSET_RECEIVED). Required.
  • --stdin β€” read query from stdin.
  • -q, --query <string> β€” the webhook query. Exclusive with --stdin.
  • -u, --url <URL> β€” the payload URL which receives the POST request. Required.

user-webhook show <ID> β€” show a user webhook.

user-webhook delete <ID> β€” delete a user webhook.

user-webhook list [options...] β€” list user webhooks. Options are:

  • --count <int> β€” number of webhooks to fetch.

webhook create [list] [options...] β€” create a mailing list webhook 🌈 Options are:

  • -e, --events <strings...> β€” list of events that should trigger the webhook (LIST_UPDATED, LIST_DELETED, EMAIL_RECEIVED, PATCHSET_RECEIVED). Required.
  • --stdin β€” read query from stdin.
  • -q, --query <string> β€” the webhook query. Exclusive with --stdin.
  • -u, --url <URL> β€” the payload URL which receives the POST request. Required.

webhook show <ID> β€” show a mailing list webhook.

webhook delete <ID> β€” delete a mailing list webhook.

webhook list [list] [options...] β€” list mailing list webhooks. Options are:

  • --count <int> β€” number of webhooks to fetch.

🧚 meta β€” the lore about you

audit-log [options...] β€” display your audit log. The receipts, basically πŸ”₯

Options are:

  • --count <int> β€” Number of log entries to fetch.

🌸 oauth tokens

The oauth tokens command lists your personal access tokens. That's it β€” no flags, no drama, just your tokens being iconic. πŸ’…

πŸŽ€ pgp-key create [path]

Uploads a PGP public key and associates it with your account. Bestie, the public key must be in the armored format β€” armored only, no cap. πŸ” If path is not specified, it uses the default public key from your local GPG keyring. Convenient or what? πŸ’–

πŸ’€ pgp-key delete <ID>

Deletes a PGP key from your account. Poof. Use <ID> to pick the victim. 🫢

✨ pgp-key list [username] [options...]

Lists PGP public keys. You can pass a username if you're being nosy (lovingly). Options are:

  • --count <int> β€” Number of keys to fetch.
  • -r, --raw β€” Only print raw public key.

πŸ¦‹ show [username]

Shows a user's profile. If you don't give a username, it shows your profile β€” main character energy only. πŸ‘‘

🌸 ssh-key create [path]

Uploads an SSH public key and associates it with your account. If path is not specified, the default SSH public key is used. Easy. 🐚

πŸ’œ ssh-key delete <ID>

Deletes an SSH public key from your account. Bye bestie. πŸ‘‹

⭐ ssh-key list [username] [options...]

Lists SSH public keys. Optional username again. Options are:

  • --count <int> β€” Number of keys to fetch.
  • -r, --raw β€” Only print raw public key.

🌈 update [options...]

Updates your account. It's giving profile glow-up. Options are:

  • --avatar β€” Set avatar.
  • --bio β€” Edit biography.
  • --email <string> β€” Set Email address.
  • --location <string> β€” Set location.
  • --pronouns <string> β€” Set pronouns.
  • --url <string> β€” Set URL.

🧚 user-webhook create [options...]

Creates a user webhook. Options are:

  • -e, --events <strings...> β€” List of events that should trigger the webhook (PROFILE_UPDATE, PGP_KEY_ADDED, PGP_KEY_REMOVED, SSH_KEY_ADDED, SSH_KEY_REMOVED). Required.
  • --stdin β€” Read query from stdin.
  • -q, --query <string> β€” The webhook query. Exclusive with --stdin.
  • -u, --url <URL> β€” The payload URL which receives the POST request. Required.

πŸŽ€ user-webhook show <ID>

Shows a user webhook. Just point at <ID>. πŸ’…

πŸ’€ user-webhook delete <ID>

Deletes a user webhook. Gone. 🫢

✨ user-webhook list [options...]

Lists user webhooks. Options are:

  • --count <int> β€” Number of webhooks to fetch.

πŸ“„ pages

🌸 acl delete <ID>

Deletes an ACL entry. Clean slate energy. 🧹

πŸ¦‹ acl list [options...]

Lists ACL entries of a site. Options are:

  • --count <int> β€” Number of ACL entries to fetch.
  • -d, --domain <string> β€” Fully qualified domain name. Required.
  • -p, --protocol <string> β€” Protocol to use (either HTTPS or GEMINI; defaults to HTTPS).

πŸ’œ acl update <user> [options...]

Updates an ACL entry for user. Options are:

  • --id <ID> β€” ID of the site.
  • --publish β€” Permission to publish the site. Leave this flag out to remove the permission.

⭐ list [options...]

Lists registered sites. Options are:

  • --count <int> β€” Number of sites to fetch.

🌈 publish [file] [options...]

Publishes a website. 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> β€” Fully qualified domain name.
  • -p, --protocol <string> β€” Protocol to use (either HTTPS or GEMINI; defaults to HTTPS)
  • --site-config <string> β€” Path to site configuration file (for e.g. cache-control).
  • -s, --subdirectory <string> β€” If specified, only this subdirectory is updated, the rest of the site is left untouched.

🧚 unpublish [options...]

Unpublishes a website. Options are:

  • -d, --domain <string> β€” Fully qualified domain name.
  • -p, --protocol <string> β€” Protocol to use (either HTTPS or GEMINI; defaults to HTTPS)

πŸŽ€ user-webhook create [options...]

Creates a user webhook (pages edition). Options are:

  • -e, --events <strings...> β€” List of events that should trigger the webhook (SITE_PUBLISHED, SITE_UNPUBLISHED). Required.
  • --stdin β€” Read query from stdin.
  • -q, --query <string> β€” The webhook query. Exclusive with --stdin.
  • -u, --url <URL> β€” The payload URL which receives the POST request. Required.

πŸ’€ user-webhook show <ID>

Shows a user webhook. πŸ’…

✨ user-webhook delete <ID>

Deletes a user webhook. 🫢

🌸 user-webhook list [options...]

Lists user webhooks. Options are:

  • --count <int> β€” Number of webhooks to fetch.

πŸ“ paste

πŸ¦‹ create <filenames...>

Creates a new paste. Options are:

  • -v, --visibility <string> β€” Visibility to use (public, unlisted, private). Defaults to unlisted.
  • -n, --name <string> β€” Name of the created paste. Only valid when reading from stdin.

πŸ’œ delete <IDs...>

Deletes pastes. Plural. πŸ’…

⭐ list [options...]

Lists pastes. Options are:

  • --count <int> β€” Number of pastes to fetch.

🌈 show <ID>

Displays a paste. πŸ‘€

🧚 update <ID> [options...]

Updates a paste's visibility. Options are:

  • -v, --visibility <string> β€” Visibility to use (public, unlisted, private)

πŸŽ€ user-webhook create [options...]

Creates a user webhook (paste edition). Options are:

  • -e, --events <strings...> β€” List of events that should trigger the webhook (PASTE_CREATED, PASTE_UPDATED, PASTE_DELETED). Required.
  • --stdin β€” Read query from stdin.
  • -q, --query <string> β€” The webhook query. Exclusive with --stdin.
  • -u, --url <URL> β€” The payload URL which receives the POST request. Required.

πŸ’€ user-webhook show <ID>

Shows a user webhook. πŸ’…

✨ user-webhook delete <ID>

Deletes a user webhook. 🫢

🌸 user-webhook list [options...]

Lists user webhooks. Options are:

  • --count <int> β€” Number of webhooks to fetch.

βœ… todo

Options are:

  • -t, --tracker <string> β€” Name of tracker.

πŸ¦‹ acl delete <ID>

Deletes an ACL entry. 🧹

πŸ’œ acl list [tracker] [options...]

Lists ACL entries of a tracker. Options are:

  • --count <int> β€” Number of ACL entries to fetch.

⭐ acl update <user> [options...]

Updates or adds an ACL entry for user. Options are:

  • -b, --browse β€” Permission to browse tickets.
  • -s, --submit β€” Permission to submit new tickets.
  • -c, --comment β€” Permission to comment on tickets.
  • -e, --edit β€” Permission to edit tickets.
  • -g, --triage β€” Permission to triage tickets.
  • -y, --yes β€” Confirm update without summary.

🌈 create <name> [options...]

Creates a tracker. Options are:

  • --stdin β€” Read description from stdin.
  • -v, --visibility <string> β€” Visibility to use (public, unlisted, private). Defaults to public.

🧚 delete [tracker] [options...]

Deletes a tracker. Options are:

  • -y, --yes β€” Confirm deletion without prompt.

πŸŽ€ label create <name> [options...]

Creates a label. Options are:

  • -b, --background β€” Background color in hex format (required).
  • -f, --foreground β€” Foreground color in hex format. If omitted either black or white will be selected for an optimized contrast.

πŸ’€ label delete <name>

Deletes a label. 🫢

✨ label list [options...]

Lists labels. Options are:

  • --count <int> β€” Number of labels to fetch.

🌸 label update <name> [options...]

Updates a label. Options are:

  • -b, --background β€” Background color in hex format.
  • -f, --foreground β€” Foreground color in hex format.
  • -n, --name β€” New label name.

πŸ¦‹ list [owner] [options...]

Lists trackers. Options are:

  • --count <int> β€” Number of trackers to fetch.

πŸ’œ preferences show

Shows user preferences for trackers. No flags, just your vibe. πŸ’…

⭐ preferences update [options...]

Updates user preferences for trackers. Options are:

  • -n, --notify-self <boolean> β€” Whether the user wishes to be notified of their own actions.

🌈 subscribe [tracker]

Subscribes to a tracker. 🫢

🧚 ticket assign <ID> [options...]

Assigns a user to a ticket. Options are:

  • -u, --user β€” Username of the new assignee (required).

πŸŽ€ ticket comment <ID> [options...]

Comments on a ticket. Options are:

  • -r, --resolution β€” Resolution for resolved tickets. If status is omitted, it will be set to RESOLVED.
  • -s, --status β€” New ticket status. If set to RESOLVED, resolution will default to CLOSED.
  • --stdin β€” Read comment from stdin.

πŸ’€ ticket create [options...]

Creates a new ticket. Options are:

  • --stdin β€” Read ticket from stdin.

✨ ticket delete <ID> [options...]

Deletes a ticket. Options are:

  • -y, --yes β€” Confirm deletion without prompt.

🌸 ticket edit <ID> [options...]

Edits a ticket. Options are:

  • --stdin β€” Read ticket from stdin.

πŸ¦‹ ticket label <ID> [options...]

Adds a label to a ticket. Options are:

  • -l, --label <name> β€” Name of the label (required).

πŸ’œ ticket list [options...]

Lists tickets. Options are:

  • --count <int> β€” Number of tickets to fetch.
  • -s, --status <string> β€” Filter by ticket status. By default only open tickets will be displayed. Use "" to show all tickets.

⭐ ticket show <ID> [options...]

Displays a ticket. Options are:

  • --web β€” Open in browser.

🌈 ticket subscribe <ID>

Subscribes to a ticket. πŸ’…

🧚 ticket unassign <ID> [options...]

Unassigns a user from a ticket. Options are:

  • -u, --user β€” Username of the assignee (required).

πŸŽ€ ticket unlabel <ID> [options...]

Removes a label from a ticket. Options are:

  • -l, --label <name> β€” Name of the label (required).

πŸ’€ ticket unsubscribe <ID>

Unsubscribes from a ticket. 🫢

✨ ticket update-status <ID> [options...]

Updates status of a ticket. Options are:

okay bestie, last two options for that one and then we're entering the webhook era of our lives πŸ’…

  • -r, --resolution β€” the resolution you're slapping on resolved tickets. it's required if you're using status RESOLVED, and here's the lil plot twist: if you just... don't pass status at all, it sets it to RESOLVED for you. sneaky. iconic. πŸŽ€
  • -s, --status β€” the new ticket status. that's the whole thing. slay.

ticket webhook create <ID> [options...]

okay so this one makes a ticket webhook. yes bestie, a whole webhook, just for tickets ✨

options are giving:

  • -e, --events <strings...> β€” the list of events that should trigger the webhook: EVENT_CREATED, TICKET_UPDATE, TICKET_DELETED. required β€” no events, no webhook, no vibes.
  • --stdin β€” read the query from stdin. very "i'll pipe it in myself" of you 🫢
  • -q, --query <string> β€” the webhook query. exclusive with --stdin β€” pick one, you can't have both, that's the rule bestie.
  • -u, --url <URL> β€” the payload URL that receives the POST request. required πŸ’Œ

ticket webhook delete <ID>

delete a ticket webhook. bye bye πŸ‘‹πŸ’€

ticket webhook list <ID> [options...]

list ticket webhooks. options:

  • --count <int> β€” number of webhooks to fetch. wanna see less? say less.

unsubscribe [tracker]

unsubscribe from a tracker. it's giving "i'm removing myself from the group chat" energy πŸ™ˆ

update [tracker] [options...]

update a tracker. options:

  • --description β€” edit description. glow-up time πŸ’–
  • -n, --name <string> β€” new tracker name.
  • -v, --visibility <string> β€” visibility to use (public, unlisted, private). choose your main character setting ✨

user-webhook create [options...]

create a user webhook. options, bestie:

  • -e, --events <strings...> β€” the list of events that should trigger the webhook: TRACKER_CREATED, TRACKER_UPDATE, TRACKER_DELETED, TICKET_CREATED. required.
  • --stdin β€” read query from stdin.
  • -q, --query <string> β€” the webhook query. exclusive with --stdin.
  • -u, --url <URL> β€” the payload URL which receives the POST request. required πŸ’Œ

user-webhook show <ID>

show a user webhook. look at it. appreciate it. 🌸

user-webhook delete <ID>

delete a user webhook. gone, reduced to atoms πŸ’€

user-webhook list [options...]

list user webhooks. options:

  • --count <int> β€” number of webhooks to fetch.

webhook create [tracker] [options...]

create a tracker webhook. options:

  • -e, --events <strings...> β€” the list of events that should trigger the webhook: TRACKER_UPDATE, TRACKER_DELETED, LABEL_CREATED, LABEL_UPDATE, LABEL_DELETED, TICKET_CREATED, TICKET_UPDATE, TICKET_DELETED, EVENT_CREATED. required πŸ”₯
  • --stdin β€” read query from stdin.
  • -q, --query <string> β€” the webhook query. exclusive with --stdin.
  • -u, --url <URL> β€” the payload URL which receives the POST request. required.

webhook show <ID>

show a tracker webhook. ✨

webhook delete <ID>

delete a tracker webhook.

webhook list [tracker] [options...]

list tracker webhooks. options:

  • --count <int> β€” number of webhooks to fetch. that's it, that's the option πŸŽ€

🌸 CONFIGURATION 🌸

first things first bestie: generate a new OAuth2 access token over on meta.sr.ht. and real talk β€” many commands use helper functions that require the PROFILE:RO grant of their respective service, so don't be surprised when it wants that.

on startup, hut goes looking for a file at $XDG_CONFIG_HOME/hut/config on Unix. if $XDG_CONFIG_HOME isn't set, it defaults to ~/.config/. on Darwin/macOS the file lives at $HOME/Library/Application Support/hut/config. iykyk πŸ“

instance "sourcehut" {
    # Set the origin/common domain for the instance.
    origin "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"
    }
}

πŸŽ€ Project configuration file πŸŽ€

so the project config file is a top-level file called .hut.scfg sitting in a repository, and that's where the assosciated tracker and development mailing list get specified. these resources get used whenever a command is called that needs a tracker/mailing list and none is explicitly set β€” it just... knows. lowkey psychic behavior πŸ’…

and there's more: you can configure that patches should contain the repository name in their prefix. also, the hut git clone command will configure a freshly cloned repository to make contributing easier. considerate king πŸ‘‘

tracker https://todo.sr.ht/~xenrox/hut
development-mailing-list ~xenrox/hut-dev@lists.sr.ht
patch-prefix false

πŸ‘‘ AUTHORS πŸ‘‘

originally written by Simon Ser <contact@emersion.fr>. currently maintained by Thorben GΓΌnther <admin@xenrox.net>, who is assisted by other open-source contributors. for more info about hut development, see <https://sr.ht/~xenrox/hut>.

periodt. that's the whole page bestie, go forth and webhook responsibly πŸ’–

this lil masterpiece is from 2026-10-20, and you can find it filed under hut(1) β€” like, the whole thing, all four parts. mwah 🫢✨
πŸ“¦ where this page comes from