RuboCounsel
An interactive CLI tool that transforms the RuboCop experience from "fix these errors" to "let's decide on your team's style together." Instead of dumping a wall of offenses, RuboCounsel walks you through each failing cop, explains what it does, shows real code examples, and helps you make informed decisions that get written to .rubocop.yml.
The result: a RuboCop configuration that reflects conscious choices, not cargo-culted defaults.
Installation
Add the gem to your application's Gemfile:
bundle add rubocounsel
Or install it directly:
gem install rubocounsel
Usage
Run RuboCounsel against your project:
rubocounsel
Or specify paths:
rubocounsel app/ lib/
Any RuboCop flags are passed through, so you can filter to specific cops or use a custom config:
rubocounsel --only Style/StringLiterals
rubocounsel --config .rubocop_strict.yml app/
RuboCounsel will:
- Run RuboCop and identify which cops have offenses
- Skip any cops you've already configured in
.rubocop.yml - Walk you through each remaining cop interactively
For each cop, you'll see its documentation and a link to the full docs, then choose to:
- Configure — set the cop's attributes (style, max length, etc.) via guided prompts
- Disable — add
Enabled: falseto your config - Skip — leave it unconfigured for now
Configuration choices are saved to .rubocop.yml after each cop, so you won't lose progress if you quit early. Re-running RuboCounsel will pick up where you left off, skipping cops that are already configured.
RuboCounsel supports extension gems like rubocop-rails, rubocop-rspec, and rubocop-performance — any cops registered in your bundle will be included automatically.
Development
After checking out the repo, run bin/setup to install dependencies. Then, run bin/test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/dewyze/rubocounsel. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the RuboCounsel project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.