Forgejo cli
Use when managing a Forgejo or Gitea server from the terminal: issues, pull requests, repositories, file contents, labels, milestones, releases, webhooks, user settings, or any /api/v1 endpoint through a safe generic API command.From its SKILL.md
npx -y skills add magnus919/agent-skills --skill forgejo-cliAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.4 KB, 514 tokens by cl100k_base, as published. Nobody here has run it
Forgejo CLI v2
Run python3 scripts/forgejo-cli. --agent (default) uses FORGEJO_AGENT_TOKEN; --user uses FORGEJO_USER_TOKEN; --server URL selects an installation. Set FORGEJO_SERVER in your shell if your wrapper supplies it, otherwise pass --server explicitly.
Safety
- Mutations require
--force/--yes/-y, or--dry-run. --dry-run --jsonemits one plan withmethod,path,query, andbody; it makes no network request.--jsonwrites exactly one JSON value to stdout; diagnostics go to stderr.--pageand--limitwork for any list/search request. Add--include-responseto receive the HTTP status pluslinkandx-total-countpagination headers.--helpdoes not read credentials or contact a server. Path segments are encoded.
Common workflows
python3 scripts/forgejo-cli issue list --owner acme --repo app --json
python3 scripts/forgejo-cli --dry-run --json repo create --name demo --private
python3 scripts/forgejo-cli --dry-run --json api --method POST \
--path /api/v1/repos/acme/app/actions/variables --data '{"name":"KEY","value":"value"}'
First-class groups: issue, pr, repo, content, label, milestone, release, hook, and user. content expects base64 and update/delete require the current SHA. Use api for any other /api/v1/ endpoint; it supports JSON, raw files, multipart uploads/forms, and custom headers. Consult /api/swagger or /swagger.v1.json on the selected server. See command reference.
Choosing a command
Use a first-class command for its covered daily workflow. Use api when the operation is absent, requires version-specific fields, or needs a schema not represented by a simple flag. Before using api, read endpoint routing; read API usage for authentication, pagination, compatibility, and safe schema discovery. Read troubleshooting for 401/403/422 responses and transport failures.
What ships with it: 8 files
38.6 KB alongside SKILL.md, 2 of them executable
references/
- api-usage.md2.0 KB
- command-reference.md3.8 KB
- endpoint-routing.md1.3 KB
- troubleshooting.md1.4 KB
scripts/
- forgejo-cliruns21.3 KB
tests/
- test_cli.pyruns5.5 KB
- README.md2.5 KB
- V2-SPEC.md819 B