Pp forgejo

From mvanhorn/printing-press-library · View interactive version

Pp forgejo is an AI agent skill from the GitHub repository mvanhorn/printing-press-library. The `gh` for Forgejo — works with any instance, stores your data locally, and speaks Forgejo natively. Trigger phrases: `check my forgejo issues`, `list pull requests on forgejo`, `create a release on codeberg`, `runner status across orgs`, `upload release assets to forgejo`, `use fj`, `use forgejo-

How to use this skill

Skill file

<!-- GENERATED FILE — DO NOT EDIT.

This file is a verbatim mirror of library/developer-tools/forgejo/SKILL.md,

regenerated post-merge by tools/generate-skills/. Hand-edits here are

silently overwritten on the next regen. Edit the library/ source instead.

See the repository agent guide, section "Generated artifacts: registry.json, cli-skills/". -->

Forgejo — Printing Press CLI

Prerequisites: Install the CLI

This skill drives the forgejo-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:

  1. Install via the Printing Press installer:

```bash

npx -y @mvanhorn/printing-press-library install forgejo --cli-only

```

  1. Verify: forgejo-pp-cli --version
  2. Ensure $GOPATH/bin (or $HOME/go/bin) is on $PATH.

If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer):

go install github.com/mvanhorn/printing-press-library/library/developer-tools/forgejo/cmd/forgejo-pp-cli@latest

If --version reports "command not found" after install, the install step did not put the binary on $PATH. Do not proceed with skill commands until verification succeeds.

fj brings GitHub CLI-level ergonomics to every Forgejo instance: multi-host auth with OAuth2 device flow, offline-searchable local SQLite, cross-repo dashboards, and Forgejo-specific features (runner management, ActivityPub, repo migration) that no other tool exposes. Works with Codeberg, self-hosted instances, and Forgejo Cloud with the same command surface.

When to Use This CLI

Use fj when working with any Forgejo or Codeberg instance from the command line: triage issues across multiple repos, manage PRs and releases, monitor CI and runners, or script release pipelines. Especially suited for teams running self-hosted Forgejo who want gh-equivalent ergonomics without being on GitHub.

Unique Capabilities

These capabilities aren't available in any other tool for this API.

Local state that compounds

_Use this when you need a triage-ready list of issues spanning multiple repos or instances without opening a browser._

```bash

fj issue dashboard --all-hosts --assignee @me --label bug --agent

```

_Use when a contributor works across multiple Forgejo instances and needs to triage notifications without switching browser profiles._

```bash

fj notification inbox --all-hosts --unread --since 24h --agent

```

_Use during weekly triage automation to keep the issue tracker clean without per-issue web UI clicks._

```bash

fj issue sweep --stale-after 90d --label stale --comment 'No activity in 90 days. Closing unless updated.' --dry-run --agent

```

_Use to surface your pending review obligations across multiple repos without opening each repo's PR list individually._

```bash

fj pr queue --all-repos --review-requested @me --json --agent

```

Forgejo-native admin

_Use when administering a self-hosted Forgejo instance with multiple org-scoped runners that need monitoring._

```bash

fj runner sweep --all-orgs --watch --json --agent

```

_Use before cutting a release to confirm all repos are green, or to monitor CI state across a multi-repo service._

```bash

fj ci status --all-repos --branch main --watch --json --agent

```

Release pipeline automation

_Use to generate release notes during a publish workflow without manually scanning the PR list._

```bash

fj release changelog v1.2.0 v1.3.0 --owner myorg --repo myproject --format md --section bug,feature,break --agent

```

_Use during release pipelines where large binary uploads need to be reliable and observable._

```bash

