Class: RailsAgents::CLI
- Inherits:
-
Object
- Object
- RailsAgents::CLI
- Defined in:
- lib/rails_agents.rb
Constant Summary collapse
- AGENT_NAMES =
%w[ api controllers devops graphql jobs models services stimulus tests views ].freeze
- AGENT_CATEGORIES =
Agent categories for organized display
{ 'Core' => %w[controllers models services], 'Frontend' => %w[views stimulus], 'API' => %w[api graphql], 'Testing' => %w[tests], 'Infrastructure' => %w[devops jobs] }.freeze
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
- #run(args) ⇒ Object
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
26 27 28 29 30 |
# File 'lib/rails_agents.rb', line 26 def initialize @options = {} @prompt = TTY::Prompt.new @pastel = Pastel.new end |
Instance Method Details
#run(args) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/rails_agents.rb', line 32 def run(args) (args) case @options[:command] when 'install' install_agents when 'list' list_agents when 'help', nil show_help else puts "Unknown command: #{@options[:command]}" show_help exit 1 end end |