A command-line tool for Forgejo instances.
Find a file
Stephen Way eb716ee588
fix: -R works on repo positional commands, null-array deserialization, list endpoint normalization
* `fj repo branches`, `repo topics`, `repo edit`, `repo fork`, `repo sync`,
  `repo archive`, `repo unarchive`, `repo mirror-sync` previously took only
  a positional `repo` argument and rejected `-R/--repo`. Now they accept
  both, with `-R` winning when both are given.
* Forgejo returns `null` for `labels`/`assignees` on issues and PRs when
  empty. The Issue/Pull structs hit `expected a sequence` on every issue
  create. Added a `deserialize_null_to_default` helper on the affected
  fields so null is now coerced to an empty Vec.
* `get_page` similarly bailed when a list endpoint returned a bare `null`
  body. Now treats null and empty body as `[]`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 08:41:57 -07:00
hooks expand: repo auto-detect, --web, editor, PR diff/checks/ready/review/status, repo lifecycle, api headers/paginate 2026-05-13 08:22:40 -07:00
scripts expand: repo auto-detect, --web, editor, PR diff/checks/ready/review/status, repo lifecycle, api headers/paginate 2026-05-13 08:22:40 -07:00
src fix: -R works on repo positional commands, null-array deserialization, list endpoint normalization 2026-05-13 08:41:57 -07:00
.gitignore initial: fj, a CLI for Forgejo 2026-05-13 07:56:28 -07:00
Cargo.lock expand: auth token/refresh/setup-git, protect, hook, --debug, man pages 2026-05-13 08:34:01 -07:00
Cargo.toml expand: auth token/refresh/setup-git, protect, hook, --debug, man pages 2026-05-13 08:34:01 -07:00
README.md initial: fj, a CLI for Forgejo 2026-05-13 07:56:28 -07:00

fj

A command-line tool for Forgejo instances, in the spirit of GitHub's gh.

Multi-host from day one. Tokens are stored in your OS keychain.

Install

cargo install --path .

Quick start

fj auth login                          # add a host and token
fj auth status                         # show signed-in hosts
fj repo list                           # repos you own on the default host
fj repo view owner/name                # repo overview
fj issue list -R owner/name            # issues
fj pr list -R owner/name --state open  # pull requests
fj api /repos/search?q=foo             # raw API escape hatch

Use --host <hostname> on any command to target a specific host.

Commands

Group Commands
auth login, status, logout, list, switch
repo list, view, clone, create
issue list, view, create, close, reopen, comment
pr list, view, create, checkout, merge, close
api raw HTTP against /api/v1 with optional fields and jq-style field selection

Config

  • Hosts and the current host live in $XDG_CONFIG_HOME/fj/hosts.toml (~/Library/Application Support/fj/hosts.toml on macOS).
  • Tokens live in the OS keychain under service fj keyed by hostname.

License

MIT