Skip to content
zoryn/ maintainer-assistant

zoryn gitery

zoryn gitery wraps gitery, the ALT Linux git hosting server: browsing repositories, commit history, the file tree and file contents, plus the administrative operations that used to require ssh gitery <verb> by hand.

Two backends

The read commands (ls, find-package, log, commit, diff, refs, branches, tags, tree, cat) go through the gitoskop HTTP API (https://git.altlinux.org/gitoskop/api by default), which is faster than SSH. ls and find-package fall back to ssh gitery ls / ssh gitery find-package when the API request fails, printing a warning first. For ls, the fallback only kicks in for roots the ssh ls can browse (people, gears, srpms); gitoskop-only roots such as tasks (and the virtual packages) surface the gitoskop error directly instead of a misleading ssh "not in allowed tree" message.

Every other command (quota, clone, charset, default-branch, init-db, repack, mv-db, rm-db) talks to the server over ssh gitery <verb> — either because it needs write access or because gitoskop has no equivalent endpoint.

Repository addressing

Every subcommand that takes a REPO (or DIR/SRC/DST) argument resolves it the same way:

  • A bare name (no /, e.g. dune) expands to people/<login>/packages/<name>, where <login> comes from [gitery] login in ~/.zoryn. Bare names error out if login is not set.
  • Without -n, an argument containing a / is taken as a full path from the server root (e.g. people/iv/packages/dune.git or packages/gears/d/dune).
  • A leading / always means an absolute path from the root; it is stripped and any -n is ignored (the escape hatch for a fully-qualified path, e.g. -n packages /people/x/y resolves to people/x/y).
  • -n/--namespace NS makes NS the parent for any relative argument (one without a leading /), whether a bare name or a multi-segment sub-path: -n gears/d with dunegears/d/dune.git, and -n packages with gears/kpackages/gears/k. It replaces the default people/<login>/packages parent and does not require login.

For repository commands — every subcommand above except ls, init-db and mv-db — the resolver appends a .git suffix whenever it's missing, regardless of whether the argument was a bare name, an -n-namespaced name, or a full /-containing path: dune becomes people/<login>/packages/dune.git, and /people/x/packages/bar becomes people/x/packages/bar.git. The one exception is a task's gear repository tasks/<id>/gears/<n>/git, whose repo directory is literally named git: it is left untouched so it doesn't become a broken git.git. ls, init-db and mv-db address plain directories on the server and never add .git.

Paging

When stdout is a terminal, the pretty (human) output of the read commands (ls, log, commit, diff, refs, branches, tags, tree, find-package) is shown through your pager ($PAGER, default less), just like git. Output that fits one screen is printed and control returns immediately; piping or redirecting (| cat, > file) prints it straight through without a pager. The --json body is never paged, so it stays machine-readable. (cat prints raw file content directly and is not paged.)

JSON output

Every read command accepts --json, printing the raw gitoskop API response body instead of the default pretty-printed table/text. cat has no --json — it always prints the raw file content.

Debug output

Every subcommand accepts -d/--debug, which logs each request it sends to stderr — the HTTP GET URLs for API reads and the SSH commands for server verbs. Useful to see exactly which resolved path a bare name maps to:

$ zoryn gitery log xfsprogs --limit 1 -d
gitery: GET https://git.altlinux.org/gitoskop/api/people/<login>/packages/xfsprogs.git
gitery: GET https://git.altlinux.org/gitoskop/api/people/<login>/packages/xfsprogs.git/log/sisyphus?limit=1

Confirmation on mutating verbs

init-db, repack, mv-db, rm-db, and charset/default-branch when given a value to set ask for confirmation before running, unless -y/--yes is passed. charset/default-branch invoked with no value (read-only) never prompt. On a non-interactive session (no TTY) without --yes, the command aborts with a warning instead of silently defaulting to "no".

Shell completion

With the shell completion installed, gitery completes live from the server:

  • the REPO/PATH argument completes a bare name against the gitoskop search API (zoryn gitery log xfspr<TAB>people/<login>/packages/xfsprogs.git), and — once a / is typed or a -n namespace is set — navigates the server tree one segment at a time (zoryn gitery ls -n tasks 426<TAB>426179/, 426180/, … then 426180/ge<TAB>426180/gears/, and so on to the repository). Sub-directories complete with a trailing / so the next segment can be completed without a space;
  • the REF argument (log, tree, cat, default-branch) completes the branches and tags of the repository already on the line;
  • -n/--namespace completes the server's top-level root labels, fetched live from the gitoskop API (currently packages, people, tasks).

Completion is best-effort with a short timeout, so it never hangs the shell if the API is slow or unreachable.

Configuration

[gitery]
login = "rider"

[gitoskop]
url = "https://git.altlinux.org/gitoskop/api"

See configuration for details and defaults.

Repository browsing (gitoskop API)

zoryn gitery ls

List a directory (default: people/<login>/packages), or the contents of a repository when the path ends in .git.

For a directory, each repository shows its on-disk size and last-commit date; sub-directories are shown with a trailing / and no size or date:

750 MB  2019-07-03  389-ds-base.git
  2 MB  2018-11-01  389-dsgw.git
     -           -  public/

For a .git path, the repository's file tree at its default branch is shown (the same output as zoryn gitery tree <repo> <default-branch>); append a sub-path after the .git to descend into a directory:

$ zoryn gitery ls people/iv/packages/dune.git
drwxr-xr-x          -  .gear
-rw-r--r--  258 bytes  meson.build
drwxr-xr-x          -  src

$ zoryn gitery ls people/iv/packages/dune.git/.gear
-rw-r--r--    9 KB  dune.spec
-rw-r--r--  118 bytes  rules

A path that turns out to be a repository even without a .git suffix (e.g. a task's gear repo tasks/<id>/gears/<n>/git) is detected too and shown as a tree, not an error.

A directory listing keeps the server's order by default. -S/--sort reorders it by a single key — name, size or date (last commit) — and -r/--reverse flips the order to descending:

zoryn gitery ls --sort=size                 # smallest repos first
zoryn gitery ls --sort=size --reverse       # largest repos first
zoryn gitery ls -S date people/iv/packages  # oldest last-commit first

Sorting applies to the human listing only; --json always returns the raw API order.

zoryn gitery ls
zoryn gitery ls people/iv/packages
zoryn gitery ls people/iv/packages/dune.git
zoryn gitery ls people/iv/packages/dune.git/.gear
zoryn gitery ls --json people/iv/packages
  • -n, --namespace=NS — namespace parent for bare names.
  • -S, --sort=KEY — order a directory listing by name, size or date.
  • -r, --reverse — sort in descending order (largest, newest or last first).
  • --json — output raw API JSON.

zoryn gitery find-package

Search gitery repository paths matching a pattern.

zoryn gitery find-package dune
zoryn gitery find-package -n packages dune
zoryn gitery find-package --json dune
  • -n, --namespace NS — restrict results to repository paths under NS/… (e.g. packages, people, tasks), the same roots as gitery ls -n.
  • --json — output raw API JSON.

The gitoskop API returns at most 200 hits per request. For broad patterns that match more, zoryn keeps fetching the next page as you scroll the pager, so the full result set is available without a server-side truncation to 50 — up to a client cap of 10 000 matches. When the pattern matches more than that, a showing N of TOTAL matches (capped at 10000) note is printed after the pager closes. With --json the paged-together results are emitted as a single { "results": [...], "total": N } object.

-n/--namespace filters client-side (the search API has no namespace parameter): zoryn scans the matches and keeps those under the chosen root. When a namespace is set and the scan hits the client cap, the note reads scanned N of TOTAL matches (capped at 10000); M under NS.

zoryn gitery log

List commit history of a repository, reachable from REF. When REF is omitted, the repository's default branch is used (the API does not resolve the symbolic HEAD). Each commit is shown in git log style — full oid, author, date and subject. Refs pointing at a commit are shown in parentheses after the oid, like git log --decorate (HEAD -> master, tag: …):

zoryn gitery log dune
zoryn gitery log dune sisyphus --limit 20
zoryn gitery log dune --oneline
commit 55fd7f35ca4fbd8d4493dacc90f6d3a716c16ab0 (HEAD -> master, tag: 1.5.2-alt1)
Author: Dmitrii Fomchenkov <sirius@altlinux.org>
Date:   2026-07-21

    - new version

With --oneline, each commit is a single <short-oid> <subject> line, decorations included (like git log --oneline --decorate):

55fd7f35ca (HEAD -> master, tag: 1.5.2-alt1) - new version
9e5f096ae5 Merge tag 'v1.5.2' into sisyphus

On a terminal the history is colourised like git log --decorate — the oid in yellow, HEAD in cyan, branches in green and tags in yellow — and shown through your pager (see Paging). Colour is disabled when the output is piped or redirected, or when NO_COLOR is set.

  • -n, --namespace=NS — namespace parent for bare names.
  • --oneline — one <short-oid> <subject> line per commit.
  • --limit=N — maximum number of commits to show.
  • --offset=N — number of commits to skip.
  • --json — output raw API JSON.

zoryn gitery commit

Show a single commit: header, parents, and file diff-stat.

zoryn gitery commit dune a486430311f40440ee89ed43c0a60a3379dbe3ad
  • -n, --namespace=NS — namespace parent for bare names.
  • --json — output raw API JSON.

zoryn gitery show

Show a single commit in git show style: the commit header and full message, followed by the unified diff against the first parent. REV is a commit oid, tag or branch; when omitted, the repository's default branch is used (the API does not resolve the symbolic HEAD).

zoryn gitery show dune
zoryn gitery show dune a486430
zoryn gitery show dune 3.24.0-alt1
commit a6b64c15dede3e7573443442a2a1687b4ff5c915
Author: Anton Farygin <rider@altlinux.org>
Date:   2026-06-27

    3.24.0-alt1

    - 3.23.1 -> 3.24.0

diff --git a/.gear/dune.spec b/.gear/dune.spec
--- a/.gear/dune.spec
+++ b/.gear/dune.spec
@@ -31,7 +31,7 @@
-Version: 3.23.1
+Version: 3.24.0

On a terminal the header is colourised like git log --decorate and the patch like git diff, and the whole thing is shown through your pager (see Paging); colour is disabled when the output is piped or redirected, or when NO_COLOR is set.

  • -n, --namespace=NS — namespace parent for bare names.
  • --json — output raw API JSON.

zoryn gitery diff

Show a file diff-stat summary, or the raw patch, for a commit range.

zoryn gitery diff dune abc60b5..a486430
zoryn gitery diff dune abc60b5..a486430 --patch

--patch prints the unified diff text instead of the diff-stat summary. On a terminal it is colourised exactly like git diff — file/index meta lines bold, hunk headers cyan, additions green, deletions red — and shown through your pager (see Paging); colour is disabled when the output is piped or redirected, or when NO_COLOR is set. If both --patch and --json are given, --patch wins: the patch is printed and --json is ignored.

  • -n, --namespace=NS — namespace parent for bare names.
  • --patch — show the raw unified diff instead of a file summary.
  • --json — output raw API JSON.

zoryn gitery refs

List all refs (branches and tags) of a repository.

zoryn gitery refs dune
zoryn gitery refs people/iv/packages/dune.git --json
  • -n, --namespace=NS — namespace parent for bare names.
  • --json — output raw API JSON.

zoryn gitery branches

List the branches of a repository.

zoryn gitery branches dune
zoryn gitery branches people/iv/packages/dune.git --json
  • -n, --namespace=NS — namespace parent for bare names.
  • --json — output raw API JSON.

zoryn gitery tags

List the tags of a repository.

zoryn gitery tags dune
zoryn gitery tags people/iv/packages/dune.git --json
  • -n, --namespace=NS — namespace parent for bare names.
  • --json — output raw API JSON.

zoryn gitery tree

List tree entries at a path of a ref (default path: repository root). Each entry shows an ls -l-style mode and its name; file sizes are shown as - because the API does not report per-entry sizes.

zoryn gitery tree dune sisyphus
zoryn gitery tree dune sisyphus src
drwxr-xr-x  -  .gear
-rw-r--r--  -  meson.build
drwxr-xr-x  -  src
  • -n, --namespace=NS — namespace parent for bare names.
  • --json — output raw API JSON.

zoryn gitery cat

Print the raw content of a file. REF is optional — omit it to read from the repository's default branch:

zoryn gitery cat dune Makefile           # default branch
zoryn gitery cat dune sisyphus Makefile  # explicit ref

Two positional arguments are read as REPO PATH, three as REPO REF PATH.

  • -n, --namespace=NS — namespace parent for bare names.

Server administration (SSH)

zoryn gitery quota

Show the caller's gitery storage quota.

zoryn gitery quota

zoryn gitery clone

Clone a repository on the gitery server (server-side clone, not a local git clone).

zoryn gitery clone dune
zoryn gitery clone dune mydir
  • -n, --namespace=NS — namespace parent for bare names.

zoryn gitery charset

With CHARSET omitted, print the current charset of a repository. With CHARSET given, set it (asks for confirmation unless --yes).

zoryn gitery charset dune
zoryn gitery charset dune UTF-8 --yes
  • -n, --namespace=NS — namespace parent for bare names.
  • -y, --yes — skip the confirmation prompt (only relevant when setting).

zoryn gitery default-branch

With BRANCH omitted, print the current default branch of a repository. With BRANCH given, set it (asks for confirmation unless --yes).

zoryn gitery default-branch dune
zoryn gitery default-branch dune master --yes
  • -n, --namespace=NS — namespace parent for bare names.
  • -y, --yes — skip the confirmation prompt (only relevant when setting).

zoryn gitery init-db

Initialize a new bare repository on the gitery server (asks for confirmation unless --yes).

zoryn gitery init-db newpkg --yes
  • -n, --namespace=NS — namespace parent for bare names.
  • -y, --yes — skip the confirmation prompt.

zoryn gitery repack

Repack a repository on the gitery server, optionally passing an extra repack option (asks for confirmation unless --yes).

zoryn gitery repack dune
zoryn gitery repack dune aggressive --yes
  • -n, --namespace=NS — namespace parent for bare names.
  • -y, --yes — skip the confirmation prompt.

zoryn gitery mv-db

Move/rename a repository directory on the gitery server (asks for confirmation unless --yes).

zoryn gitery mv-db old new --yes
  • -n, --namespace=NS — namespace parent for bare names.
  • -y, --yes — skip the confirmation prompt.

zoryn gitery rm-db

Permanently delete a repository from the gitery server (asks for confirmation unless --yes). This cannot be undone.

zoryn gitery rm-db people/x/packages/gone.git --yes
  • -n, --namespace=NS — namespace parent for bare names.
  • -y, --yes — skip the confirmation prompt.