fj release upload v1.3.0 ./dist/*.tar.gz --owner myorg --repo myproject --retry 3 --progress

```

Command Reference

activitypub — Manage activitypub

admin — Manage admin

forgejo-version — Manage forgejo version

gitignore — Manage gitignore

label — Manage label

licenses — Manage licenses

markdown — Manage markdown

markup — Manage markup

nodeinfo — Manage nodeinfo

notifications — Manage notifications

org — Manage org

orgs — Manage orgs

packages — Manage packages

repos — Manage repos

repositories — Manage repositories

settings — Manage settings

signing-key-gpg — Manage signing key gpg

signing-key-ssh — Manage signing key ssh

teams — Manage teams

topics — Manage topics

user — Manage user

users — Manage users

Finding the right command

When you know what you want to do but not which command does it, ask the CLI directly:

forgejo-pp-cli which "<capability in your own words>"

which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match — fall back to --help or use a narrower query.

Recipes

Triage morning inbox

fj issue dashboard --all-hosts --assignee @me --label bug --agent --select title,repo,updated_at,url

Pulls all bug-labeled issues assigned to you across every configured host into a compact agent-readable list.

Cut a release with changelog

fj release changelog v1.2.0 v1.3.0 --format md | fj release create --tag v1.3.0 --notes-from-stdin

Generates a changelog from closed issues and merged PRs between two tags, pipes it into a new release.

Upload release assets reliably

fj release upload v1.3.0 ./dist/*.tar.gz --retry 3 --progress

Uploads binaries with progress bar and automatic retry on network failure.

Sweep stale issues dry-run

fj issue sweep --stale-after 90d --label stale --dry-run --agent --select number,title,last_activity

Shows which issues would be labeled stale without making any changes — review before running without --dry-run.

Monitor runners across orgs

fj runner sweep --all-orgs --watch --json --agent --select name,status,last_online,org

Streams runner status across all org scopes every 10 seconds; pipe to a Slack webhook for alerts.

Auth Setup

Set your Forgejo personal access token via the FORGEJO_TOKEN environment variable or forgejo-pp-cli auth set-token <token>. Use auth setup to print the steps for generating a token, auth status to verify the current credential, and auth logout to clear it. Multi-host profiles and OAuth2 device flow are not yet implemented.

Run forgejo-pp-cli doctor to verify setup.

Agent Mode

Add --agent to any command. Expands to: --json --compact --no-input --no-color --yes.

```bash

forgejo-pp-cli forgejo-version --agent --select id,name,status

```

Response envelope

Commands that read from the local store or the API wrap output in a provenance envelope:

{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}

Parse .results for data and .meta.source to know whether it's live or local. A human-readable N results (live) summary is printed to stderr only when stdout is a terminal AND no machine-format flag (--json, --csv, --compact, --quiet, --plain, --select) is set — piped/agent consumers and explicit-format runs get pure JSON on stdout.

Agent Feedback

When you (or the agent) notice something off about this CLI, record it:

forgejo-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
forgejo-pp-cli feedback --stdin < notes.txt
forgejo-pp-cli feedback list --json --limit 10

Entries are stored locally at ~/.local/share/forgejo-pp-cli/feedback.jsonl. They are never POSTed unless FORGEJO_FEEDBACK_ENDPOINT is set AND either --send is passed or FORGEJO_FEEDBACK_AUTO_SEND=true. Default behavior is local-only.

Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.

Output Delivery

Every command accepts --deliver <sink>. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:

| Sink | Effect |

|------|--------|

| stdout | Default; write to stdout only |

| file:<path> | Atomically write output to <path> (tmp + rename) |

| webhook:<url> | POST the output body to the URL (application/json or application/x-ndjson when --compact) |

Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.

Named Profiles

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.

forgejo-pp-cli profile save briefing --json
forgejo-pp-cli --profile briefing forgejo-version
forgejo-pp-cli profile list --json
forgejo-pp-cli profile show briefing
forgejo-pp-cli profile delete briefing --yes

Explicit flags always win over profile values; profile values win over defaults. agent-context lists all available profiles under available_profiles so introspecting agents discover them at runtime.

Exit Codes

| Code | Meaning |

|------|---------|

| 0 | Success |

| 2 | Usage error (wrong arguments) |

| 3 | Resource not found |

| 4 | Authentication required |

| 5 | API error (upstream issue) |

| 7 | Rate limited (wait and retry) |

| 10 | Config error |

Argument Parsing

Parse $ARGUMENTS:

  1. Empty, help, or --help → show forgejo-pp-cli --help output
  2. Starts with install → ends with mcp → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with --agent)

MCP Server Installation

  1. Install the MCP server:

```bash

go install github.com/mvanhorn/printing-press-library/library/developer-tools/forgejo/cmd/forgejo-pp-mcp@latest

```

  1. Register with Claude Code:

```bash

claude mcp add forgejo-pp-mcp -- forgejo-pp-mcp

```

  1. Verify: claude mcp list

Direct Use

  1. Check if installed: which forgejo-pp-cli

If not found, offer to install (see Prerequisites at the top of this skill).

  1. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  2. Execute with the --agent flag:

```bash

forgejo-pp-cli <command> [subcommand] [args] --agent

```

  1. If ambiguous, drill into subcommand help: forgejo-pp-cli <command> --help.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.