{"id":20204572,"url":"https://github.com/wilsonsilva/senior","last_synced_at":"2026-06-08T17:30:56.843Z","repository":{"id":152358500,"uuid":"625838962","full_name":"wilsonsilva/senior","owner":"wilsonsilva","description":"AI-powered pair programming tool","archived":false,"fork":false,"pushed_at":"2023-10-25T12:42:35.000Z","size":285,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-26T02:26:13.013Z","etag":null,"topics":["ai","artificial-intelligence","gpt","gpt-3","gpt-4","pair-programming","ruby","ruby-gem","tool","tools"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wilsonsilva.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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-04-10T08:03:14.000Z","updated_at":"2023-04-10T13:15:20.000Z","dependencies_parsed_at":"2025-03-03T09:31:03.572Z","dependency_job_id":"2cad221a-5df9-4dec-88af-90bd141882fb","html_url":"https://github.com/wilsonsilva/senior","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/wilsonsilva/senior","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsonsilva%2Fsenior","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsonsilva%2Fsenior/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsonsilva%2Fsenior/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsonsilva%2Fsenior/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wilsonsilva","download_url":"https://codeload.github.com/wilsonsilva/senior/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilsonsilva%2Fsenior/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34073633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","artificial-intelligence","gpt","gpt-3","gpt-4","pair-programming","ruby","ruby-gem","tool","tools"],"created_at":"2024-11-14T05:13:57.087Z","updated_at":"2026-06-08T17:30:56.838Z","avatar_url":"https://github.com/wilsonsilva.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Senior\n\n[![Gem Version](https://badge.fury.io/rb/senior.svg)](https://badge.fury.io/rb/senior)\n[![Tests](https://github.com/wilsonsilva/senior/actions/workflows/main.yml/badge.svg)](https://github.com/wilsonsilva/senior/actions/workflows/main.yml)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/87e6e2167d3283e3b79b/test_coverage)](https://codeclimate.com/github/wilsonsilva/senior/test_coverage)\n[![Maintainability](https://api.codeclimate.com/v1/badges/87e6e2167d3283e3b79b/maintainability)](https://codeclimate.com/github/wilsonsilva/senior/maintainability)\n\nAn AI-powered pair programmer. Provides a user-friendly interface for using AI API's to automatically repair broken code\nand suggest improvements. Simply provide the faulty code as input, and the gem will generate a corrected version using\nadvanced machine learning techniques.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Auto-debugging a broken method](#auto-debugging-a-broken-method)\n  - [Suggesting a fix for a broken method](#suggesting-a-fix-for-a-broken-method)\n- [Development](#development)\n  - [Type checking](#type-checking)\n- [Contributing](#contributing)\n- [License](#license)\n- [Code of Conduct](#code-of-conduct)\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n    $ bundle add senior\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    $ gem install senior\n\n## Usage\n\n- Get your API key from https://platform.openai.com/account/api-keys\n- (optional) If you belong to multiple organizations, you can get your Organization ID from https://platform.openai.com/account/org-settings\n- Configure the library by passing your OpenAI API credentials:\n\n```ruby\nSenior.configure do |config|\n  config.open_ai.access_token = ENV.fetch('OPEN_AI_ACCESS_TOKEN')\n  config.open_ai.organization_id = ENV.fetch('OPEN_AI_ORGANIZATION_ID') # Optional\nend\n```\n\nNote that `OPEN_AI_ACCESS_TOKEN` and `OPEN_AI_ORGANIZATION_ID` are environment variables that should be set in your\nenvironment. You should never hardcode your API credentials directly in your code, as this is a security risk.\nInstead, store your API credentials securely, such as using environment variables or a separate configuration file that\nis excluded from source control.\n\nOnce you have configured the gem, you can use the `Senior` module to interact with the OpenAI API.\n\n### Auto-debugging a broken method\nTo debug a broken method, call `Senior.auto_debug_method` and pass in the broken method and its arguments. The method will be\ncalled repeatedly, with modifications made to its source code each time, until it no longer raises exceptions.\n\n```ruby\ndef square(n) = n * y\n\nresult = Senior.auto_debug_method(method(:square), 2)\nputs result # =\u003e 4\n```\n\n### Suggesting a fix for a broken method\nTo suggest a fix for a broken method, call `Senior.suggest_method_fix` and pass in the broken method and its arguments.\nThe method will be analyzed and a fix will be suggested in the form of modified source code.\n\n```ruby\ndef square(n) = n * y\n\nsuggestion = Senior.suggest_method_fix(method(:square), 2)\nputs suggestion # =\u003e \"def square(n) = n * n\"\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.\n\nSet your OpenAI API credentials in the environment variables `OPEN_AI_ACCESS_TOKEN` and `OPEN_AI_ORGANIZATION_ID`.\nEither in your machine's environment or in a `.env` file in the root of the project.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\n\nYou can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`,\nwhich will create a git tag for the version, push git commits and the created tag, and push the `.gem` file\nto [rubygems.org](https://rubygems.org).\n\nThe health and maintainability of the codebase is ensured through a set of\nRake tasks to test, lint and audit the gem for security vulnerabilities and documentation:\n\n```\nrake build                    # Build senior.gem into the pkg directory\nrake build:checksum           # Generate SHA512 checksum if senior.gem into the checksums directory\nrake bundle:audit:check       # Checks the Gemfile.lock for insecure dependencies\nrake bundle:audit:update      # Updates the bundler-audit vulnerability database\nrake clean                    # Remove any temporary products\nrake clobber                  # Remove any generated files\nrake coverage                 # Run spec with coverage\nrake install                  # Build and install senior.gem into system gems\nrake install:local            # Build and install senior.gem into system gems without network access\nrake qa                       # Test, lint and perform security and documentation audits\nrake release[remote]          # Create a tag, build and push senior.gem to rubygems.org\nrake rubocop                  # Run RuboCop\nrake rubocop:autocorrect      # Autocorrect RuboCop offenses (only when it's safe)\nrake rubocop:autocorrect_all  # Autocorrect RuboCop offenses (safe and unsafe)\nrake spec                     # Run RSpec code examples\nrake verify_measurements      # Verify that yardstick coverage is at least 100%\nrake yard                     # Generate YARD Documentation\nrake yard:junk                # Check the junk in your YARD Documentation\nrake yardstick_measure        # Measure docs in lib/**/*.rb with yardstick\n```\n\n### Type checking\n\nThis gem leverages [RBS](https://github.com/ruby/rbs), a language to describe the structure of Ruby programs. It is\nused to provide type checking and autocompletion in your editor. Run `bundle exec typeprof FILENAME` to generate\nan RBS definition for the given Ruby file. And validate all definitions using [Steep](https://github.com/soutaro/steep)\nwith the command `bundle exec steep check`.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/wilsonsilva/senior. This project is intended\nto be a safe, welcoming space for collaboration, and contributors are expected to adhere to the\n[code of conduct](https://github.com/wilsonsilva/senior/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Senior project's codebases, issue trackers, chat rooms and mailing lists is expected to\nfollow the [code of conduct](https://github.com/wilsonsilva/senior/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilsonsilva%2Fsenior","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilsonsilva%2Fsenior","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilsonsilva%2Fsenior/lists"}