* CI: pre-push hook (fmt, clippy -D warnings, test, release build) plus opt-in FJ_E2E=1 smoke. Install via scripts/install-hooks.sh. * Repo auto-detection from git remote: -R/--repo becomes optional on all repo-scoped subcommands. Detection prefers `upstream` then `origin`, honors --host, and parses https/ssh/scp-style URLs. * `--web` flag wired to every list/view command (open in default browser). * `$EDITOR` integration for issue/pr create + comment + edit (omit `--body` to launch your editor; `-` keeps stdin). * PR: new `diff`, `commits`, `files`, `checks`, `ready`, `review`, `edit`, `status`, `reopen` subcommands. `view --comments` now shows reviews too. * Issue: `edit` and `develop` (creates a branch for the issue). * Repo: `fork`, `sync`, `edit`, `rename`, `archive`, `unarchive`, `delete` (with slug-confirmation), `branches`, `topics`. * `fj api` gains `-H` headers, `--paginate` (follows Link rel=next), `--include` (response headers), `--silent`. The jq-ish projector now supports `[N]`/`[-N]` brackets and `|` pipes. * MSRV bumped to 1.82 (uses `is_none_or`). * 46 unit tests covering pure logic: hosts CRUD, remote URL parsing, link header parser, jq projection, branch label fallback, slugify. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| hooks | ||
| scripts | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
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.tomlon macOS). - Tokens live in the OS keychain under service
fjkeyed by hostname.
License
MIT