Skip to content
Kward Search API index

Module: Kward::Entrypoint

Defined in:
lib/kward/entrypoint.rb

Overview

Select shell mode before loading the coding agent or parsing its options.

Class Method Summary collapse

Class Method Details

.run(arguments = ARGV, name: $PROGRAM_NAME) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/kward/entrypoint.rb', line 4

def self.run(arguments = ARGV, name: $PROGRAM_NAME)
  if arguments.first == "shell"
    require_relative "shell/native_process"
    NativeShell::NativeProcess.standalone(arguments.drop(1), name: "#{name} shell", program: "kward shell", edit_lines: true, load_rc: true, shell_agent: true)
  else
    require_relative "../kward"
    CLI.new(argv: arguments).run
  end
end