feat: add forgejo-cli skill — Forgejo/Gitea Git forge CLI #8

Merged
magnus merged 1 commit from feat/forgejo-cli-skill into main 2026-05-21 23:15:05 -04:00
Contributor

Summary

CLI wrapper for the Forgejo/Gitea REST API v1. List repositories, search, manage issues, view pull requests, and get user info.

Files

forgejo-cli/
├── SKILL.md                              # 113 lines — trigger surface, commands, gotchas
└── scripts/
    └── forgejo-cli                       # 524 lines — the Python CLI binary

Commands

  • me — current user profile
  • repos — list your repositories
  • search — search repositories by query
  • issues — list issues (PRs filtered out)
  • view — view issue/PR with body, labels, milestone
  • prs — list pull requests with head/base branches

Features

  • All cli-builder patterns: --json, --dry-run, --quiet, --verbose
  • Lazy auth: --help and --dry-run work without credentials
  • Dual-output via emit() helper
  • Structured logging with log/warn/die
  • Pre-parsed global flags (flags work in any position)
  • Issues/PRs share-an-endpoint filter (removes PRs from issue listings)
  • owner/repo format validation

Setup

pip install requests
export FORGEJO_SERVER="https://git.your-domain.com"
export FORGEJO_TOKEN="your-token"
./scripts/forgejo-cli me

Token generated from Settings → Applications → Personal Access Tokens.

QA Gate (10/10 tests passing)

  • Syntax check ✓
  • --help on top level ✓
  • --help on all 6 subcommands ✓
  • Missing required args → error with usage ✓
  • --dry-run returns meaningful preview ✓
  • Unknown command → error ✓
  • Errors to stderr, data to stdout ✓
  • JSON dry-run output parseable ✓
  • No args → prints help ✓
  • Dry-run on chained commands ✓

Signed-off-by: Jasper magnus@groktop.us

## Summary CLI wrapper for the Forgejo/Gitea REST API v1. List repositories, search, manage issues, view pull requests, and get user info. ## Files ``` forgejo-cli/ ├── SKILL.md # 113 lines — trigger surface, commands, gotchas └── scripts/ └── forgejo-cli # 524 lines — the Python CLI binary ``` ## Commands - `me` — current user profile - `repos` — list your repositories - `search` — search repositories by query - `issues` — list issues (PRs filtered out) - `view` — view issue/PR with body, labels, milestone - `prs` — list pull requests with head/base branches ## Features - All cli-builder patterns: --json, --dry-run, --quiet, --verbose - Lazy auth: --help and --dry-run work without credentials - Dual-output via emit() helper - Structured logging with log/warn/die - Pre-parsed global flags (flags work in any position) - Issues/PRs share-an-endpoint filter (removes PRs from issue listings) - owner/repo format validation ## Setup ```bash pip install requests export FORGEJO_SERVER="https://git.your-domain.com" export FORGEJO_TOKEN="your-token" ./scripts/forgejo-cli me ``` Token generated from Settings → Applications → Personal Access Tokens. ## QA Gate (10/10 tests passing) - Syntax check ✓ - --help on top level ✓ - --help on all 6 subcommands ✓ - Missing required args → error with usage ✓ - --dry-run returns meaningful preview ✓ - Unknown command → error ✓ - Errors to stderr, data to stdout ✓ - JSON dry-run output parseable ✓ - No args → prints help ✓ - Dry-run on chained commands ✓ Signed-off-by: Jasper <magnus@groktop.us>
CLI wrapper for the Forgejo/Gitea REST API v1. Commands:
- me: current user profile
- repos: list user repositories
- search: search repositories by query
- issues: list issues in a repo (filters out PRs)
- view: view issue or PR details with body, labels, milestone
- prs: list pull requests with head/base branch info

All cli-builder patterns: --json, --dry-run, --quiet, --verbose,
lazy auth, emit() dual-output, structured logging, pre-parsed
global flags. Auth via FORGEJO_TOKEN (token auth header).

Signed-off-by: Jasper <magnus@groktop.us>
magnus merged commit e5acc749bf into main 2026-05-21 23:15:05 -04:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
magnus/agent-skills!8
No description provided.