ai-code/.opencode/skills/forgejo-cli/SKILL.md
2026-03-16 22:45:52 +00:00

3.6 KiB

name description license compatibility metadata
forgejo-cli Interact with a Forge instance using the executable `fj`, inspired by Github's `gh` MIT opencode
audience
maintainers

What I do

The Forgejo CLI (fj) is a powerful command-line tool designed to streamline interactions with Forgejo instances. Inspired by tools like GitHub's gh, it allows you to manage repositories, issues, pull requests, and more directly from your terminal, making your workflow faster and more efficient.

Core Capabilities

Repository Management

  • View Info: Get detailed information about any repository
  • Migrate/Mirror: Migrate or mirror repositories from other hosts
  • Read README: Print a repository's README file directly to the terminal

Issue & Pull Request Operations

  • Create: Open new issues or pull requests. You can use the --web flag to open the creation page in your browser instead
  • PR Autofill: Automatically populate a pull request's title and body from the associated commit(s) with fj pr create --autofill
  • Agit Flow: Create pull requests using the Agit flow, which doesn't require forking the repository (pr --agit)
  • PR Status: Check the status of pull requests and use --wait to make the command exit only after all checks are finished
  • Comment: Add comments from the command line, with the option to use a file's contents as the body (--body-from-file)
  • Search: Search for issues with flexible filters like --state all

User & Key Management

  • Key Management: Manage SSH and GPG keys associated with your account (fj user key, fj user gpg)
  • List Repos/Orgs: List repositories or organizations for a user
  • User Search: Search for other users on the instance

Tag Management

  • Manage Tags: Create, list, and manage Git tags (fj tag)

Installation Guide

You can install forgejo-cli in several ways:

Method Command / Instructions
Pre-built Binaries Download the latest binary for x86_64 Windows or Linux (GNU) from the releases tab on Codeberg
From Source (Cargo) Install using Rust's package manager: cargo install forgejo-cli
From Source (Git) Install the latest development version: cargo install --git https://codeberg.org/Cyborus/forgejo-cli.git --branch main
Nix Use the provided Nix flake: nix profile install git+https://codeberg.org/Cyborus/forgejo-cli
Fedora (Unofficial) An unofficial COPR repository is available. Ensure dnf-plugins-core is installed, then enable the repo
Docker / OCI Use the OCI container for CI/CD environments: codeberg.org/cyborus/forgejo-cli:latest

Usage Examples

Basic Commands

The fj tool uses a simple and intuitive structure: fj <command> <subcommand> [arguments] [flags].

1. Viewing Repository Information

# Using the command directly
fj repo info codeberg.org/forgejo/forgejo

# Example Output
forgejo/forgejo
> Beyond coding. We forge.

Primary language is Go

## When to use me

Interact with Forgejo instances (like codeberg.org or your self-hosted server)


## Overview

The Forgejo CLI (`fj`) is a powerful command-line tool designed to streamline interactions with Forgejo instances. Inspired by tools like GitHub's `gh`, it allows you to manage repositories, issues, pull requests, and more directly from your terminal, making your workflow faster and more efficient.

**Key Facts:**
- **Binary Name:** `fj`
- **Primary Purpose:** Interact with Forgejo instances (like codeberg.org or your self-hosted server)
- **Language:** Written in Rust
- **License:** Dual-licensed under Apache 2.0 or MIT