fjo · Forgejo CLI
Work with Forgejo from your terminal.
An alternative to GitHub CLI (gh) for Forgejo instances: the same command style, flags,
JSON output and exit codes where Forgejo supports the feature, with Forgejo-native
semantics where it differs.
Quick start
go install github.com/maymeow/fjo/cmd/fjo@latest
fjo auth login --hostname forgejo.example.com
fjo issue list- Version
- 0.2.0
- License
- MIT
- Forgejo
- 15 · 17
- Platforms
- Linux · macOS · Windows
- Commands
- auth · repo · issue · pr · release · api
Install
Install with Go, download a prebuilt binary or build from source.
With Go
Requires Go 1.27.4 or newer. The binary goes to $(go env GOPATH)/bin; make sure it is on your PATH.
go install github.com/maymeow/fjo/cmd/fjo@v0.2.0Linux and macOS
Downloads the archive, verifies its SHA-256 checksum and installs the binary. Change linux_amd64 to match your system.
version=0.2.0
archive=fjo_${version}_linux_amd64.tar.gz
curl -LO "https://github.com/maymeow/fjo/releases/download/v${version}/${archive}"
curl -LO "https://github.com/maymeow/fjo/releases/download/v${version}/checksums.txt"
sha256sum --check --ignore-missing checksums.txt # macOS: shasum -a 256 --check --ignore-missing checksums.txt
tar -xzf "$archive" fjo
sudo install -m 0755 fjo /usr/local/bin/fjoWindows
PowerShell. Afterwards add %LOCALAPPDATA%\Programs\fjo to your PATH.
$version = "0.2.0"
$archive = "fjo_${version}_windows_amd64.zip"
$base = "https://github.com/maymeow/fjo/releases/download/v$version"
Invoke-WebRequest "$base/$archive" -OutFile $archive
Invoke-WebRequest "$base/checksums.txt" -OutFile checksums.txt
$expected = (Get-Content checksums.txt | Where-Object { $_.EndsWith(" $archive") }).Split(" ")[0]
if ((Get-FileHash $archive -Algorithm SHA256).Hash -ne $expected) { throw "checksum mismatch" }
Expand-Archive $archive -DestinationPath "$env:LOCALAPPDATA\Programs\fjo"From source
Requires Go 1.27.4 and Git. The binary is written to bin/fjo (bin\fjo.exe on Windows).
git clone https://github.com/maymeow/fjo.git
cd fjo
make build # Linux / macOS
./scripts/build.ps1 # Windows (PowerShell)Prebuilt archives
- Linux
- amd64 · arm64 · armv7
- macOS
- amd64 · arm64
- Windows
- amd64 · arm64
Features
Designed for people who know gh and run their own Forgejo.
gh-style commands
The same command style, flags, JSON output and exit codes as GitHub CLI where Forgejo supports the feature.
Any number of instances
Works with self-hosted Forgejo, several accounts per host, and hosts with custom ports or base paths.
Tokens stay out of config
Tokens live in the OS credential store, never in config files, and never appear in debug output.
Built for scripts
Stable
--jsonoutput with--jqand--template, predictable exit codes, no prompts without a terminal.Verified releases
Prebuilt archives ship with SHA-256 checksums and an SPDX SBOM;
fjo release downloadchecks them for you.No telemetry
fjo collects no usage data and reports nothing back.
Usage
Everyday commands, taken from the command reference.
Sign in to an instance
fjo auth login --hostname forgejo.example.comYour open bugs in a repository
fjo issue list -R org/project --assignee @me --label bugCheck out a pull request for review
fjo pr checkout 42 --branch review-42Approve and squash-merge it
fjo pr review 42 --approve fjo pr merge 42 --squash --delete-branchRecent merges as JSON
fjo pr list --state merged --base main --limit 10 --json number,title,mergedAtPublish a release with assets
fjo release create v1.2.0 dist/fjo_linux_amd64.tar.gz dist/checksums.txtDownload and verify release assets
fjo release download v1.2.0 -D distCall the REST API directly
fjo api /repos/owner/repo/issues --paginate
Links
Source, documentation and project policies.