{"id":16482048,"url":"https://github.com/segersniels/propr","last_synced_at":"2026-05-09T20:38:47.056Z","repository":{"id":148388346,"uuid":"620400921","full_name":"segersniels/propr","owner":"segersniels","description":"Generate GitHub PR descriptions from the command line with the help of AI. propr aims to populate a basic PR description right from your terminal so you can focus on more important things.","archived":false,"fork":false,"pushed_at":"2024-05-14T08:51:43.000Z","size":374,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-14T09:30:55.878Z","etag":null,"topics":["ai","cli","description","diff","generate","golang","pull-request"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/segersniels.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-28T15:55:07.000Z","updated_at":"2024-06-19T10:14:28.910Z","dependencies_parsed_at":"2024-05-14T09:40:34.505Z","dependency_job_id":null,"html_url":"https://github.com/segersniels/propr","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segersniels%2Fpropr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segersniels%2Fpropr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segersniels%2Fpropr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segersniels%2Fpropr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/segersniels","download_url":"https://codeload.github.com/segersniels/propr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240149470,"owners_count":19755723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cli","description","diff","generate","golang","pull-request"],"created_at":"2024-10-11T13:09:28.682Z","updated_at":"2026-05-09T20:38:42.018Z","avatar_url":"https://github.com/segersniels.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Propr\n\n[![npm](https://img.shields.io/npm/v/@segersniels/propr)](https://www.npmjs.com/package/@segersniels/propr)![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/segersniels/propr/ci.yml)\n\nGenerate GitHub PR descriptions from the command line with the help of AI.\n`propr` aims to populate a basic PR description right from your terminal so you can focus on more important things.\n\n## Install\n\n### NPM\n\n```bash\nnpm install -g @segersniels/propr\n```\n\n### Script\n\n```bash\n# Install in the current directory\ncurl -sSL https://raw.githubusercontent.com/segersniels/propr/master/scripts/install.sh | bash\n# Install in /usr/local/bin\ncurl -sSL https://raw.githubusercontent.com/segersniels/propr/master/scripts/install.sh | sudo bash -s /usr/local/bin\n```\n\n### Manual\n\n1. Download the latest binary from the [releases](https://github.com/segersniels/propr/releases/latest) page for your system\n2. Rename the binary to `propr`\n3. Copy the binary to a location in your `$PATH`\n\n## Prerequisites\n\nBefore using Propr, you'll need to set up the following:\n\n1. **GitHub Token**: Set the `GITHUB_TOKEN` environment variable with a valid GitHub token that has permissions to create pull requests.\n\n   ```bash\n   export GITHUB_TOKEN=your_github_token\n   ```\n\n2. **AI Provider API Key**: Depending on which AI model you want to use, set one of the following environment variables:\n\n   - For OpenAI models (default): `export OPENAI_API_KEY=your_openai_api_key`\n   - For Anthropic models: `export ANTHROPIC_API_KEY=your_anthropic_api_key`\n   - For DeepSeek models: `export DEEPSEEK_API_KEY=your_deepseek_api_key`\n\n## Usage\n\nBefore you can get started, write some code and push it to a branch. Then depending on your needs, you can use the following commands:\n\n```bash\nNAME:\n   propr - Generate your PRs from the command line with AI\n\nUSAGE:\n   propr [global options] command [command options]\n\nCOMMANDS:\n   create    Creates a PR with a generated description\n   generate  Generates a PR description and outputs it\n   config    Configure propr to your liking\n   help, h   Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h     show help\n   --version, -v  print the version\n```\n\n## Configuration Options\n\nPropr can be configured with the following options:\n\n1. **Model**: Choose which AI model to use for generating PR descriptions.\n2. **Prompt**: Customize the system prompt used to generate PR descriptions.\n3. **Template**: Define the template structure for your PR descriptions (default: `# Description`).\n4. **Pretty Print**: Enable or disable pretty printing of the generated output (default: `true`).\n\nExample configuration:\n\n```json\n{\n  \"model\": \"gpt-4o-mini\",\n  \"prompt\": \"You are responsible to write a concise GitHub PR description...\",\n  \"template\": \"# Description\\n\\n## Changes\\n\\n## Why\",\n  \"pretty_print\": true\n}\n```\n\n## Advanced Usage\n\n### Customizing Templates\n\nYou can customize the PR description template to match your team's standards. For example:\n\n```bash\npropr config init\n```\n\nThen, when prompted, enter a template like:\n\n```\n# Description\n\n## Changes\n-\n\n## Impact\n-\n\n## Testing\n-\n```\n\n### Debug Mode\n\nEnable debug mode to see more detailed logs:\n\n```bash\nDEBUG=true propr generate\n```\n\n## Common Gotchas and Troubleshooting\n\n### API Key Issues\n\nIf you encounter errors like `OPENAI_API_KEY is not set`, make sure you've set the appropriate environment variable for your chosen model.\n\n### Git Repository Issues\n\n1. **No Remote Origin**: Propr requires a GitHub repository with a remote origin set up. Make sure your local repository has a remote origin pointing to GitHub.\n2. **No Changes**: If you get an error like `not enough changes found to generate`, make sure you have committed and pushed changes to your branch.\n3. **Branch Comparison**: By default, Propr compares your current branch to the repository's default branch. If you want to compare against a different branch, use the `--branch` flag.\n4. **Repository Format**: Propr expects the remote origin URL to be in a standard GitHub format (e.g., `https://github.com/username/repo.git` or `git@github.com:username/repo.git`).\n\n### Rate Limiting\n\nIf you encounter rate limiting issues with the GitHub API, consider using a personal access token with higher rate limits.\n\n### Large Diffs\n\nFor very large changes, the AI model might struggle to generate a comprehensive description due to token limits. In such cases:\n\n- Consider breaking your PR into smaller, more focused changes\n- Propr automatically filters out lock files like `package-lock.json`, `yarn.lock`, etc. to save on tokens\n\n## Environment Variables\n\n- `GITHUB_TOKEN`: Required for creating PRs and accessing repository information\n- `OPENAI_API_KEY`: Required when using OpenAI models\n- `ANTHROPIC_API_KEY`: Required when using Anthropic models\n- `DEEPSEEK_API_KEY`: Required when using DeepSeek models\n- `DEBUG`: Set to any value to enable debug logging\n\n## How It Works\n\nPropr works by:\n\n1. Fetching the diff between your current branch and the target branch\n2. Collecting commit messages from your branch\n3. Sending this information to the configured AI model\n4. Generating a PR description based on the changes\n5. Optionally creating a PR with the generated description\n\nThe tool automatically filters out lock files and other large generated files to optimize token usage.\n\n## Contributing\n\nContributions are welcome! Check out the [GitHub repository](https://github.com/segersniels/propr) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegersniels%2Fpropr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsegersniels%2Fpropr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegersniels%2Fpropr/lists"}