### Forgejo CLI Shell Completion Installation Example Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Example of how to install shell completions for the Forgejo CLI, specifically for bash. ```sh fj completion bash > ~/.local/share/bash-completion/completions/fj ``` -------------------------------- ### Homebrew Installation (macOS/Linux) Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Installs Forgejo CLI Plus using Homebrew by tapping the repository and then installing the package. ```sh brew tap stalecontext/forgejo-cli-plus https://codeberg.org/stalecontext/homebrew-forgejo-cli-plus.git brew install forgejo-cli-plus ``` -------------------------------- ### Quick Install (Linux/macOS) Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Installs Forgejo CLI Plus using a curl script. The installation directory can be customized by setting the INSTALL_DIR environment variable. ```sh curl -fsSL https://codeberg.org/stalecontext/forgejo-cli-plus/raw/branch/main/install.sh | sh ``` -------------------------------- ### Nix Installation Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Installs and runs Forgejo CLI Plus using Nix, leveraging the package available on Codeberg. ```sh nix run codeberg:stalecontext/forgejo-cli-plus ``` -------------------------------- ### View and Browse Repository Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Get information about the current repository with `repo view` or view its README with `repo readme`. Open the repository in your browser using `repo browse`. ```bash fj --json repo view # Current repo info ``` ```bash fj repo readme # View README ``` ```bash fj repo browse # Open in browser ``` -------------------------------- ### Cargo Install (From Git) Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Installs the latest unreleased changes of Forgejo CLI Plus directly from its Git repository using Cargo. ```sh cargo install --git https://codeberg.org/stalecontext/forgejo-cli-plus.git ``` -------------------------------- ### Create Repository Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to create a new repository. Supports options for description, privacy, remote setup, and pushing. ```sh fj repo create Create repo (-d description, -P private, -r remote, --push, -S ssh) ``` -------------------------------- ### Agentic / Non-Interactive Flag Examples Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/AGENTS.md Examples demonstrating how to invoke the CLI with agentic flags for non-interactive operations like listing issues or deleting repositories. ```sh fj --yes --json issue list fj --yes --json repo delete owner/repo --force fj repo delete owner/repo --dry-run ``` -------------------------------- ### Cargo Install (Latest Release) Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Installs Forgejo CLI Plus using Cargo from the latest release on crates.io. ```sh cargo install forgejo-cli-plus ``` -------------------------------- ### Uninstall Upstream Forgejo CLI (Nix) Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Uninstalls the upstream forgejo-cli if it was previously installed via Nix. ```sh nix profile remove forgejo-cli ``` -------------------------------- ### Uninstall Upstream Forgejo CLI (Homebrew) Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Uninstalls the upstream forgejo-cli if it was previously installed via Homebrew. ```sh brew uninstall forgejo-cli ``` -------------------------------- ### Uninstall Upstream Forgejo CLI (Pre-built Binary) Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Removes the upstream forgejo-cli binary if it was installed manually from a pre-built archive. ```sh rm "$(which fj)" ``` -------------------------------- ### Uninstall Upstream Forgejo CLI (Cargo) Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Uninstalls the upstream forgejo-cli if it was previously installed via Cargo. ```sh cargo uninstall forgejo-cli ``` -------------------------------- ### Check Forgejo Pull Request CI Status Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Get the CI status for a pull request. The `--wait` flag will block execution until the CI process completes. ```bash # CI Status fj --json pr status 10 ``` ```bash fj pr status 10 --wait # Block until CI finishes ``` -------------------------------- ### Build from Source Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Clones the repository, navigates into the directory, and builds the release binary for Forgejo CLI Plus. ```sh git clone https://codeberg.org/stalecontext/forgejo-cli-plus.git cd forgejo-cli-plus cargo build --release # binary: target/release/fj ``` -------------------------------- ### Create Repository Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Use `repo create` to make new repositories. Specify `-d` for description and `-p` for private. You can also create repositories under an organization. ```bash fj repo create myrepo -d "Description" -p # Private (under your account) ``` ```bash fj repo create myorg/myrepo -d "Description" # Create under an organization ``` -------------------------------- ### List Releases Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md List all releases for a repository using `release list`. Use `release view` to see details of a specific release. ```bash fj --json release list ``` ```bash fj --json release view v1.0.0 ``` -------------------------------- ### Create Release Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Create a new release with `release create`. Specify the tag name, target commit (`-T`), body (`--body`), and attach files using `--attach`. ```bash fj release create v1.0.0 -T v1.0.0 -b "Release notes" --attach dist/app.tar.gz ``` -------------------------------- ### Browse Release Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Open a specific release in the web browser using `release browse`. ```bash fj release browse v1.0.0 # Open in browser ``` -------------------------------- ### Manage Organization Repositories Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md List repositories within an organization using `org repo list`. Create a new repository within an organization using `org repo create`. ```bash fj --json org repo list myorg ``` ```bash fj org repo create myorg newrepo -d "Description" ``` -------------------------------- ### Manage Forgejo Wiki Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Commands for listing, viewing, cloning, and browsing wiki pages. Use `--json` for structured output where applicable. ```bash fj wiki contents # List pages ``` ```bash fj wiki view "Home" # View page (rendered markdown) ``` ```bash fj wiki clone # Clone wiki repo ``` ```bash fj wiki clone -S # Clone via SSH ``` ```bash fj wiki browse "Home" # Open page in browser ``` -------------------------------- ### Build and Test Commands Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/AGENTS.md Commands for building the project in debug or release mode, running all tests, and reviewing snapshot changes. ```sh cargo build # debug cargo build --release # binary at target/release/fj cargo test --all-targets # full suite (93 tests) cargo insta review # review changed snapshots ``` -------------------------------- ### Create Repository Label Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Create a new repository label with `repo labels create`. Provide the name, color, and an optional description (`-d`) or mark it as exclusive (`-e`). ```bash fj repo labels create "bug" "#d73a4a" -d "Something isn't working" ``` ```bash fj repo labels create "scope/api" "#0e8a16" -e # Exclusive (scoped) label ``` -------------------------------- ### Create and Edit Organization Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Create a new organization with `org create`, providing a name, description (`-d`), and visibility (`-v`). Edit an existing organization's details with `org edit`. ```bash fj org create myorg -d "Description" -v public ``` ```bash fj org edit myorg -d "Updated description" ``` -------------------------------- ### Manage Release Attachments Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Add attachments to a release with `release asset create`. Download attachments using `release asset download` and remove them with `release asset delete`. ```bash fj release asset create v1.0.0 ./binary ``` ```bash fj release asset download v1.0.0 binary -o ./downloaded ``` ```bash fj --yes release asset delete v1.0.0 binary --force ``` -------------------------------- ### Manage User GPG Keys Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Commands for listing, viewing, uploading, verifying, and deleting GPG keys associated with a user account. Use `--json` for structured output. ```bash fj --json user gpg list ``` ```bash fj --json user gpg view 42 ``` ```bash fj user gpg upload "$(cat key.asc)" ``` ```bash fj user gpg verify 42 ``` ```bash fj --yes user gpg delete 42 --force ``` -------------------------------- ### Browse Repository Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to open a repository in the web browser. ```sh fj repo browse [repo] Open in browser ``` -------------------------------- ### List and View Tags Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md List all tags for a repository with `tag list`. View details of a specific tag using `tag view`. ```bash fj --json tag list ``` ```bash fj --json tag view v1.0.0 ``` -------------------------------- ### Fork and Migrate Repository Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Fork an existing repository using `repo fork` or migrate a repository from other forges using `repo migrate`. The migrate command can also create a mirror that auto-syncs. ```bash fj repo fork owner/repo --name my-fork ``` ```bash fj repo migrate https://github.com/user/repo myrepo # Mirror from other forges ``` ```bash fj repo migrate https://github.com/user/repo myrepo -m # As mirror (auto-sync) ``` -------------------------------- ### View Repository README Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to view the README file of a repository. ```sh fj repo readme [repo] View README ``` -------------------------------- ### Basic Forgejo CLI Commands Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Perform common actions like cloning repositories, creating issues, opening pull requests, monitoring CI status, and merging pull requests. ```sh # Then use it from any repo with a Forgejo remote fj repo clone owner/repo # clone something fj issue create "title goes here" # file an issue fj pr create "fix the thing" # open a PR from current branch fj pr status --wait # watch CI fj pr merge 42 # merge it ``` -------------------------------- ### List Issue Templates Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to list available issue templates for the repository. ```sh fj issue templates List templates ``` -------------------------------- ### View Repository Labels Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to list labels for a repository. ```sh fj repo labels view List labels ``` -------------------------------- ### Create Repository Label Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to create a new label for a repository, specifying its name and color. ```sh fj repo labels create Create label ``` -------------------------------- ### Forgejo CLI User Search and View Commands Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Commands for searching, viewing, and browsing user profiles. ```bash fj user search Search users fj user view [user] View profile (omit for self) fj user browse [user] Open in browser ``` -------------------------------- ### Forgejo CLI User Activity and Organization Listing Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Commands to list a user's repositories, organizations, and activity feed. ```bash fj user repos [user] List repos (--starred, --sort) fj user orgs [user] List orgs fj user activity [user] Activity feed ``` -------------------------------- ### Manage Team Repositories Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md List repositories associated with a team using `org team repo list`. Add a repository to a team with `org team repo add` and remove it with `org team repo rm`. ```bash fj org team repo list myorg devs ``` ```bash fj org team repo add myorg devs reponame ``` ```bash fj --yes org team repo rm myorg devs reponame --force ``` -------------------------------- ### List Milestones Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md List milestones for a repository with `milestone list`. Include closed milestones by adding the `-s all` flag. ```bash fj --json milestone list ``` ```bash fj --json milestone list -s all # Include closed ``` -------------------------------- ### View Repository Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to view information about a repository. Can be used with or without specifying a repository. ```sh fj repo view [repo] View info ``` -------------------------------- ### Manage User SSH Keys Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Commands for listing, viewing, uploading, and deleting SSH keys associated with a user account. Use `--json` for structured output. ```bash fj --json user key list ``` ```bash fj user key list -v # Verbose (detailed info) ``` ```bash fj --json user key view 42 ``` ```bash fj user key upload ~/.ssh/id_ed25519.pub -t "My key" fj user key upload ~/.ssh/id_ed25519.pub -r # Read-only deploy key ``` ```bash fj --yes user key delete 42 --force ``` -------------------------------- ### Scripting with JSON Output Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Utilize the `--json` flag for machine-readable output, ideal for scripting. Combine with `--yes` and `--verbose` for fully non-interactive automation. ```sh fj --yes --json issue list # JSON output, no prompts fj --verbose issue view 42 # print API calls to stderr ``` -------------------------------- ### Browse Forgejo Issue Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Open a specific issue in the default web browser. ```bash # Browse fj issue browse 42 # Open in browser ``` -------------------------------- ### List Forgejo Issue Templates Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Retrieve a list of available issue templates for a specific repository. ```bash # Templates fj issue templates -r owner/repo # List available issue templates ``` -------------------------------- ### forgejo-cli Authentication Commands Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Manage authentication with Forgejo/Gitea instances. Supports OAuth browser flow, direct token addition, logging out, listing logged-in instances, and toggling SSH usage. ```bash fj auth login # OAuth browser flow ``` ```bash fj auth add-key # Direct token (stdin if omitted) ``` ```bash fj auth logout # Log out from instance ``` ```bash fj auth list # Show logged-in instances ``` ```bash fj auth use-ssh [true|false] # Toggle SSH as default for current instance ``` ```bash fj whoami # Current user@instance ``` -------------------------------- ### Create Organization Team Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Create a new team within an organization using `org team create`. Specify the team name, description (`-d`), and associated permissions (`-w`). ```bash fj org team create myorg devs -d "Developers" -w code,issue ``` -------------------------------- ### Migrate Repository Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to migrate or mirror a repository from a URL. Supports options for mirroring, privacy, and including specific services. ```sh fj repo migrate Migrate/mirror (-m mirror, -p private, -i include, -s service) ``` -------------------------------- ### Add Authentication Token Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Add your personal access token to authenticate with your Forgejo instance. Use the `-H` flag if you are not currently within a repository that points to your instance. ```sh fj -H codeberg.org auth add-key # paste the token when prompted fj whoami # verify it worked ``` -------------------------------- ### Search and List Forgejo Pull Requests Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Search and list pull requests with filters for repository, state, and labels. Use `--json` for structured output. ```bash # Search/list fj --json pr search -r owner/repo -s open ``` ```bash fj --json pr search -r owner/repo -l "needs-review" ``` -------------------------------- ### View Organization Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md View details of a specific organization using `org view`. ```bash fj --json org view myorg ``` -------------------------------- ### List Organization Members and Activity Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md View members of an organization with `org members`. See organization activity using `org activity`. ```bash fj --json org members myorg ``` ```bash fj org activity myorg ``` -------------------------------- ### Manage Forgejo Users Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Commands for viewing, searching, and managing user profiles, relationships, and activity. Use `--json` for machine-readable output. ```bash fj --json user view # Self fj --json user view someuser ``` ```bash fj --json user repos # Own repos fj --json user repos --starred # Starred repos fj --json user repos someuser # Another user's repos ``` ```bash fj --json user search "query" ``` ```bash fj --json user orgs # Own org memberships ``` ```bash fj --json user following # Who you follow ``` ```bash fj --json user followers # Who follows you ``` ```bash fj --yes user follow someuser fj --yes user unfollow someuser fj --yes user block someuser fj --yes user unblock someuser ``` ```bash fj user activity someuser ``` ```bash fj user browse someuser # Open profile in browser ``` ```bash # Profile editing fj user edit bio "I write code" fj user edit name "Display Name" fj user edit name -u # Unset display name fj user edit pronouns "they/them" fj user edit location "Earth" fj user edit website "https://example.com" fj user edit activity -v public # Set activity visibility fj user edit email -a new@example.com -r old@example.com ``` -------------------------------- ### Create a Forgejo Issue Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Create a new issue with a title and description. The title is positional. Use `--template` or `--no-template` if the repository has issue templates configured. ```bash # Create (title is positional, NOT --title) fj issue create "Title" --body "Description" -r owner/repo ``` ```bash fj issue create --template bug # Use issue template ``` ```bash fj issue create --no-template "Title" --body "..." -r owner/repo # Repos with templates require --template or --no-template ``` -------------------------------- ### List Organization Labels Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md List all labels defined at the organization level using `org label list`. ```bash fj --json org label list myorg ``` -------------------------------- ### Create and Delete Tag Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Create a new tag with `tag create`, specifying the tag name and the base branch (`-B`). Delete a tag using `tag delete` with the `--force` flag. ```bash fj tag create v1.0.0 -B main ``` ```bash fj --yes tag delete v1.0.0 --force ``` -------------------------------- ### Non-Interactive Repository Deletion Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Preview repository deletion with `--dry-run` or perform a non-interactive delete using `--force` and `--yes`. ```sh fj repo delete owner/repo --dry-run # preview without executing fj --yes repo delete owner/repo --force # non-interactive delete ``` -------------------------------- ### Create Milestone Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Create a new milestone with `milestone create`. Provide the name, an optional body (`--body`), and a due date (`-d`). ```bash fj milestone create "Sprint 2" --body "Goals" -d 2025-06-01T00:00:00Z ``` -------------------------------- ### Forgejo CLI Organization Repository Management Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Commands for managing repositories within an organization, including listing and creating repositories. ```bash fj org repo list List repos fj org repo create Create repo in org ``` -------------------------------- ### Manage Forgejo CI/CD Actions Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Commands for listing workflow runs, dispatching workflows, and managing CI/CD variables and secrets. Use `--json` for structured output. ```bash fj --json actions tasks # List workflow runs ``` ```bash fj actions dispatch workflow.yml main # Trigger workflow ``` ```bash fj actions dispatch deploy.yml main -I env=prod -I version=1.0 ``` ```bash # Variables fj --json actions variables list ``` ```bash fj actions variables create MY_VAR "value" ``` ```bash fj --yes actions variables delete MY_VAR --force ``` ```bash # Secrets fj --json actions secrets list ``` ```bash fj actions secrets create MY_SECRET "s3cret" ``` ```bash fj --yes actions secrets delete MY_SECRET --force ``` -------------------------------- ### Clone Repository Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Clone a repository using `repo clone`. Use the `-S` flag to clone via SSH. ```bash fj repo clone owner/repo ``` ```bash fj repo clone owner/repo -S # Clone via SSH ``` -------------------------------- ### Star and Delete Repository Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Star or unstar a repository using `repo star` and `repo unstar`. Use `repo delete` to remove a repository, with `--force` for confirmation. ```bash fj --yes repo star ``` ```bash fj --yes repo unstar ``` ```bash fj --yes repo delete owner/repo --force # Destructive ``` -------------------------------- ### View Milestone Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md View details of a specific milestone by its name using `milestone view`. ```bash fj --json milestone view "Sprint 1" ``` -------------------------------- ### Destructive Command Handler Pattern Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/AGENTS.md Illustrates the pattern for handling destructive commands, including checks for dry-run, force flags, and user confirmation prompts. ```rust if dry_run { crate::output::dry_run(&format!("delete thing {name}")); return Ok(()); } if !force && !crate::yes_mode() { if !crate::prompt_bool(&format!("Delete \'{name}\'?"), false).await? { crate::output::info("Not deleted"); return Ok(()); } } crate::verbose_log!("Deleting {name}"); // ... API call ... crate::output::success(&format!("Deleted {name}")); ``` -------------------------------- ### Forgejo CLI Authentication Commands Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Commands for managing authentication, including logging in, logging out, adding API tokens, toggling SSH usage, and listing instances. ```bash fj auth login Log in (OAuth, opens browser) fj auth logout Log out fj auth add-key [key] Add API token directly fj auth use-ssh [bool] Toggle SSH as default fj auth list List instances ``` -------------------------------- ### List Repository Labels Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md List labels for the current repository or a specified one using `repo labels list`. Include archived labels with `--archived`. ```bash fj --json repo labels list ``` ```bash fj --json repo labels list -r owner/repo # Cross-repo (requires -H if not in a git repo) ``` ```bash fj repo labels list --archived # Include archived labels ``` -------------------------------- ### Browse Forgejo Pull Request Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Open a specific pull request in the default web browser. ```bash # Browse fj pr browse 10 # Open in browser ``` -------------------------------- ### Search and List Forgejo Issues Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Search and list issues with various filters including repository, state, labels, and assignees. Use `--json` for machine-readable output. ```bash # Search/list fj --json issue search -r owner/repo -s open ``` ```bash fj --json issue search -r owner/repo -l "bug,priority" ``` ```bash fj --json issue search -r owner/repo -a username -s all ``` -------------------------------- ### Create a Forgejo Pull Request Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Create a pull request from the current branch with a title and description. Autofill options and base/head branches can be specified. ```bash # Create (from current branch) fj pr create "Title" --body "Description" ``` ```bash fj pr create -A # Autofill from commits ``` ```bash fj pr create --base main --head feature -r owner/repo ``` -------------------------------- ### Add Organization Label Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Add a new label to an organization with `org label add`. Specify the name, color (`#ff0000`), description (`-d`), and exclusivity (`-e`). ```bash fj org label add myorg "priority" "#ff0000" -d "High priority" -e ``` -------------------------------- ### Forgejo CLI Organization Commands Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Commands for managing organizations, including creation, editing, viewing, listing, and managing members and activity. ```bash fj org create Create org fj org edit Edit fj org view View fj org list List orgs (-o only orgs you're a member of) fj org members List members fj org activity Activity feed fj org visibility View/set visibility (-s public|private) ``` -------------------------------- ### Forgejo CLI Utility Commands Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md General utility commands for the Forgejo CLI, including version checking and shell completion generation. ```bash fj --version # Show version (also: fj version) ``` ```bash fj --verbose version # Verbose build info (user agent, target, etc.) ``` ```bash fj completion bash > ~/.bash_completion.d/fj fj completion zsh > ~/.zfunc/_fj fj completion fish > ~/.config/fish/completions/fj.fish fj completion powershell > fj.ps1 ``` -------------------------------- ### Browse Issue Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to open a specific issue in the web browser. ```sh fj issue browse Open in browser ``` -------------------------------- ### View Forgejo Issue Details Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md View a specific issue by its ID, including its comments. Cross-repo viewing is supported. Use `--json` for structured output. ```bash # View fj --json issue view 42 ``` ```bash fj --json issue view 42 -r owner/repo # Cross-repo view ``` ```bash fj issue view 42 comments # All comments ``` ```bash fj issue view 42 comment 3 # Specific comment ``` -------------------------------- ### Edit and Delete Release Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Edit an existing release's body with `release edit`. Delete a release using `release delete` with the `--force` flag for confirmation. ```bash fj release edit v1.0.0 --body "Updated notes" ``` ```bash fj --yes release delete v1.0.0 --force ``` -------------------------------- ### Upstream Sync Commands Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/AGENTS.md Commands for synchronizing with the upstream repository using git, specifically for cherry-picking commits. ```sh git remote add upstream https://codeberg.org/forgejo-contrib/forgejo-cli.git git fetch upstream git cherry-pick ``` -------------------------------- ### View Pull Request and Check Mergeability Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Views a specific pull request and checks its mergeable status using JSON output and jq. ```bash fj --json pr view 10 | jq '.mergeable' ``` -------------------------------- ### View Team Permissions Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Show the permissions for a specific team within an organization using `org team view -p`. ```bash fj org team view myorg devs -p # Show permissions ``` -------------------------------- ### Forgejo CLI User GPG Key Management Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Commands for managing GPG keys associated with a user account, including listing, uploading, viewing, deleting, and verifying keys. ```bash fj user gpg list List keys fj user gpg upload Upload key (--no-verify to skip verification) fj user gpg view View key fj user gpg delete Delete key (-f force, --dry-run) fj user gpg verify Verify key ``` -------------------------------- ### Star Repository Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to star a repository. Can be used with or without specifying a repository. ```sh fj repo star [repo] Star ``` -------------------------------- ### Forgejo CLI User Social Interaction Commands Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Commands for following, unfollowing, and managing blocked users, as well as listing followers and following. ```bash fj user follow Follow fj user unfollow Unfollow fj user following [user] List follows fj user followers [user] List followers fj user block Block fj user unblock Unblock ``` -------------------------------- ### Create Issue Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to create a new issue. Supports specifying a title, body, milestone, and opening in a web browser. ```sh fj issue create [title] Create (--body, --body-file, --template, -M milestone, --web) ``` -------------------------------- ### Manage Team Members Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md List members of a team with `org team member list`. Add a member using `org team member add` and remove them with `org team member rm`. ```bash fj org team member list myorg devs ``` ```bash fj org team member add myorg devs username ``` ```bash fj --yes org team member rm myorg devs username --force ``` -------------------------------- ### Manage Organization Visibility Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Check the current membership visibility of an organization with `org visibility`. Set the visibility to `public` using `org visibility -s public`. ```bash fj org visibility myorg # View membership visibility ``` ```bash fj org visibility myorg -s public # Set membership visibility ``` -------------------------------- ### List Organizations Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md List all organizations with `org list`. Filter to show only organizations you belong to using the `-m` flag. ```bash fj --json org list ``` ```bash fj --json org list -m # Only orgs you belong to ``` -------------------------------- ### Unstar Repository Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to unstar a repository. Can be used with or without specifying a repository. ```sh fj repo unstar [repo] Unstar ``` -------------------------------- ### Clone Repository Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to clone a repository. Supports specifying an identity file for SSH cloning. ```sh fj repo clone [path] Clone (-S ssh, -I identity file) ``` -------------------------------- ### List Organization Teams Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md List all teams within an organization using `org team list`. View a specific team's details with `org team view`. ```bash fj --json org team list myorg ``` ```bash fj --json org team view myorg devs ``` -------------------------------- ### Reopen Issue Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to reopen a closed issue. Optionally, a comment can be added upon reopening. ```sh fj issue reopen Reopen (-w [msg] optional comment) ``` -------------------------------- ### Fork Repository Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to fork an existing repository. Allows specifying a custom name for the forked repository. ```sh fj repo fork Fork (--name for custom name) ``` -------------------------------- ### Forgejo CLI Organization Label Management Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Commands for managing labels within an organization, including listing, adding, editing, and removing labels. ```bash fj org label list List org labels fj org label add Add label fj org label edit Edit label fj org label rm Remove label (-f force, --dry-run) ``` -------------------------------- ### Checkout Forgejo Pull Request Locally Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Checkout a pull request locally to review or test. A custom local branch name can be specified. ```bash # Checkout locally fj pr checkout 10 ``` ```bash fj pr checkout 10 --branch-name my-branch # Custom local branch name ``` -------------------------------- ### Change Forgejo Issue State Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Close or reopen issues. Use `--yes` to skip confirmation. Closing can include a resolution message. ```bash # State fj --yes issue close 42 ``` ```bash fj --yes issue close 42 -w "Fixed in abc123" ``` ```bash fj --yes issue reopen 42 ``` -------------------------------- ### Forgejo CLI User SSH Key Management Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Commands for managing SSH keys associated with a user account, including listing, uploading, viewing, and deleting keys. ```bash fj user key list List keys fj user key upload [file] Upload key (-t title, --force, -r read-only) fj user key view View key fj user key delete Delete key (-f force, --dry-run) ``` -------------------------------- ### View Issue Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to view a specific issue by its ID, including milestone information. Also allows viewing comments and specific comments. ```sh fj issue view View issue (includes milestone info) fj issue view comments List comments fj issue view comment View nth comment ``` -------------------------------- ### View Forgejo Pull Request Details Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md View a specific pull request by its ID, including its diff, changed files, commits, labels, and comments. Use `--json` for machine-readable output. ```bash # View fj --json pr view 10 ``` ```bash fj pr view 10 diff # View diff ``` ```bash fj pr view 10 files # Changed files ``` ```bash fj pr view 10 commits # Commit list ``` ```bash fj pr view 10 labels # List labels ``` ```bash fj pr view 10 comments # All comments ``` ```bash fj pr view 10 comment 3 # Specific comment ``` -------------------------------- ### Agentic Usage Flags for forgejo-cli Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Use these global flags for non-interactive automation to skip prompts and control output format. The `--yes` flag is crucial for preventing confirmation prompts in automated scripts. ```bash fj --yes --json # Skip prompts + machine-readable output ``` ```bash fj --yes --verbose # Skip prompts + debug API calls to stderr ``` -------------------------------- ### Search Open Issues and Extract Numbers Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Searches for open issues and extracts their numbers using JSON output and jq. ```bash fj --json issue search -s open | jq '.[].number' ``` -------------------------------- ### Delete Repository Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to delete a repository. Supports a force option and dry-run preview. ```sh fj repo delete Delete (-f force, --dry-run) ``` -------------------------------- ### Forgejo CLI Organization Team Management Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Commands for managing teams within an organization, including listing, viewing, creating, editing, deleting teams, and managing team repositories and members. ```bash fj org team list List teams fj org team view View team fj org team create Create team fj org team edit Edit team fj org team delete Delete team (-f force, --dry-run) fj org team repo list Team repos fj org team repo add Add repo to team fj org team repo rm Remove repo from team (-f force, --dry-run) fj org team member list Team members fj org team member add Add member fj org team member rm Remove member (-f force, --dry-run) ``` -------------------------------- ### Edit and Delete Repository Label Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Edit an existing repository label using its ID with `repo labels edit`, specifying new name (`-n`), color (`-c`), or description. Delete a label with `repo labels delete` and `--force`. ```bash fj repo labels edit 5 -n "renamed" -c "#ff0000" ``` ```bash fj repo labels delete 5 --force ``` -------------------------------- ### Search Issues Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to search for issues based on a query. Supports filtering by labels, creator, assignee, milestone, and state. ```sh fj issue search [query] Search (-l labels, -c creator, -a assignee, -M milestone, -s state) ``` -------------------------------- ### Forgejo CLI User Profile Editing Commands Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Commands for editing various aspects of a user's profile, including bio, display name, pronouns, location, website, email, and activity visibility. ```bash fj user edit bio [text] Set bio fj user edit name [name] Set display name fj user edit pronouns [text] Set pronouns fj user edit location [text] Set location fj user edit website [url] Set website fj user edit email Manage emails fj user edit activity Activity visibility ``` -------------------------------- ### Close Issue Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to close an issue. Optionally, a closing comment can be provided. ```sh fj issue close Close (-w [msg] optional closing comment) ``` -------------------------------- ### Comment on a Forgejo Issue Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Add comments to an issue, either directly with text or by referencing a file for the body. ```bash # Comment fj issue comment 42 "Comment body" ``` ```bash fj issue comment 42 --body-file notes.md ``` -------------------------------- ### Delete Repository Label Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to delete a label from a repository, identified by its ID. Supports a force option and dry-run preview. ```sh fj repo labels delete Delete label (-f force, --dry-run) ``` -------------------------------- ### Edit Organization Team Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Edit an existing organization team's name (`--new-name`) or description (`-d`) using `org team edit`. ```bash fj org team edit myorg devs --new-name "developers" -d "Updated" ``` -------------------------------- ### Comment on Issue Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to add a new comment to an issue. Supports providing the comment body directly or from a file. ```sh fj issue comment [body] Comment (--body-file) ``` -------------------------------- ### Edit Repository Label Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to edit an existing label in a repository, identified by its ID. ```sh fj repo labels edit Edit label ``` -------------------------------- ### Remove Organization Label Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Remove a label from an organization using `org label rm` with the `--force` flag. ```bash fj --yes org label rm myorg "priority" --force ``` -------------------------------- ### Comment on a Forgejo Pull Request Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Add comments to a pull request, either directly with text or by referencing a file for the comment body. ```bash # Comment fj pr comment 10 "LGTM" ``` ```bash fj pr comment 10 --body-file review.md ``` -------------------------------- ### Change Forgejo Pull Request State Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Close or reopen pull requests. Use `--yes` to bypass confirmation. A closing comment can be provided with the `-w` flag. ```bash # State fj --yes pr close 10 ``` ```bash fj --yes pr close 10 -w "Superseded by #11" # Close with comment ``` ```bash fj --yes pr reopen 10 ``` ```bash fj --yes pr reopen 10 -w "Reopening per review" ``` -------------------------------- ### Edit Issue Labels Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to edit the labels associated with an issue, supporting adding and removing labels. ```sh fj issue edit labels Edit labels (--add, --rm) ``` -------------------------------- ### Edit Organization Label Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Edit an existing organization label using `org label edit`. You can change the name (`--new-name`) or color (`-c`). ```bash fj org label edit myorg "priority" --new-name "urgent" -c "#cc0000" ``` -------------------------------- ### Merge Forgejo Pull Request Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Merge a pull request using different strategies (merge, squash, rebase). The `--delete` flag can be used to remove the source branch after merging. ```bash # Merge fj --yes pr merge 10 -M merge --delete # Merge + delete branch ``` ```bash fj --yes pr merge 10 -M squash ``` ```bash fj --yes pr merge 10 -M rebase ``` -------------------------------- ### Edit and Delete Milestone Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Edit an existing milestone's state (e.g., to `closed`) using `milestone edit`. Delete a milestone with `milestone delete` and the `--force` flag. ```bash fj milestone edit "Sprint 1" --state closed ``` ```bash fj --yes milestone delete "Sprint 1" --force ``` -------------------------------- ### Edit Issue Body Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to edit the body content of an existing issue. ```sh fj issue edit body Edit body ``` -------------------------------- ### Edit Forgejo Issue Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Edit an existing issue's title, body, labels, or assignees. Labels and assignees can be added or removed using flags. ```bash # Edit fj issue edit 42 title "New title" ``` ```bash fj issue edit 42 body "New body" ``` ```bash fj issue edit 42 labels -a bug -a urgent -r wontfix ``` ```bash fj issue edit 42 assignees -a user1 -r user2 ``` -------------------------------- ### Delete Organization Team Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Delete an organization team using `org team delete` with the `--force` flag for confirmation. ```bash fj --yes org team delete myorg devs --force ``` -------------------------------- ### Edit Issue Title Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to edit the title of an existing issue. ```sh fj issue edit title Edit title ``` -------------------------------- ### Edit Issue Assignees Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to edit the assignees for an issue, supporting adding and removing assignees. ```sh fj issue edit assignees Edit assignees (--add, --rm) ``` -------------------------------- ### Edit Forgejo Pull Request Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/skill/SKILL.md Edit a pull request's title, body, labels, or assignees. Comments can also be edited by referencing the comment ID. ```bash # Edit fj pr edit 10 title "New title" ``` ```bash fj pr edit 10 body "Updated description" ``` ```bash fj pr edit 10 labels -a approved -r draft ``` ```bash fj pr edit 10 assignees -a user1 -r user2 ``` ```bash fj pr edit 10 comment 3 # Edit specific comment ``` -------------------------------- ### Edit Issue Comment Command Source: https://github.com/stalecontext/forgejo-cli-plus/blob/main/README.md Command to edit a specific comment on an issue, identified by the issue ID and comment number. ```sh fj issue edit comment Edit comment ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.