NyaPr ฅ^•ﻌ•^ฅ
NyaPr is a tiny Ruby tool for people who have too many GitHub repositories, too many organizations, too many pull requests, and absolutely no desire to click through all that manually.
It collects repositories you own or contribute to, finds their open pull requests, and puts everything into one place.
For maximum kawaii.
Quick start
Install the gem:
gem install nya_prSet your GitHub token:
export GITHUB_TOKEN=your_tokenRun NyaPr:
nya-pr --user your-github-usernameTo include additional users or organizations:
nya-pr --user your-github-username --owners org-one,org-twoNyaPr will collect relevant repositories, find open pull requests, print them to the terminal, and save the results under data/.
Why NyaPr?
GitHub is perfectly happy to show you:
- all repositories in a giant organization;
- pull requests you authored;
- pull requests where somebody mentioned you;
- approximately seventeen billion other things.
What it does not make particularly convenient is:
Show me open pull requests from my own repositories plus repositories in these organizations where I actually contribute.
NyaPr does exactly that.
The basic flow is:
GitHub users / organizations
↓
collect repositories
↓
keep repositories you actually contribute to
↓
optionally skip archived repositories
↓
cache the repository list
↓
find open pull requests
↓
terminal + timestamped CSV
↓
nya ฅ^•ﻌ•^ฅ
Requirements
- Ruby 4+
- A GitHub personal access token
- A reasonable appreciation of cats
Setup
Install the dependencies:
bundle installCreate a .env file:
GITHUB_TOKEN=your_github_token
For private repositories, make sure the token has access to them. If an organization uses SSO, the token may also need to be authorized for that organization.
Usage
Run NyaPr with your GitHub username:
ruby run.rb --user bodrovisYou can also provide additional users or organizations whose repositories should be inspected:
ruby run.rb \
--user bodrovis \
--owners org1,org2Your own repositories are always included automatically.
For other users and organizations, NyaPr checks which repositories contain commits authored by the specified GitHub user.
Data directory
By default, NyaPr stores generated data inside the data directory.
The repository cache is stored as:
data/repositories.csv
Each pull request scan gets its own timestamped directory:
data/
├── repositories.csv
├── pull_requests_20260912_201845/
│ └── pull_requests.csv
└── pull_requests_20260912_204112/
└── pull_requests.csv
This keeps repository discovery cached while preserving the results of individual pull request scans.
Missing directories are created automatically.
Repository cache
Repository discovery can involve a lot of GitHub API requests, especially for large organizations.
NyaPr therefore stores discovered repositories in:
data/repositories.csv
On subsequent runs, this file is used as a cache instead of scanning GitHub again.
To force a fresh repository scan:
ruby run.rb \
--user bodrovis \
--owners org1,org2 \
--refreshYou can use another repository cache file:
ruby run.rb \
--user bodrovis \
--repositories-csv "C:\Users\me\repositories.csv"Both relative and absolute paths are supported.
Repository contribution checks are performed concurrently using a small thread pool, because waiting for hundreds of HTTP requests one by one is not particularly kawaii.
Skipping archived repositories
Archived repositories are usually ancient tombs where pull requests go to sleep forever.
You can ignore them completely:
ruby run.rb \
--user bodrovis \
--owners org1,org2 \
--skip-archivedWhen this option is enabled, archived repositories are removed before expensive contribution checks are performed.
Maximum efficiency. Minimum archaeology.
Pull requests
After preparing the repository list, NyaPr searches each repository for open pull requests.
Results are grouped by repository and printed to the terminal:
bodrovis/example
----------------
#42 Fix pagination
Author: @someone
https://github.com/bodrovis/example/pull/42
#43 [DRAFT] Add nya support
Author: @someone_else
https://github.com/bodrovis/example/pull/43
They are also written to a timestamped CSV file:
data/pull_requests_20260912_201845/pull_requests.csv
The CSV contains:
repository
number
title
author
draft
created_at
updated_at
html_url
By default, NyaPr stops after collecting 100 open pull requests.
You can change the limit with --limit:
ruby run.rb \
--user bodrovis \
--limit 250You can also change the base directory where pull request runs are stored:
ruby run.rb \
--user bodrovis \
--pull-requests-dir "C:\Users\me\nya-results"This produces something like:
C:\Users\me\nya-results\pull_requests_20260912_201845\pull_requests.csv
Each run still gets its own timestamped directory.
Logging
NyaPr uses normal log levels instead of spraying random puts statements everywhere like an animal.
The default level is info.
Example:
ruby run.rb \
--user bodrovis \
--owners org1,org2 \
--log-level infoAt the info level, NyaPr reports the major stages of the run: loading or discovering repositories, filtering contributions, searching for pull requests, and saving results.
For HTTP-level details:
ruby run.rb ... --log-level debugThis also shows requests, responses, skipped empty repositories, detected contributions, and other useful diagnostic information.
Available levels:
debug
info
warn
error
fatal
Logs are written to stderr, while actual pull request output goes to stdout.
CLI options
-u, --user USERNAME GitHub username
-o, --owners LIST Additional users or organizations, comma-separated
--token TOKEN GitHub token (GITHUB_TOKEN env variable is recommended)
--repositories-csv PATH Repository cache CSV path
--pull-requests-dir PATH Directory for pull request runs
-l, --limit N Maximum number of pull requests to collect
-r, --refresh Refresh repositories from GitHub
--skip-archived Ignore archived repositories
--skip-drafts Ignore draft pull requests
--[no-]progress Show or hide progress bars
--exclude-repos Repositories to exclude, in owner/name format
--save-pull-requests Save pull requests to CSV
--log-level LEVEL Logging level
-w, --workers Number of repository scan workers
-v, --version Show NyaPr version
-c, --config Configuration file path
Example with most options enabled:
ruby run.rb \
--user bodrovis \
--owners org1,org2 \
--repositories-csv "data/repositories.csv" \
--pull-requests-dir "data" \
--limit 250 \
--skip-archived \
--refresh \
--log-level debugYAML configuration
NyaPr can load options from a YAML configuration file. By default, it looks for .nya-pr.yml in the current directory.
username: your-github-username
owners:
- organization-one
- organization-two
limit: 100
skip_archived: true
skip_drafts: true
progress: true
log_level: infoYou can also provide a custom configuration file:
nya-pr --config path/to/config.ymlCommand-line options override values from the YAML file. Any options not defined in either place use NyaPr's built-in defaults.
For example:
limit: 200
progress: truenya-pr --limit 50 --no-progressIn this case, NyaPr uses limit: 50 and disables progress output.
Unknown configuration options and invalid values are reported as errors.
How repository discovery works
For your own GitHub username, NyaPr collects repositories owned by your authenticated account.
For additional owners:
- NyaPr determines whether the owner is a GitHub user or organization.
- It collects their repositories.
- Archived repositories can optionally be removed.
- NyaPr checks whether your GitHub user has commits in each repository.
- Only repositories where you contributed are retained.
Contribution checks run concurrently using a limited number of worker threads.
Empty Git repositories are simply skipped.
Repositories with pull requests disabled are also skipped when searching for PRs.
The prepared repository list is cached, but pull requests are fetched fresh on every run.
License
(c) Elijah S. Krukowski, MIT license