{"id":15055293,"url":"https://github.com/wassson/tailor","last_synced_at":"2025-04-10T03:40:21.536Z","repository":{"id":210775445,"uuid":"726640250","full_name":"wassson/tailor","owner":"wassson","description":"🤖 AI code reviewer for GitHub pull requests.","archived":false,"fork":false,"pushed_at":"2024-02-07T15:52:31.000Z","size":4320,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-24T04:51:37.531Z","etag":null,"topics":["ai","code-review","ollama","tailorai","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/wassson.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}},"created_at":"2023-12-02T23:39:27.000Z","updated_at":"2024-12-07T12:54:30.000Z","dependencies_parsed_at":"2023-12-10T16:38:40.553Z","dependency_job_id":null,"html_url":"https://github.com/wassson/tailor","commit_stats":null,"previous_names":["feelgoodai/tailor","wassson/tailor"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassson%2Ftailor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassson%2Ftailor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassson%2Ftailor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassson%2Ftailor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wassson","download_url":"https://codeload.github.com/wassson/tailor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154675,"owners_count":21056541,"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","code-review","ollama","tailorai","typescript"],"created_at":"2024-09-24T21:40:12.218Z","updated_at":"2025-04-10T03:40:21.511Z","avatar_url":"https://github.com/wassson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tailor\n\nTailor is an open-source AI code reviewer for GitHub pull requests built on Typescript \u0026 Ollama. Push pull request reviews and descriptions from the command line. \n\n### Install\nTo test locally, clone the repo and run:\n```\nnpm install -g .\n```\nThen:\n```\ncp .env.example .env\n```\nYou will need to set the following env variables:\n```\n# GitHub username\nGITHUB_LOGIN=\n# Username if working on a repo you own, otherwise repo owner\nGITHUB_OWNER=\n# Repository owned by the owner set above\nGITHUB_REPOSITORY=\n# Personal Access Token\nGITHUB_PAT=\n```\n\n### Commands\n1. Open pull requests\n  - The below command lists all open PRs created by the user set in the `GITHUB_LOGIN` environment variable with a format of: `#pr-number branch-name - PR Title`\n```\nopen-pulls\n\n--------------------\n# example response\n\n#8 feature-slack-auth - Integrate Slack w/ Oauth 2.0\n#9 fix-tooltip-wrapper - Fix non-fading tooltip bug\n```\n\n2. Generate and push a description\n  - This command *will* push a description to your PR, but it may or may not be accurate at the moment (😂), so be careful. I am experimenting with different models (and prompt engineering) in order to provide a good suggestion for the model most likely to get this command right. \n```\ndescribe \u003cpr-number\u003e\n```\n\n### In-progress commands\n1. Generate and push a PR review\n  - This command doesn't work quite yet (although, technically, you can still run it). Currently, `tailorai` can pull a PR diff from github, but the diff won't be reviewed. I am experimenting with parsing logic, but as it stands, reviews are performed on chunks rather than the whole document, and context is lost. A better plan is required for this to be effective.\n```\nreview \u003cpr-number\u003e\n```\n\n### Ollama\n[Installation directions](https://github.com/jmorganca/ollama)\n\n\n## Roadmap\n\nI am currently working to port over the work I've already completed in my initial project (read below), but for now:\n\n1. **CLI** \n  * ✅ `tailorai` npm package.\n  * ✅ Generate CLI commands with `commander`.\n  * ✅ Get a list of open PRs by executing `open-pulls` to reduce the cumbersome nature of searching for PR numbers. Response is a list with the format: `#pr-number branch-name - PR Title`.\n  * Trigger a review by executing `review [pull request number]`.\n    - ✅ Get diff\n    - Reviews won't work until the Ollama integration is finished.\n    - Should this include an option to iterate through diff chunks? Not all chunks need a review.\n  * Add PR description with `describe [pull request number]`.\n    - ✅ Get diff\n    - ✅ Generate description and push to PR.\n      - Prompt needs to be improved for accuracy.\n    - Should the describe command response be editable before pushing to GH?\n2. **Diff parser \u0026 GitHub API**\n  * Currently porting over a custom diff parser that will interact with the Ollama models.\n  * ✅ Basic diff API.\n3. **Customization**\n  * Allow users to choose what model (including custom models) reviews their code.\n  * Implement something similar to `.gitignore` ignore code that should never be reviewed.\n4. **Retrieval Augmented Generation**\n  * Implement RAG (with Pinecone?) to provide Tailor with additional context from the codebase it is installed on.\n5. **Repo quality of life**\n  * ✅ GitHub Action for publishing to npm.\n  * Test suite.\n  * Split roadmap into it's own `.md` file.\n  * ✅ Refactor `index.ts`.\n  * Branch protection.\n\n## History \n\n### Rails/NextJS \u0026 OpenAI\n\nFor several months I've experimented with building a full-fledged web app in different ecosystems (NextJS \u0026 Rails). I had achieved my goal of building a code review platform that could: (1) review pull request diffs, or even allow devs to push straight to ```main``` and identify issues before deploys, (2) provide a simple UI with a fine-grain toolset for reviewing even the smallest of diff chunks, and (3) remain flexible enough to support any GitHub workflow. The real challenge remained in keeping the use of OpenAI's API cost-effective, and is a challenge I found few solutions for as PR diffs can be quite large.\n\nWith GitHub's recent release of their own code review tools, I believe it makes more sense to pivot and build something that doesn't need to compete! The ecosystem of free, open-source AI tools has grown tremendously in 2023, and I'm hoping Tailor will join the current cadre as an effective tool that empowers developers to build well and build quickly - for free. \n\n### Pivoting with Ollama\n\nWe use APIs like OpenAI's because it's nearly impossible to host Large Language Models without serious funding and complex tooling, but tools like ```Ollama``` and ```Langchain``` make this possible on local machines with a few gigs (2GB-70GB depending on the model lol) of extra space. Continuing with the web app paradigm would mean running at least two servers (Tailor \u0026 Ollama) on top of any other servers required for your own development. By pivoting away from a web app (ultimately losing the UI) and instead focusing on an installable package with command line tools, we reduce the complexity needed to run the app by a significant amount. \n\n## Enterprise\n\nI am working on a more robust team solution as well. If you are interested in discussing possible solutions for specific use cases, please email me at ```austin@fgai.dev```.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwassson%2Ftailor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwassson%2Ftailor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwassson%2Ftailor/lists"}