rename fgj to fj
Module path, binary name, config dir, help text, and docs all updated from fgj-sid/fgj to fj.
This commit is contained in:
parent
a6cf9a7096
commit
bc43f6e5a5
34 changed files with 479 additions and 479 deletions
286
README.md
286
README.md
|
|
@ -1,11 +1,11 @@
|
|||
# fgj - Forgejo/Gitea CLI Tool
|
||||
# fj - Forgejo/Gitea CLI Tool
|
||||
|
||||
[](https://golang.org)
|
||||
[](LICENSE)
|
||||
|
||||
`fgj` is a command-line tool for working with Forgejo and Gitea instances. It brings pull requests, issues, and other forge concepts to the terminal, similar to what `gh` does for GitHub. This fork adds agentic dev features — raw API access, PR review workflows, structured error output, and machine-readable I/O for AI coding agents.
|
||||
`fj` is a command-line tool for working with Forgejo and Gitea instances. It brings pull requests, issues, and other forge concepts to the terminal, similar to what `gh` does for GitHub. This fork adds agentic dev features — raw API access, PR review workflows, structured error output, and machine-readable I/O for AI coding agents.
|
||||
|
||||
> Forked from [codeberg.org/romaintb/fgj](https://codeberg.org/romaintb/fgj) and hosted at [forgejo.zerova.net/public/fgj-sid](https://forgejo.zerova.net/public/fgj-sid).
|
||||
> Forked from [codeberg.org/romaintb/fj](https://codeberg.org/romaintb/fj) and hosted at [forgejo.zerova.net/public/fj](https://forgejo.zerova.net/public/fj).
|
||||
|
||||
## Features
|
||||
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
- Issue dependencies (`--add-dependency`, `--remove-dependency`)
|
||||
- Forgejo Actions (workflow runs, watch/rerun/cancel, enable/disable, secrets, variables)
|
||||
- Releases (create, upload, delete)
|
||||
- Raw API access (`fgj api`) for arbitrary REST calls
|
||||
- Raw API access (`fj api`) for arbitrary REST calls
|
||||
- Shell completions (bash, zsh, fish, PowerShell) and man pages
|
||||
- JSON output (`--json`) for all list/view commands
|
||||
- Structured JSON error output (`--json-errors`) for machine consumption
|
||||
|
|
@ -33,22 +33,22 @@
|
|||
### macOS (Homebrew)
|
||||
|
||||
```bash
|
||||
brew tap sid/fgj-sid https://forgejo.zerova.net/sid/homebrew-fgj-sid.git
|
||||
brew install fgj
|
||||
brew tap sid/fj https://forgejo.zerova.net/sid/homebrew-fj.git
|
||||
brew install fj
|
||||
```
|
||||
|
||||
### Using Go Install
|
||||
|
||||
```bash
|
||||
go install forgejo.zerova.net/public/fgj-sid@latest
|
||||
go install forgejo.zerova.net/public/fj@latest
|
||||
```
|
||||
|
||||
### From Source
|
||||
|
||||
```bash
|
||||
git clone https://forgejo.zerova.net/public/fgj-sid.git
|
||||
cd fgj-sid
|
||||
go build -o fgj .
|
||||
git clone https://forgejo.zerova.net/public/fj.git
|
||||
cd fj
|
||||
go build -o fj .
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
|
@ -58,7 +58,7 @@ go build -o fgj .
|
|||
First, authenticate with your Forgejo or Gitea instance:
|
||||
|
||||
```bash
|
||||
fgj auth login
|
||||
fj auth login
|
||||
```
|
||||
|
||||
You'll be prompted for:
|
||||
|
|
@ -74,34 +74,34 @@ To create a personal access token:
|
|||
### 2. Check Authentication Status
|
||||
|
||||
```bash
|
||||
fgj auth status
|
||||
fj auth status
|
||||
```
|
||||
|
||||
### Auth Helpers
|
||||
|
||||
```bash
|
||||
# Print the stored token for the current host
|
||||
fgj auth token
|
||||
fj auth token
|
||||
|
||||
# Remove authentication for a host
|
||||
fgj auth logout
|
||||
fj auth logout
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Repository Detection
|
||||
|
||||
`fgj` automatically detects the repository from your git context, similar to `gh`:
|
||||
`fj` automatically detects the repository from your git context, similar to `gh`:
|
||||
|
||||
```bash
|
||||
# When inside a git repository, no -R flag needed!
|
||||
cd /path/to/your/repo
|
||||
fgj pr list # Automatically uses current repo
|
||||
fgj issue list # Automatically uses current repo
|
||||
fgj pr view 123 # Automatically uses current repo
|
||||
fj pr list # Automatically uses current repo
|
||||
fj issue list # Automatically uses current repo
|
||||
fj pr view 123 # Automatically uses current repo
|
||||
|
||||
# Or explicitly specify a repository with -R
|
||||
fgj pr list -R owner/repo
|
||||
fj pr list -R owner/repo
|
||||
```
|
||||
|
||||
The tool reads `.git/config` to find the origin remote and extract both the owner/repo information and the instance hostname. If you're not in a git repository, you'll need to use the `-R` flag.
|
||||
|
|
@ -110,307 +110,307 @@ The tool reads `.git/config` to find the origin remote and extract both the owne
|
|||
|
||||
```bash
|
||||
# List pull requests (auto-detects repo and hostname from git)
|
||||
fgj pr list
|
||||
fj pr list
|
||||
|
||||
# Or specify explicitly
|
||||
fgj pr list -R owner/repo
|
||||
fj pr list -R owner/repo
|
||||
|
||||
# Filter by state
|
||||
fgj pr list --state closed
|
||||
fj pr list --state closed
|
||||
|
||||
# View a specific pull request
|
||||
fgj pr view 123
|
||||
fj pr view 123
|
||||
|
||||
# Create a pull request
|
||||
fgj pr create -t "PR Title" -b "PR Description" -H feature-branch -B main
|
||||
fj pr create -t "PR Title" -b "PR Description" -H feature-branch -B main
|
||||
|
||||
# Merge a pull request
|
||||
fgj pr merge 123 --merge-method squash
|
||||
fj pr merge 123 --merge-method squash
|
||||
|
||||
# View PR diff
|
||||
fgj pr diff 123
|
||||
fj pr diff 123
|
||||
|
||||
# View diff with color
|
||||
fgj pr diff 123 --color always
|
||||
fj pr diff 123 --color always
|
||||
|
||||
# Show only changed file names
|
||||
fgj pr diff 123 --name-only
|
||||
fj pr diff 123 --name-only
|
||||
|
||||
# Show diffstat summary
|
||||
fgj pr diff 123 --stat
|
||||
fj pr diff 123 --stat
|
||||
|
||||
# Comment on a pull request
|
||||
fgj pr comment 123 -b "Looks good, minor nit on line 42"
|
||||
fj pr comment 123 -b "Looks good, minor nit on line 42"
|
||||
|
||||
# Comment from a file
|
||||
fgj pr comment 123 --body-file review-notes.md
|
||||
fj pr comment 123 --body-file review-notes.md
|
||||
|
||||
# Approve a pull request
|
||||
fgj pr review 123 --approve -b "LGTM"
|
||||
fj pr review 123 --approve -b "LGTM"
|
||||
|
||||
# Request changes
|
||||
fgj pr review 123 --request-changes -b "Please fix the error handling"
|
||||
fj pr review 123 --request-changes -b "Please fix the error handling"
|
||||
|
||||
# Submit a review comment (neither approve nor request changes)
|
||||
fgj pr review 123 --comment -b "Some observations"
|
||||
fj pr review 123 --comment -b "Some observations"
|
||||
```
|
||||
|
||||
### Issues
|
||||
|
||||
```bash
|
||||
# List issues (auto-detects repo and hostname from git)
|
||||
fgj issue list
|
||||
fj issue list
|
||||
|
||||
# Or specify explicitly
|
||||
fgj issue list -R owner/repo
|
||||
fj issue list -R owner/repo
|
||||
|
||||
# Filter by state
|
||||
fgj issue list --state all
|
||||
fj issue list --state all
|
||||
|
||||
# View an issue
|
||||
fgj issue view 456
|
||||
fj issue view 456
|
||||
|
||||
# Create an issue
|
||||
fgj issue create -t "Issue Title" -b "Issue Description"
|
||||
fj issue create -t "Issue Title" -b "Issue Description"
|
||||
|
||||
# Create an issue with labels
|
||||
fgj issue create -t "Issue Title" -b "Issue Description" -l bug -l enhancement
|
||||
fj issue create -t "Issue Title" -b "Issue Description" -l bug -l enhancement
|
||||
|
||||
# Comment on an issue
|
||||
fgj issue comment 456 -b "My comment"
|
||||
fj issue comment 456 -b "My comment"
|
||||
|
||||
# Close an issue
|
||||
fgj issue close 456
|
||||
fj issue close 456
|
||||
|
||||
# Close an issue with a comment
|
||||
fgj issue close 456 -c "Fixed in v2.0"
|
||||
fj issue close 456 -c "Fixed in v2.0"
|
||||
|
||||
# Edit an issue (title, body, state, labels)
|
||||
fgj issue edit 456 -t "New Title"
|
||||
fgj issue edit 456 --add-label priority --remove-label bug
|
||||
fj issue edit 456 -t "New Title"
|
||||
fj issue edit 456 --add-label priority --remove-label bug
|
||||
|
||||
# Manage issue dependencies
|
||||
fgj issue edit 456 --add-dependency 123
|
||||
fgj issue edit 456 --remove-dependency 123
|
||||
fj issue edit 456 --add-dependency 123
|
||||
fj issue edit 456 --remove-dependency 123
|
||||
```
|
||||
|
||||
### Labels
|
||||
|
||||
```bash
|
||||
# List labels
|
||||
fgj label list
|
||||
fj label list
|
||||
|
||||
# Create a label
|
||||
fgj label create bug --color ff0000 -d "Something isn't working"
|
||||
fj label create bug --color ff0000 -d "Something isn't working"
|
||||
|
||||
# Edit a label
|
||||
fgj label edit bug --name bugfix --color ee0000
|
||||
fj label edit bug --name bugfix --color ee0000
|
||||
|
||||
# Delete a label
|
||||
fgj label delete bug
|
||||
fj label delete bug
|
||||
```
|
||||
|
||||
### Milestones
|
||||
|
||||
```bash
|
||||
# List milestones
|
||||
fgj milestone list
|
||||
fgj milestone list --state all
|
||||
fj milestone list
|
||||
fj milestone list --state all
|
||||
|
||||
# View a milestone
|
||||
fgj milestone view "v1.0"
|
||||
fj milestone view "v1.0"
|
||||
|
||||
# Create a milestone with due date
|
||||
fgj milestone create "v2.0" -d "Next major release" --due 2026-06-01
|
||||
fj milestone create "v2.0" -d "Next major release" --due 2026-06-01
|
||||
|
||||
# Edit a milestone
|
||||
fgj milestone edit "v2.0" --title "v2.0-rc1" --state closed
|
||||
fj milestone edit "v2.0" --title "v2.0-rc1" --state closed
|
||||
|
||||
# Delete a milestone
|
||||
fgj milestone delete "v2.0"
|
||||
fj milestone delete "v2.0"
|
||||
```
|
||||
|
||||
### Wiki
|
||||
|
||||
```bash
|
||||
# List wiki pages
|
||||
fgj wiki list
|
||||
fj wiki list
|
||||
|
||||
# View a wiki page
|
||||
fgj wiki view "Home"
|
||||
fj wiki view "Home"
|
||||
|
||||
# Create a wiki page
|
||||
fgj wiki create "Setup Guide" -b "# Setup\n\nFollow these steps..."
|
||||
fj wiki create "Setup Guide" -b "# Setup\n\nFollow these steps..."
|
||||
|
||||
# Create from file
|
||||
fgj wiki create "API Docs" --body-file docs/api.md
|
||||
fj wiki create "API Docs" --body-file docs/api.md
|
||||
|
||||
# Edit a wiki page
|
||||
fgj wiki edit "Home" -b "Updated content"
|
||||
fj wiki edit "Home" -b "Updated content"
|
||||
|
||||
# Delete a wiki page
|
||||
fgj wiki delete "Old Page"
|
||||
fj wiki delete "Old Page"
|
||||
```
|
||||
|
||||
### Repositories
|
||||
|
||||
```bash
|
||||
# View repository details
|
||||
fgj repo view owner/repo
|
||||
fj repo view owner/repo
|
||||
|
||||
# List your repositories
|
||||
fgj repo list
|
||||
fj repo list
|
||||
|
||||
# Create a repository
|
||||
fgj repo create my-repo
|
||||
fgj repo create my-repo -d "My project" --private --add-readme -g Go -l MIT
|
||||
fj repo create my-repo
|
||||
fj repo create my-repo -d "My project" --private --add-readme -g Go -l MIT
|
||||
|
||||
# Clone a repository
|
||||
fgj repo clone owner/repo
|
||||
fj repo clone owner/repo
|
||||
|
||||
# Clone via SSH
|
||||
fgj repo clone owner/repo -p ssh
|
||||
fj repo clone owner/repo -p ssh
|
||||
|
||||
# Fork a repository
|
||||
fgj repo fork owner/repo
|
||||
fj repo fork owner/repo
|
||||
|
||||
# Edit repository settings
|
||||
fgj repo edit owner/repo --public
|
||||
fgj repo edit owner/repo --private
|
||||
fgj repo edit owner/repo -d "New description" --homepage https://example.com
|
||||
fgj repo edit --default-branch develop
|
||||
fgj repo edit owner/repo --name new-name
|
||||
fj repo edit owner/repo --public
|
||||
fj repo edit owner/repo --private
|
||||
fj repo edit owner/repo -d "New description" --homepage https://example.com
|
||||
fj repo edit --default-branch develop
|
||||
fj repo edit owner/repo --name new-name
|
||||
|
||||
# Rename a repository (shorthand)
|
||||
fgj repo rename new-name
|
||||
fgj repo rename new-name -R owner/old-name
|
||||
fj repo rename new-name
|
||||
fj repo rename new-name -R owner/old-name
|
||||
```
|
||||
|
||||
### Releases
|
||||
|
||||
```bash
|
||||
# List releases
|
||||
fgj release list
|
||||
fj release list
|
||||
|
||||
# View a release (or use "latest")
|
||||
fgj release view v1.2.3
|
||||
fj release view v1.2.3
|
||||
|
||||
# Create a release with notes and optional assets
|
||||
fgj release create v1.2.3 -t "v1.2.3" -n "Release notes" ./dist/app.tar.gz
|
||||
fj release create v1.2.3 -t "v1.2.3" -n "Release notes" ./dist/app.tar.gz
|
||||
|
||||
# Upload assets to an existing release
|
||||
fgj release upload v1.2.3 ./dist/app.tar.gz --clobber
|
||||
fj release upload v1.2.3 ./dist/app.tar.gz --clobber
|
||||
|
||||
# Delete a release (keeps the Git tag)
|
||||
fgj release delete v1.2.3
|
||||
fj release delete v1.2.3
|
||||
```
|
||||
|
||||
### Forgejo Actions
|
||||
|
||||
```bash
|
||||
# List workflows
|
||||
fgj actions workflow list
|
||||
fj actions workflow list
|
||||
|
||||
# View a workflow
|
||||
fgj actions workflow view ci.yml
|
||||
fj actions workflow view ci.yml
|
||||
|
||||
# Run a workflow (trigger workflow_dispatch)
|
||||
fgj actions workflow run deploy.yml
|
||||
fj actions workflow run deploy.yml
|
||||
|
||||
# Run a workflow with inputs
|
||||
fgj actions workflow run deploy.yml -f environment=production -f version=1.2.3
|
||||
fj actions workflow run deploy.yml -f environment=production -f version=1.2.3
|
||||
|
||||
# Run a workflow on a specific branch
|
||||
fgj actions workflow run deploy.yml -r feature-branch
|
||||
fj actions workflow run deploy.yml -r feature-branch
|
||||
|
||||
# Enable or disable a workflow
|
||||
fgj actions workflow enable ci.yml
|
||||
fgj actions workflow disable ci.yml
|
||||
fj actions workflow enable ci.yml
|
||||
fj actions workflow disable ci.yml
|
||||
|
||||
# List workflow runs
|
||||
fgj actions run list
|
||||
fj actions run list
|
||||
|
||||
# View a specific run
|
||||
fgj actions run view 123
|
||||
fj actions run view 123
|
||||
|
||||
# View run with job details
|
||||
fgj actions run view 123 --verbose
|
||||
fj actions run view 123 --verbose
|
||||
|
||||
# View run logs
|
||||
fgj actions run view 123 --log
|
||||
fj actions run view 123 --log
|
||||
|
||||
# View specific job logs
|
||||
fgj actions run view 123 --job 456 --log
|
||||
fj actions run view 123 --job 456 --log
|
||||
|
||||
# Watch a run until completion
|
||||
fgj actions run watch 123
|
||||
fj actions run watch 123
|
||||
|
||||
# Rerun a workflow run
|
||||
fgj actions run rerun 123
|
||||
fj actions run rerun 123
|
||||
|
||||
# Cancel a running workflow
|
||||
fgj actions run cancel 123
|
||||
fj actions run cancel 123
|
||||
|
||||
# List secrets
|
||||
fgj actions secret list
|
||||
fj actions secret list
|
||||
|
||||
# Create a secret
|
||||
fgj actions secret create MY_SECRET
|
||||
fj actions secret create MY_SECRET
|
||||
|
||||
# Delete a secret
|
||||
fgj actions secret delete MY_SECRET
|
||||
fj actions secret delete MY_SECRET
|
||||
|
||||
# List variables
|
||||
fgj actions variable list
|
||||
fj actions variable list
|
||||
|
||||
# Get a variable
|
||||
fgj actions variable get MY_VAR
|
||||
fj actions variable get MY_VAR
|
||||
|
||||
# Create a variable
|
||||
fgj actions variable create MY_VAR "value"
|
||||
fj actions variable create MY_VAR "value"
|
||||
|
||||
# Update a variable
|
||||
fgj actions variable update MY_VAR "new value"
|
||||
fj actions variable update MY_VAR "new value"
|
||||
|
||||
# Delete a variable
|
||||
fgj actions variable delete MY_VAR
|
||||
fj actions variable delete MY_VAR
|
||||
```
|
||||
|
||||
### Raw API Access
|
||||
|
||||
```bash
|
||||
# GET request (auto-detects owner/repo from git context)
|
||||
fgj api /repos/{owner}/{repo}/pulls
|
||||
fj api /repos/{owner}/{repo}/pulls
|
||||
|
||||
# POST with fields
|
||||
fgj api /repos/{owner}/{repo}/issues -X POST -f title="Bug report" -f body="Description"
|
||||
fj api /repos/{owner}/{repo}/issues -X POST -f title="Bug report" -f body="Description"
|
||||
|
||||
# Explicit method and hostname
|
||||
fgj api /repos/myorg/myrepo/labels --hostname my-forgejo.example.com
|
||||
fj api /repos/myorg/myrepo/labels --hostname my-forgejo.example.com
|
||||
|
||||
# Read request body from file
|
||||
fgj api /repos/{owner}/{repo}/issues -X POST --input issue.json
|
||||
fj api /repos/{owner}/{repo}/issues -X POST --input issue.json
|
||||
|
||||
# Read from stdin
|
||||
echo '{"title":"test"}' | fgj api /repos/{owner}/{repo}/issues -X POST --input -
|
||||
echo '{"title":"test"}' | fj api /repos/{owner}/{repo}/issues -X POST --input -
|
||||
|
||||
# Include response headers
|
||||
fgj api /repos/{owner}/{repo} -i
|
||||
fj api /repos/{owner}/{repo} -i
|
||||
|
||||
# Suppress output (useful for DELETE)
|
||||
fgj api /repos/{owner}/{repo}/issues/123 -X DELETE --silent
|
||||
fj api /repos/{owner}/{repo}/issues/123 -X DELETE --silent
|
||||
```
|
||||
|
||||
## Shell Completions and Man Pages
|
||||
|
||||
```bash
|
||||
# Generate shell completion scripts
|
||||
fgj completion bash > /etc/bash_completion.d/fgj
|
||||
fgj completion zsh > "${fpath[1]}/_fgj"
|
||||
fgj completion fish > ~/.config/fish/completions/fgj.fish
|
||||
fj completion bash > /etc/bash_completion.d/fj
|
||||
fj completion zsh > "${fpath[1]}/_fj"
|
||||
fj completion fish > ~/.config/fish/completions/fj.fish
|
||||
|
||||
# Generate man pages to a directory
|
||||
fgj manpages --dir ~/.local/share/man/man1
|
||||
fj manpages --dir ~/.local/share/man/man1
|
||||
```
|
||||
|
||||
## JSON Output
|
||||
|
|
@ -418,15 +418,15 @@ fgj manpages --dir ~/.local/share/man/man1
|
|||
Most list and view commands support `--json` for machine-readable output:
|
||||
|
||||
```bash
|
||||
fgj pr list --json
|
||||
fgj issue view 456 --json
|
||||
fgj release list --json
|
||||
fgj actions run list --json
|
||||
fgj actions workflow view ci.yml --json
|
||||
fj pr list --json
|
||||
fj issue view 456 --json
|
||||
fj release list --json
|
||||
fj actions run list --json
|
||||
fj actions workflow view ci.yml --json
|
||||
|
||||
# Get JSON output from PR comment/review
|
||||
fgj pr comment 123 -b "LGTM" --json
|
||||
fgj pr review 123 --approve -b "Ship it" --json
|
||||
fj pr comment 123 -b "LGTM" --json
|
||||
fj pr review 123 --approve -b "Ship it" --json
|
||||
```
|
||||
|
||||
### Structured Error Output
|
||||
|
|
@ -435,16 +435,16 @@ For machine consumption (ideal for AI agents and scripts), use `--json-errors` t
|
|||
|
||||
```bash
|
||||
# Errors are written to stderr as JSON
|
||||
fgj pr view 9999 --json-errors
|
||||
fj pr view 9999 --json-errors
|
||||
# stderr: {"error":{"code":"not_found","message":"...","status":404}}
|
||||
|
||||
# Combine with --json for fully machine-readable I/O
|
||||
fgj pr list --json --json-errors
|
||||
fj pr list --json --json-errors
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Configuration is stored in `~/.config/fgj/config.yaml`:
|
||||
Configuration is stored in `~/.config/fj/config.yaml`:
|
||||
|
||||
```yaml
|
||||
hosts:
|
||||
|
|
@ -466,9 +466,9 @@ hosts:
|
|||
|
||||
### Directory-Based Host Selection (`match_dirs`)
|
||||
|
||||
When you work with multiple Forgejo/Gitea instances, `fgj` can automatically select the right host based on your current working directory — no `--hostname` flag needed.
|
||||
When you work with multiple Forgejo/Gitea instances, `fj` can automatically select the right host based on your current working directory — no `--hostname` flag needed.
|
||||
|
||||
Each host entry supports a `match_dirs` list of directory paths. When `fgj` can't determine the host from a git remote, it finds the host whose `match_dirs` entry is the **longest prefix match** for your current directory.
|
||||
Each host entry supports a `match_dirs` list of directory paths. When `fj` can't determine the host from a git remote, it finds the host whose `match_dirs` entry is the **longest prefix match** for your current directory.
|
||||
|
||||
```yaml
|
||||
hosts:
|
||||
|
|
@ -509,15 +509,15 @@ Hostname is resolved in this priority order:
|
|||
- `--hostname`: Specify instance for a command (overrides auto-detection and environment variables)
|
||||
- `--config`: Use a custom config file
|
||||
|
||||
When working in a git repository, `fgj` automatically detects the instance from your origin remote URL, so you typically don't need to specify `--hostname` unless working with multiple instances.
|
||||
When working in a git repository, `fj` automatically detects the instance from your origin remote URL, so you typically don't need to specify `--hostname` unless working with multiple instances.
|
||||
|
||||
## Use with AI Coding Agents
|
||||
|
||||
`fgj` is designed to work seamlessly with AI coding agents like Claude Code. Use `--json` and `--json-errors` for fully machine-readable I/O:
|
||||
`fj` is designed to work seamlessly with AI coding agents like Claude Code. Use `--json` and `--json-errors` for fully machine-readable I/O:
|
||||
|
||||
```bash
|
||||
# Create PR from agent's changes
|
||||
fgj pr create -R owner/repo -t "feat: add new feature" -b "$(cat <<EOF
|
||||
fj pr create -R owner/repo -t "feat: add new feature" -b "$(cat <<EOF
|
||||
## Summary
|
||||
- Added new feature X
|
||||
- Fixed bug Y
|
||||
|
|
@ -527,29 +527,29 @@ EOF
|
|||
)" --json
|
||||
|
||||
# Check PR status during development
|
||||
fgj pr list -R owner/repo --state open --json
|
||||
fj pr list -R owner/repo --state open --json
|
||||
|
||||
# Review a PR diff, then approve
|
||||
fgj pr diff 123
|
||||
fgj pr review 123 --approve -b "LGTM" --json
|
||||
fj pr diff 123
|
||||
fj pr review 123 --approve -b "LGTM" --json
|
||||
|
||||
# Post review feedback
|
||||
fgj pr comment 123 -b "Consider using a map here for O(1) lookup" --json
|
||||
fj pr comment 123 -b "Consider using a map here for O(1) lookup" --json
|
||||
|
||||
# Request changes with detailed feedback
|
||||
fgj pr review 123 --request-changes --body-file feedback.md --json
|
||||
fj pr review 123 --request-changes --body-file feedback.md --json
|
||||
|
||||
# Use raw API for anything not covered by commands
|
||||
fgj api /repos/{owner}/{repo}/topics --json-errors
|
||||
fgj api /repos/{owner}/{repo}/labels -X POST -f name=agent-reviewed -f color="#00ff00"
|
||||
fj api /repos/{owner}/{repo}/topics --json-errors
|
||||
fj api /repos/{owner}/{repo}/labels -X POST -f name=agent-reviewed -f color="#00ff00"
|
||||
|
||||
# Fully machine-readable error handling
|
||||
fgj pr view 9999 --json --json-errors 2>errors.json
|
||||
fj pr view 9999 --json --json-errors 2>errors.json
|
||||
```
|
||||
|
||||
## Supported Instances
|
||||
|
||||
`fgj` works with any Forgejo or Gitea instance, including:
|
||||
`fj` works with any Forgejo or Gitea instance, including:
|
||||
|
||||
- Self-hosted Forgejo instances
|
||||
- Self-hosted Gitea instances
|
||||
|
|
@ -557,11 +557,11 @@ fgj pr view 9999 --json --json-errors 2>errors.json
|
|||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! Please feel free to submit a Pull Request at [forgejo.zerova.net/public/fgj-sid](https://forgejo.zerova.net/public/fgj-sid).
|
||||
Contributions are welcome! Please feel free to submit a Pull Request at [forgejo.zerova.net/public/fj](https://forgejo.zerova.net/public/fj).
|
||||
|
||||
## Missing Features / Roadmap
|
||||
|
||||
`fgj` aims to be a drop-in replacement for `gh` when working with Forgejo and Gitea instances. While we've implemented the core features, some `gh` commands are not yet available:
|
||||
`fj` aims to be a drop-in replacement for `gh` when working with Forgejo and Gitea instances. While we've implemented the core features, some `gh` commands are not yet available:
|
||||
|
||||
**Not Yet Implemented:**
|
||||
- `run delete` - Delete a workflow run
|
||||
|
|
@ -576,7 +576,7 @@ We welcome contributions to implement any of these features!
|
|||
|
||||
## Acknowledgments
|
||||
|
||||
Based on [fgj by romaintb](https://codeberg.org/romaintb/fgj). Enhanced with agentic dev features for AI-assisted workflows.
|
||||
Based on [fj by romaintb](https://codeberg.org/romaintb/fj). Enhanced with agentic dev features for AI-assisted workflows.
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue