Sha256: 0cda4e5b44c4f809d8daf5935a95811c28517e3d84a5888e53882cc5ddde6932

Contents?: true

Size: 808 Bytes

Versions: 15

Compression:

Stored size: 808 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))

require 'appydave/tools'

# Process command line arguments for Prompt operations
class PromptToolsCLI
  def initialize
    @commands = {
      'completion' => Appydave::Tools::CliActions::PromptCompletionAction.new
    }
  end

  def run
    command, *args = ARGV
    if @commands.key?(command)
      @commands[command].action(args)
    else
      puts "Unknown command: #{command}"
      print_help
    end
  end

  private

  def print_help
    puts 'Usage: prompt_tools.rb [command] [options]'
    puts 'Commands:'
    puts '  completion    Run a completion prompt against the model'
    puts "Run 'prompt.rb [command] --help' for more information on a command."
  end
end

PromptToolsCLI.new.run

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
appydave-tools-0.11.9 bin/prompt_tools.rb
appydave-tools-0.11.8 bin/prompt_tools.rb
appydave-tools-0.11.7 bin/prompt_tools.rb
appydave-tools-0.11.6 bin/prompt_tools.rb
appydave-tools-0.11.5 bin/prompt_tools.rb
appydave-tools-0.11.4 bin/prompt_tools.rb
appydave-tools-0.11.3 bin/prompt_tools.rb
appydave-tools-0.11.2 bin/prompt_tools.rb
appydave-tools-0.11.1 bin/prompt_tools.rb
appydave-tools-0.11.0 bin/prompt_tools.rb
appydave-tools-0.10.4 bin/prompt_tools.rb
appydave-tools-0.10.3 bin/prompt_tools.rb
appydave-tools-0.10.2 bin/prompt_tools.rb
appydave-tools-0.10.1 bin/prompt_tools.rb
appydave-tools-0.10.0 bin/prompt_tools.rb