Class: OllamaAgent::CLI
- Inherits:
-
Thor
- Object
- Thor
- OllamaAgent::CLI
show all
- Defined in:
- lib/ollama_agent/cli.rb,
lib/ollama_agent/cli/repl.rb,
lib/ollama_agent/cli/tui_repl.rb,
lib/ollama_agent/cli/repl_shared.rb,
lib/ollama_agent/cli/skill_command.rb,
lib/ollama_agent/cli/health_command.rb
Overview
Thor CLI for single-shot and interactive agent sessions. rubocop:disable Metrics/ClassLength – Thor commands and shared helpers
Defined Under Namespace
Modules: ReplShared
Classes: KernelHealthCommand, Repl, SkillCommand, TuiRepl
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
18
19
20
|
# File 'lib/ollama_agent/cli.rb', line 18
def self.exit_on_failure?
true
end
|
Instance Method Details
#ask(query = nil) ⇒ Object
61
62
63
64
65
66
|
# File 'lib/ollama_agent/cli.rb', line 61
def ask(query = nil)
load_plugins!
apply_session_interactive_tui_flags!(query)
validate_tui_options!
run_ask!(query)
end
|
#doctor ⇒ Object
125
126
127
|
# File 'lib/ollama_agent/cli.rb', line 125
def doctor
agents
end
|
#improve ⇒ Object
201
202
203
204
|
# File 'lib/ollama_agent/cli.rb', line 201
def improve
ensure_improve_mode_only_automated!
dispatch_self_review_mode("automated")
end
|
#orchestrate(query = nil) ⇒ Object
98
99
100
101
102
103
|
# File 'lib/ollama_agent/cli.rb', line 98
def orchestrate(query = nil)
load_plugins!
apply_session_interactive_tui_flags!(query)
validate_tui_options!
run_orchestrate!(query)
end
|
#self_review ⇒ Object
168
169
170
|
# File 'lib/ollama_agent/cli.rb', line 168
def self_review
dispatch_self_review_mode(SelfImprovement::Modes.normalize(options[:mode]))
end
|
#sessions ⇒ Object
107
108
109
110
111
112
113
114
115
116
|
# File 'lib/ollama_agent/cli.rb', line 107
def sessions
root = resolved_root_for_self_review
list = Session::Store.list(root: root)
if list.empty?
puts "No sessions found in #{root}"
return
end
puts "SESSION ID STARTED"
list.each { |s| puts format("%-30<id>s %<started>s", id: s.session_id, started: s.started_at) }
end
|