rightnow
Rails-aware code resolver.
Installation
gem install rightnowQuick Examples
rn user
rn m user
rn c admin/users
rn helper abc def ghi
rn app/controllers/application_controller.rb
rn public robots
rn user --print
rn user --jsonWhat It Does
rn resolves a short query to the most likely existing file in a Rails project.
It ranks candidates with simple heuristics and opens the best match.
It is not a grep tool.
It is not a generator.
Query Model
rn supports three basic query styles:
- path-like queries are strongest
- kind-prefixed queries narrow the search scope
- generic queries search across known Rails paths
Slash-separated and space-separated forms are equivalent:
rn c admin users
rn c admin/usersSupported Kinds
The command feel is intentionally close to Rails generator conventions.
-
model/m -
controller/c -
helper/h -
view/v -
job/j servicemailerchannelpublic
Output Modes
rn user --print
rn user --json--print prints the best path only.
--json prints scored candidate data.
Search Scope
rn only searches Rails-relevant paths such as:
app/modelsapp/controllersapp/helpersapp/viewsapp/servicesapp/jobsapp/mailersapp/channelspublic
It does not search log files, tmp, vendor, node_modules, or arbitrary file contents.
Philosophy
- resolver, not search engine
- Rails-aware
- finite candidate set
- predictable heuristics
- generator-like ergonomics
Non-Goals
- no grep-style full text search
- no TUI yet
- no LSP integration
- no log viewer
Future
Possible future work includes rni, better ranking, and optional indexing.
License
MIT