forgejo-cli-ops
Installation
SKILL.md
Scope
- Authenticate to a Forgejo host and verify access.
- Run common issue/PR/repo commands with the correct host.
- Troubleshoot host and login mismatches.
Prerequisites
- A Forgejo Personal Access Token (PAT) created in the Forgejo web UI.
fjinstalled and available in PATH.- Optional:
secret-tool(GNOME Keyring) for secure token storage.
Host usage (important)
-H/--host is a global option and must be placed before subcommands.
fj -H <FORGEJO_HOST> repo view <owner>/<repo>
To avoid repeating the host, set FJ_HOST:
export FJ_HOST=<FORGEJO_HOST>
Authentication (secret-tool example)
Store your token (one-time) and register with fj:
echo -n "<PAT_VALUE>" | secret-tool store --label="Forgejo PAT" service forgejo user <username>@<FORGEJO_HOST>
echo -n "$(secret-tool lookup service forgejo user <username>@<FORGEJO_HOST>)" | fj -H <FORGEJO_HOST> auth add-key <username>
Verify:
fj -H <FORGEJO_HOST> auth list
fj -H <FORGEJO_HOST> whoami
Cleanup
fj auth logout <FORGEJO_HOST>
secret-tool clear service forgejo user <username>@<FORGEJO_HOST>
Troubleshooting
Error: not logged inoften means the host defaulted to github.com; add-Hor setFJ_HOST.- If
secret-tool lookupreturns nothing, unlock your keyring or confirm the stored user/host key.
Related skills
More from daisuke897/dotfiles
aws-sso-login
Authenticate to AWS using Single Sign-On (SSO). Use when AWS CLI operations require SSO authentication or when SSO session has expired.
7assume-cloudformation-role
Assume AWS IAM role for CloudFormation operations and set temporary credentials as environment variables. Use when working with CloudFormation stacks or when authentication setup is needed before AWS CloudFormation operations.
5commit-message-generator
Generate appropriate commit messages based on Git diffs
4