LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

hut

CLI for SourceHut services

TLDR

Set up hut's configuration (prompts for an OAuth2 access token)
$ hut init
copy
List your Git repositories
$ hut git list
copy
Create a new Git repository
$ hut git create [repo-name]
copy
List build jobs
$ hut builds list
copy
List issue trackers
$ hut todo list
copy
Create a paste from a file
$ hut paste create [file]
copy

SYNOPSIS

hut service command [options]

DESCRIPTION

hut is the official command-line client for SourceHut (sr.ht) services. It provides access to builds, Git and Mercurial repositories, issue trackers, mailing lists, pastes, static site hosting, and account management, all backed by each service's GraphQL API.Commands follow a hut service command pattern, so most operations map directly onto one of the sr.ht services. The graphql subcommand also allows running arbitrary GraphQL queries against any service for tasks not otherwise covered.

PARAMETERS

SERVICE

SourceHut service to operate on.
COMMAND
Command within that service (commonly list, create, show, update, delete).
builds
Manage build jobs on builds.sr.ht.
git
Manage Git repositories on git.sr.ht.
hg
Manage Mercurial repositories on hg.sr.ht.
lists
Manage mailing lists and patchsets on lists.sr.ht.
meta
Manage account settings, SSH/PGP keys, and profile info.
pages
Publish static websites to pages.sr.ht.
paste
Create and share text pastes on paste.sr.ht.
todo
Manage issue trackers and tickets on todo.sr.ht.
graphql
Run a raw GraphQL query against a given service.
init
Set up hut's configuration file with an OAuth2 token.
export / import
Back up or restore account data.
--config FILE
Use a specific configuration file.
--instance NAME
Select which sr.ht instance to use.
--debug
Print the underlying GraphQL requests to stderr.

INSTALL

sudo apt install hut
copy
sudo dnf install hut
copy
sudo pacman -S hut
copy
sudo apk add hut
copy
sudo zypper install hut
copy
brew install hut
copy
nix profile install nixpkgs#hut
copy

CAVEATS

Requires a SourceHut account and an OAuth2 access token, configured via hut init. Available services and their subcommands vary by sr.ht instance and hut version; run hut help or hut service --help to see what's supported locally.

HISTORY

hut is the official CLI for SourceHut (sr.ht), a lightweight, privacy-focused software development platform created by Drew DeVault. It is written in Go and replaced earlier ad-hoc scripts for scripting SourceHut services from the command line.

SEE ALSO

git(1), gh(1), hub(1)

Copied to clipboard
Kai