Forgejo CLI

A Forgejo command line should feel native to the forge, not like an adapter around another platform.

CLI

What this solves

You want to work with Forgejo from a terminal and need to know whether fj covers daily development work.

Best fit

  • Reviewing pull requests without opening a browser
  • Inspecting failed Actions runs
  • Scripting releases and repository tasks

How to think about it

The useful starting point is the daily loop: authenticate once, let the CLI infer the repository from the git remote, then inspect issues, pull requests, checks, and releases without leaving the shell. For automation, prefer structured output so scripts depend on fields rather than terminal formatting.

Typical terminal flow

fj auth login --host forge.example.com
fj pr list
fj pr view 42
fj run list --repo org/project
fj api repos/org/project/releases

Practical path

  1. 01 Install fj and sign in to your Forgejo host.
  2. 02 Use repo-scoped commands inside an existing clone.
  3. 03 Switch to JSON output and raw API calls when a workflow needs scripting.

When to choose another path

Use least-privilege tokens for scripted jobs.

Keep interactive commands separate from automation that expects stable output.

Document hostnames when your team uses more than one Forgejo instance.

Next resources

Related reading