Simple forgejo API client
  • Go 99.9%
  • Makefile 0.1%
Find a file
Heiko Schlittermann (HS12-RIPE) 59dd4f0369
All checks were successful
nagonag (Push) / nagonag (push) Successful in 3m8s
Merge branch 'master' of https://git.schlittermann.de/heiko/fj
* 'master' of https://git.schlittermann.de/heiko/fj: (92 commits)
  tidy: drop stuttering 'editor:' prefix from stdout guard ai:claude-sonnet-4-5
  refuse editor session when stdout is not a terminal ai:claude-sonnet-4-5
  feat: add --version flag and version subcommand
  rm the binary
  docs: Document re-edit validation feature and regenerate man pages ai:claude-3.5-sonnet
  feat: Wire re-edit validation loop into PR create ai:claude-3.5-sonnet
  feat: Add interactive edit mode to issue edit ai:claude-3.5-sonnet
  feat: Wire re-edit validation loop into issue create ai:claude-3.5-sonnet
  test: editor_validation comprehensive test suite ai:claude-3.5-sonnet
  feat: add editor_validation engine with validation types and functions ai:claude-3.5-sonnet
  feat: add FetchAssignees to api.Client ai:claude-3.5-sonnet
  feat: add openEditorAtLine with +N POSIX line-positioning ai:claude-3.5-sonnet
  refactor: migrate parseIssueTemplate to IssueTemplateResult struct; wire assignees ai:claude-3.5-sonnet
  enhance: Improve editor templates with sensible defaults and documentation ai:claude-3.5-sonnet
  feat: Add issue deadline command ai:claude-3.5-sonnet
  feat: Add issue delete command ai:claude-3.5-sonnet
  pi-agent: Task E1: enhance list/create/edit
  feat: enhance `issue list/create/edit` with filters and deadline support ai:claude-3.5-sonnet
  pi-agent: Task N9: issue search
  feat: add `issue search` command ai:claude
  ...
2026-06-02 12:47:40 +02:00
.forgejo/workflows fix runner names 2026-05-18 17:59:59 +02:00
.generated docs: Document re-edit validation feature and regenerate man pages ai:claude-3.5-sonnet 2026-05-24 22:19:56 +02:00
assets Move SVG banner to assets/ for proper rendering 2026-05-15 16:17:36 +02:00
docs docs: Document re-edit validation feature and regenerate man pages ai:claude-3.5-sonnet 2026-05-24 22:19:56 +02:00
internal Merge branch 'master' of https://git.schlittermann.de/heiko/fj 2026-06-02 12:47:40 +02:00
.gitignore build: embed fj.1.gz and decompress on the fly 2026-05-18 22:16:08 +02:00
.gogogo.conf packaging: fix man page files 2026-05-18 21:56:21 +02:00
CLAUDE.md docs: add CLAUDE.md for Claude Code guidance 2026-05-18 22:20:42 +02:00
go.mod deps(master): update minor/patch dependencies 2026-05-18 16:02:02 +00:00
go.sum deps(master): update minor/patch dependencies 2026-05-18 16:02:02 +00:00
LICENSE Add tests, Apache-2.0 license, and README 2026-05-15 16:06:21 +02:00
main.go build: embed fj.1.gz and decompress on the fly 2026-05-18 22:16:08 +02:00
main_test.go add license files 2026-05-17 22:11:00 +02:00
Makefile add Makefile as convenience wrapper for go build / go generate 2026-05-18 08:31:48 +02:00
README.md remove Makefile, use go generate as the single workflow 2026-05-18 08:29:57 +02:00
VERIFICATION_REPORT.md refactor: migrate parseIssueTemplate to IssueTemplateResult struct; wire assignees ai:claude-3.5-sonnet 2026-05-24 22:12:13 +02:00

fj — forgejo/gitea from the terminal

fj

A minimal Forgejo/Gitea CLI client. Manage issues and pull requests without leaving the terminal.

Features

  • Issue management: list, show, create, edit, comment
  • Pull request management: list, show, create, edit
  • Auto-detects repo from git remote (SSH and HTTPS)
  • Credential resolution via git credential
  • Raw JSON output (--json) for scripting
  • Installs as git-fj for use as a git subcommand
  • Symlink as git-issues or git-prs for quick listing

Install

go install go.schlittermann.de/heiko/fj@latest

Place fj in $PATH. To use it as a git subcommand, add a symlink:

ln -s fj ~/bin/git-fj   # enables: git fj issue list

Usage

git fj issue list                     # open issues
git fj issue list --state closed      # closed issues
git fj issue show 42                  # issue details
git fj issue create --title "bug"     # new issue
git fj issue edit 42 --state closed   # close issue
git fj issue comment 42 --body "fix"  # add comment

git fj pr list                        # open PRs
git fj pr show 7                      # PR details
git fj pr create --title "feat" --head dev
git fj pr edit 7 --state closed

git fj workflow init nagonag          # scaffold .forgejo/workflows/*.yaml
git fj workflow init nagonag --ref v1 # pin a source ref
git fj workflow init nagonag --force  # overwrite local edits

git fj issue list --json | jq '.[].title'

Symlink shortcuts:

ln -s fj ~/bin/git-issues
ln -s fj ~/bin/git-prs
git issues              # same as: fj issue list
git prs                 # same as: fj pr list

Display the built-in manual page:

fj man

Configuration

fj reads configuration from git config:

git config fj.token <your-api-token>    # API token (optional if git credential works)
git config fj.remote upstream           # override remote detection (default: current branch remote, then origin)

Token resolution order:

  1. git config fj.token
  2. git credential fill for the remote host
  3. git credential fill after following redirects

Development

The man page source is docs/fj.1.md (pandoc Markdown). After editing it, regenerate and commit the derived files:

go generate ./...   # requires pandoc; regenerates fj.1, fj.1.gz, git-fj.1, git-fj.1.gz
git add docs/fj.1.md fj.1 fj.1.gz git-fj.1 git-fj.1.gz
git commit

The generated files are committed — fj.1 must be present at build time because it is embedded in the binary.

License

Apache-2.0. See LICENSE.