9 releases
| new 0.1.8 | Mar 12, 2026 |
|---|---|
| 0.1.7 | Mar 3, 2026 |
| 0.1.6 | Feb 23, 2026 |
#291 in Command line utilities
160KB
4K
SLoC
forgejo-cli-ex
fj-ex extends the official Forgejo CLI (fj) with functionality that requires hitting web UI endpoints — full action logs, artifacts, cancel/rerun, workflow dispatch, and more.
Install
cargo install forgejo-cli-ex
fj-ex --help
Quickstart
# Login (interactive)
fj-ex auth login --host forge.example.com
# Mint a NuGet API key (requires `fj auth login` + `fj-ex auth login`)
fj-ex token mint nuget --host forge.example.com --owner my-org
# List recent runs
fj-ex actions runs --repo owner/name --latest
# Stream job logs to stdout
fj-ex actions logs job --repo owner/name --latest --job-index 0
# Cancel / rerun (preview first with --dry-run)
fj-ex actions cancel --repo owner/name --run-index 50 --dry-run
fj-ex actions rerun --repo owner/name --latest --failed-only
# Runner registration token + queued jobs (requires `fj auth login`)
fj-ex actions runners token --repo owner/name
fj-ex actions runners jobs --repo owner/name --waiting
--hostcan be omitted —fj-exinfers it from the current repo's git remotes, or falls back to$FJ_FALLBACK_HOST.
Commands
| Group | What it does |
|---|---|
auth |
Login, logout, status, list saved sessions |
actions runs |
List workflow runs (filter by status, workflow, latest) |
actions jobs |
List jobs for a run, optionally --watch |
actions logs |
Download logs for a job or full run |
actions artifacts |
List / download artifacts |
actions cancel |
Cancel a running workflow |
actions rerun |
Rerun a workflow (optionally --failed-only) |
actions trigger |
Dispatch a workflow_dispatch event |
actions runners |
Runner tokens + queued jobs (REST API; uses fj token store) |
smoke-test |
Non-destructive end-to-end validation |
Full command reference with all flags: docs/commands.md
Target resolution
Most commands accept --host/-H, --repo/-r, or --remote/-R. If omitted, fj-ex infers host and repo from the current directory's git remotes.
Credentials
Credentials and cookies are stored in plaintext at:
%APPDATA%\Cyborus\forgejo-cli\data\ui-creds.json # Windows
~/.local/share/Cyborus/forgejo-cli/data/ui-creds.json # Linux
fj-ex actions runners uses the API token stored by the official fj CLI at:
%APPDATA%\Cyborus\forgejo-cli\data\keys.json # Windows
~/.local/share/Cyborus/forgejo-cli/data/keys.json # Linux
fj-ex token mint nuget needs both:
fj-ex auth login # stored username/password for basic auth
fj auth login # stored API token for Authorization: token ...
This is required for automatic re-login. Downloaded logs and artifacts may contain secrets — handle accordingly.
License
LGPL-3.0-or-later
Dependencies
~19–38MB
~610K SLoC