Commit dd06e80a07

dd06e80a071d451ebb7b083363e0580550481114

parent: d62f20728d

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-24 04:20 UTC

docs: terminal output rules, sshd note, changelog

Closes #254
.gitbay/wiki/Admin.org +4
@@ -39,6 +39,10 @@ the unit's =AmbientCapabilities=CAP_NET_BIND_SERVICE= covers ports
3939 sshd requires that binary to be root-owned and not group/world
4040 writable. Unknown keys fail authentication inside sshd, so system mode
4141 requires =registration.mode = "closed"= (check-config enforces this).
42 Under the forced command the CLI's leading =--term=<cols>[,color]=
43 argument works as is; a client that sets =GITBAY_TERM= instead needs
44 =AcceptEnv GITBAY_TERM= in =sshd_config=, since that env request is
45 handled by the host's sshd, not gitbayd.
4246
4347* Configuration reference
4448
.gitbay/wiki/Users.org +40 −4
@@ -727,10 +727,9 @@ terminal, and follows these rules so every noun reads the same way.
727727
728728- A list command prints one row per item, tab-separated, no header.
729729 Columns run identifier, state, then description; a trailing column
730 may carry a word (=due 2027-01-01=, =via team=). The =gitbay= CLI pads
731 the tabs into aligned columns when stdout is a terminal and leaves
732 them as tabs when piped, so =cut -f= sees the same bytes stock ssh
733 prints. Under =--json= nothing is touched.
730 may carry a word (=due 2027-01-01=, =via team=). Piped, a timestamp in
731 a row is RFC3339 to the second, UTC. Under =--json= nothing is
732 touched.
734733- An empty list prints nothing on stdout and =nothing to list= on
735734 stderr.
736735- A mutation prints one line: verb, object, identifier
@@ -748,6 +747,43 @@ terminal, and follows these rules so every noun reads the same way.
748747 something to them (a key, a member, a label on an issue), =set= for
749748 a value, =revoke= for a credential, =show= and =list= for reads.
750749
750** At a terminal
751
752The =gitbay= CLI sends a leading =--term=<cols>[,color]= argument on
753the SSH command line when stdout is a terminal (OpenSSH's multiplexed
754sessions, which the CLI uses, do not forward a session's =SetEnv=).
755The server strips =--term=<v>= wherever it appears in the argument
756list. The server then prints:
757
758- lists under a header, padded, fitted to the width (the title or
759 description column is cut with =…= first), states in colour, ages as
760 =2h ago=, and the next page as a command on stderr (piped output
761 keeps a =next\t<cursor>= row instead);
762- =show= views with a title line, aligned fields, the body rendered
763 from markdown or org, one line per event, and comments under a rule;
764 a sub-table (labels, revisions, and the like) carries a section label
765 line in both terminal and piped output; timestamps as
766 =2026-09-23 23:26 UTC=. =wiki show= piped prints the page source
767 verbatim; the rendered page is terminal-only;
768- help with flag descriptions, defaults, and examples; =gitbay --help=
769 groups commands under WORK, REPOSITORIES, YOU and INSTANCE;
770 =help --json= adds =flags= and =examples=.
771
772=NO_COLOR=, =TERM=dumb= and =--no-color= drop the colour. =show=,
773=diff= and =log= at a terminal go through =$GITBAY_PAGER=, else
774=$PAGER=, else =less= (with =LESS=FRX= when =LESS= is unset); an empty
775=GITBAY_PAGER= turns paging off. Paging never applies to =--follow=,
776=--json=, or piped output.
777
778Stock ssh without the CLI's multiplexing gets the plain output unless
779it passes the same leading argument or sets the environment variable
780sshd is told to accept:
781
782#+begin_src sh
783ssh git@gitbay.org --term=120,color issue list krz/gitbay
784ssh -o SetEnv=GITBAY_TERM=120,color git@gitbay.org issue list krz/gitbay
785#+end_src
786
751787* Scripting
752788
753789Every read command takes =--json= and emits one envelope:
CHANGELOG.org +30
@@ -4,6 +4,36 @@ Versioning follows semver from v0.1.0. Database migrations run
44automatically on daemon start; upgrade notes appear per release when
55anything beyond "replace the binary and restart" is needed.
66
7* v1.36.0 — 2026-09-23
8
9Terminal output for the CLI (#254).
10
11- At a terminal, lists print under a header, fitted to the width, with
12 states in colour and relative ages; the next page is a command on
13 stderr. Piped output keeps the same tab-separated rows, with
14 timestamps as RFC3339 to the second; =repo log= rows are
15 tab-separated (were fixed-width) and =repo settings show= keys print
16 as fields (=require mr=, not =require_mr:=).
17- =show= commands print a title line, aligned fields, the body
18 rendered from markdown or org, events one per line and comments
19 under a rule, through a pager when longer than the screen.
20- Help describes every flag, with defaults and examples, and
21 =gitbay --help= groups the commands under WORK, REPOSITORIES, YOU
22 and INSTANCE. =help --json= adds =flags= and =examples=.
23- =release list= takes =--limit= and =--cursor=, and leaves the title
24 empty when it repeats the tag. =mr revisions='s one-revision note
25 moved to stderr. =notifications device add= prints =registered
26 device <n>=. =dashboard= prints =none= under an empty section.
27
28The CLI sends a leading =--term=<cols>[,color]= argument on the SSH
29command line, since OpenSSH's multiplexed sessions do not forward a
30session's =SetEnv=; the server strips it wherever it appears. Stock
31ssh opts in with =ssh git@gitbay.org --term=120,color issue list
32krz/gitbay= or =-o SetEnv=GITBAY_TERM=120,color=. Operators running
33the system-sshd forced command add =AcceptEnv GITBAY_TERM= to
34=sshd_config= for the =SetEnv= form; the =--term= argument needs no
35sshd configuration.
36
737* v1.35.1 — 2026-09-23
838
939The landing page's recording (#253).