class Rubydex::CLI::Command

Base class for rdx subcommands. A subcommand parses its own options out of argv and, when it needs one, builds the workspace graph through {#build_graph}.

Subclasses live one per file in lib/rubydex/cli/command/ and describe themselves with a small DSL, which supplies both the name they are dispatched under and their entry in ‘rdx help`:

class Query < Command
  command "query"
  arguments "<CYPHER>"
  summary "Run a Cypher query against the workspace graph and print the result."
end

There is no registration list to keep in step: {.all} loads every file in that directory and discovers the commands through ‘Class#subclasses`.

‘rdx console` — opens an IRB session with a populated graph for the current workspace.

‘rdx lint [PATH]` — discovers project and dependency rules and runs them against a workspace.

‘rdx mcp [PATH]` — runs the MCP server for AI assistants. The workspace defaults to the current directory.

‘rdx query <CYPHER>` — runs a Cypher query against the workspace graph and prints the result. --schema describes the queryable schema instead, which needs no graph.