{"id":13879762,"url":"https://github.com/ankane/archer","last_synced_at":"2025-11-17T14:06:31.083Z","repository":{"id":59150665,"uuid":"154402394","full_name":"ankane/archer","owner":"ankane","description":"Rails console history for Heroku, Docker, and more","archived":false,"fork":false,"pushed_at":"2025-10-22T05:17:49.000Z","size":66,"stargazers_count":84,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-12T05:22:13.226Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ankane.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2018-10-23T22:01:58.000Z","updated_at":"2025-11-04T09:50:48.000Z","dependencies_parsed_at":"2024-06-10T04:29:15.499Z","dependency_job_id":"0287e91a-a009-4fc1-aae3-bdca6779f6a7","html_url":"https://github.com/ankane/archer","commit_stats":{"total_commits":87,"total_committers":3,"mean_commits":29.0,"dds":"0.29885057471264365","last_synced_commit":"e2be1e777b8682eb2532b22cdbd6d1120753f722"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/ankane/archer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankane%2Farcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankane%2Farcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankane%2Farcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankane%2Farcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankane","download_url":"https://codeload.github.com/ankane/archer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankane%2Farcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284668234,"owners_count":27044034,"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","status":"online","status_checked_at":"2025-11-16T02:00:05.974Z","response_time":65,"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":[],"created_at":"2024-08-06T08:02:31.998Z","updated_at":"2025-11-17T14:06:31.066Z","avatar_url":"https://github.com/ankane.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Archer\n\nRails console history for Heroku, Docker, and more\n\n![Screenshot](https://ankane.org/images/archer-readme.png)\n\nDesigned for platforms with ephemeral filesystems\n\n[![Build Status](https://github.com/ankane/archer/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/archer/actions)\n\n## Installation\n\nAdd this line to your application’s Gemfile:\n\n```ruby\ngem \"archer-rails\"\n```\n\nAnd run:\n\n```sh\nrails generate archer:install\nrails db:migrate\n```\n\nLastly, update your Gemfile to only include it in environments where you need it:\n\n```ruby\ngem \"archer-rails\", group: [:production]\n```\n\n## How It Works\n\nRuby stores console history in a file specified by:\n\n```ruby\nIRB.conf[:HISTORY_FILE]\n```\n\nThis file gets lost on ephemeral filesystems. Instead, we store its contents in the database.\n\n## Users\n\nEach user can keep their own history. The user determined by `ENV[\"USER\"]` by default. You can specify a user when starting the console with:\n\n```sh\nUSER=andrew rails console\n```\n\nConfirm it worked with:\n\n```rb\nArcher.user\n```\n\n## Clearing History\n\nDisable saving history for the current session with:\n\n```ruby\nArcher.save_session = false\n```\n\nYou should do this when running sensitive commands.\n\nClear history for current user with:\n\n```ruby\nArcher.clear\n```\n\n## Configuration\n\nChange the number of commands to remember\n\n```ruby\nArcher.limit = 200 # default\n```\n\nChange how the user is determined\n\n```ruby\nArcher.user = ENV[\"USER\"] # default\n```\n\n## Platform Notes\n\n### Heroku\n\nFor user-specific history, the command should follow this format:\n\n```sh\nheroku run USER=andrew rails console\n```\n\nSet up an [alias](https://shapeshed.com/unix-alias/) to save yourself some typing\n\n```sh\nalias hc=\"heroku run USER=andrew rails console\"\n```\n\n### Dokku\n\nThere’s no way to specify a user at the moment.\n\n## History\n\nView the [changelog](https://github.com/ankane/archer/blob/master/CHANGELOG.md)\n\n## Contributing\n\nEveryone is encouraged to help improve this project. Here are a few ways you can help:\n\n- [Report bugs](https://github.com/ankane/archer/issues)\n- Fix bugs and [submit pull requests](https://github.com/ankane/archer/pulls)\n- Write, clarify, or fix documentation\n- Suggest or add new features\n\nTo get started with development:\n\n```sh\ngit clone https://github.com/ankane/archer.git\ncd archer\nbundle install\nbundle exec rake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankane%2Farcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankane%2Farcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankane%2Farcher/lists"}