llm-shell 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/README.md +24 -160
- data/exe/llm-shell +7 -0
- data/llm-shell.gemspec +26 -32
- metadata +36 -372
- data/bin/llm-shell +0 -21
- data/lib/llm/shell/command.rb +0 -88
- data/lib/llm/shell/commands/clear_screen.rb +0 -18
- data/lib/llm/shell/commands/debug_mode.rb +0 -12
- data/lib/llm/shell/commands/dir_import.rb +0 -33
- data/lib/llm/shell/commands/disable_tool.rb +0 -33
- data/lib/llm/shell/commands/enable_tool.rb +0 -33
- data/lib/llm/shell/commands/file_import.rb +0 -25
- data/lib/llm/shell/commands/help.rb +0 -53
- data/lib/llm/shell/commands/show_chat.rb +0 -31
- data/lib/llm/shell/commands/show_version.rb +0 -17
- data/lib/llm/shell/commands/system_prompt.rb +0 -21
- data/lib/llm/shell/completion.rb +0 -40
- data/lib/llm/shell/config.rb +0 -34
- data/lib/llm/shell/default.rb +0 -23
- data/lib/llm/shell/formatter.rb +0 -41
- data/lib/llm/shell/internal/coderay/lib/coderay/duo.rb +0 -81
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/_map.rb +0 -17
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/comment_filter.rb +0 -25
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/count.rb +0 -39
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/debug.rb +0 -49
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/debug_lint.rb +0 -63
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/div.rb +0 -23
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/encoder.rb +0 -190
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/filter.rb +0 -58
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/html/css.rb +0 -65
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/html/numbering.rb +0 -108
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/html/output.rb +0 -164
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/html.rb +0 -333
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/json.rb +0 -83
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/lines_of_code.rb +0 -45
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/lint.rb +0 -59
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/null.rb +0 -18
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/page.rb +0 -24
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/span.rb +0 -23
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/statistic.rb +0 -95
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/terminal.rb +0 -195
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/text.rb +0 -46
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/token_kind_filter.rb +0 -111
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/xml.rb +0 -72
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders/yaml.rb +0 -50
- data/lib/llm/shell/internal/coderay/lib/coderay/encoders.rb +0 -18
- data/lib/llm/shell/internal/coderay/lib/coderay/for_redcloth.rb +0 -95
- data/lib/llm/shell/internal/coderay/lib/coderay/helpers/file_type.rb +0 -151
- data/lib/llm/shell/internal/coderay/lib/coderay/helpers/plugin.rb +0 -55
- data/lib/llm/shell/internal/coderay/lib/coderay/helpers/plugin_host.rb +0 -221
- data/lib/llm/shell/internal/coderay/lib/coderay/helpers/word_list.rb +0 -72
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/_map.rb +0 -24
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/c.rb +0 -189
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/clojure.rb +0 -217
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/cpp.rb +0 -217
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/css.rb +0 -196
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/debug.rb +0 -75
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/delphi.rb +0 -144
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/diff.rb +0 -221
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/erb.rb +0 -81
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/go.rb +0 -208
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/groovy.rb +0 -268
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/haml.rb +0 -168
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/html.rb +0 -275
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/java/builtin_types.rb +0 -421
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/java.rb +0 -174
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/java_script.rb +0 -236
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/json.rb +0 -98
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/lua.rb +0 -280
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/php.rb +0 -527
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/python.rb +0 -287
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/raydebug.rb +0 -75
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/ruby/patterns.rb +0 -178
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/ruby/string_state.rb +0 -79
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/ruby.rb +0 -477
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/sass.rb +0 -232
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/scanner.rb +0 -337
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/sql.rb +0 -169
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/taskpaper.rb +0 -36
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/text.rb +0 -26
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/xml.rb +0 -17
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners/yaml.rb +0 -140
- data/lib/llm/shell/internal/coderay/lib/coderay/scanners.rb +0 -27
- data/lib/llm/shell/internal/coderay/lib/coderay/styles/_map.rb +0 -7
- data/lib/llm/shell/internal/coderay/lib/coderay/styles/alpha.rb +0 -153
- data/lib/llm/shell/internal/coderay/lib/coderay/styles/style.rb +0 -18
- data/lib/llm/shell/internal/coderay/lib/coderay/styles.rb +0 -15
- data/lib/llm/shell/internal/coderay/lib/coderay/token_kinds.rb +0 -85
- data/lib/llm/shell/internal/coderay/lib/coderay/tokens.rb +0 -164
- data/lib/llm/shell/internal/coderay/lib/coderay/tokens_proxy.rb +0 -55
- data/lib/llm/shell/internal/coderay/lib/coderay/version.rb +0 -3
- data/lib/llm/shell/internal/coderay/lib/coderay.rb +0 -284
- data/lib/llm/shell/internal/io-line/lib/io/line/multiple.rb +0 -19
- data/lib/llm/shell/internal/io-line/lib/io/line.rb +0 -28
- data/lib/llm/shell/internal/llm.rb/lib/llm/bot/builder.rb +0 -31
- data/lib/llm/shell/internal/llm.rb/lib/llm/bot/conversable.rb +0 -37
- data/lib/llm/shell/internal/llm.rb/lib/llm/bot/prompt/completion.rb +0 -49
- data/lib/llm/shell/internal/llm.rb/lib/llm/bot/prompt/respond.rb +0 -49
- data/lib/llm/shell/internal/llm.rb/lib/llm/bot.rb +0 -150
- data/lib/llm/shell/internal/llm.rb/lib/llm/buffer.rb +0 -162
- data/lib/llm/shell/internal/llm.rb/lib/llm/client.rb +0 -36
- data/lib/llm/shell/internal/llm.rb/lib/llm/error.rb +0 -49
- data/lib/llm/shell/internal/llm.rb/lib/llm/eventhandler.rb +0 -44
- data/lib/llm/shell/internal/llm.rb/lib/llm/eventstream/event.rb +0 -69
- data/lib/llm/shell/internal/llm.rb/lib/llm/eventstream/parser.rb +0 -88
- data/lib/llm/shell/internal/llm.rb/lib/llm/eventstream.rb +0 -8
- data/lib/llm/shell/internal/llm.rb/lib/llm/file.rb +0 -91
- data/lib/llm/shell/internal/llm.rb/lib/llm/function.rb +0 -177
- data/lib/llm/shell/internal/llm.rb/lib/llm/message.rb +0 -178
- data/lib/llm/shell/internal/llm.rb/lib/llm/mime.rb +0 -140
- data/lib/llm/shell/internal/llm.rb/lib/llm/multipart.rb +0 -101
- data/lib/llm/shell/internal/llm.rb/lib/llm/object/builder.rb +0 -38
- data/lib/llm/shell/internal/llm.rb/lib/llm/object/kernel.rb +0 -53
- data/lib/llm/shell/internal/llm.rb/lib/llm/object.rb +0 -89
- data/lib/llm/shell/internal/llm.rb/lib/llm/provider.rb +0 -352
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/error_handler.rb +0 -36
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/files.rb +0 -155
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/format/completion_format.rb +0 -88
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/format.rb +0 -29
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/models.rb +0 -54
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/response/completion.rb +0 -39
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/response/enumerable.rb +0 -11
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/response/file.rb +0 -23
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/response/web_search.rb +0 -21
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic/stream_parser.rb +0 -66
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/anthropic.rb +0 -138
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/deepseek/format/completion_format.rb +0 -68
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/deepseek/format.rb +0 -27
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/deepseek.rb +0 -75
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/audio.rb +0 -73
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/error_handler.rb +0 -47
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/files.rb +0 -146
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/format/completion_format.rb +0 -69
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/format.rb +0 -39
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/images.rb +0 -133
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/models.rb +0 -60
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/response/completion.rb +0 -35
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/response/embedding.rb +0 -8
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/response/file.rb +0 -11
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/response/files.rb +0 -15
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/response/image.rb +0 -31
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/response/models.rb +0 -15
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/response/web_search.rb +0 -22
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini/stream_parser.rb +0 -86
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/gemini.rb +0 -173
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/llamacpp.rb +0 -74
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/ollama/error_handler.rb +0 -36
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/ollama/format/completion_format.rb +0 -77
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/ollama/format.rb +0 -29
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/ollama/models.rb +0 -56
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/ollama/response/completion.rb +0 -28
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/ollama/response/embedding.rb +0 -9
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/ollama/stream_parser.rb +0 -44
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/ollama.rb +0 -116
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/audio.rb +0 -91
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/error_handler.rb +0 -46
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/files.rb +0 -134
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/format/completion_format.rb +0 -90
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/format/moderation_format.rb +0 -35
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/format/respond_format.rb +0 -72
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/format.rb +0 -54
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/images.rb +0 -109
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/models.rb +0 -55
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/moderations.rb +0 -65
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/response/audio.rb +0 -7
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/response/completion.rb +0 -40
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/response/embedding.rb +0 -9
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/response/enumerable.rb +0 -23
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/response/file.rb +0 -7
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/response/image.rb +0 -16
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/response/moderations.rb +0 -34
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/response/responds.rb +0 -48
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/response/web_search.rb +0 -21
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/responses/stream_parser.rb +0 -76
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/responses.rb +0 -99
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/stream_parser.rb +0 -86
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai/vector_stores.rb +0 -228
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/openai.rb +0 -206
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/xai/images.rb +0 -58
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/xai.rb +0 -72
- data/lib/llm/shell/internal/llm.rb/lib/llm/providers/zai.rb +0 -74
- data/lib/llm/shell/internal/llm.rb/lib/llm/response.rb +0 -67
- data/lib/llm/shell/internal/llm.rb/lib/llm/schema/array.rb +0 -26
- data/lib/llm/shell/internal/llm.rb/lib/llm/schema/boolean.rb +0 -13
- data/lib/llm/shell/internal/llm.rb/lib/llm/schema/integer.rb +0 -43
- data/lib/llm/shell/internal/llm.rb/lib/llm/schema/leaf.rb +0 -78
- data/lib/llm/shell/internal/llm.rb/lib/llm/schema/null.rb +0 -13
- data/lib/llm/shell/internal/llm.rb/lib/llm/schema/number.rb +0 -43
- data/lib/llm/shell/internal/llm.rb/lib/llm/schema/object.rb +0 -41
- data/lib/llm/shell/internal/llm.rb/lib/llm/schema/string.rb +0 -34
- data/lib/llm/shell/internal/llm.rb/lib/llm/schema/version.rb +0 -8
- data/lib/llm/shell/internal/llm.rb/lib/llm/schema.rb +0 -81
- data/lib/llm/shell/internal/llm.rb/lib/llm/server_tool.rb +0 -32
- data/lib/llm/shell/internal/llm.rb/lib/llm/tool/param.rb +0 -75
- data/lib/llm/shell/internal/llm.rb/lib/llm/tool.rb +0 -78
- data/lib/llm/shell/internal/llm.rb/lib/llm/utils.rb +0 -19
- data/lib/llm/shell/internal/llm.rb/lib/llm/version.rb +0 -5
- data/lib/llm/shell/internal/llm.rb/lib/llm.rb +0 -121
- data/lib/llm/shell/internal/optparse/lib/optionparser.rb +0 -2
- data/lib/llm/shell/internal/optparse/lib/optparse/ac.rb +0 -70
- data/lib/llm/shell/internal/optparse/lib/optparse/date.rb +0 -18
- data/lib/llm/shell/internal/optparse/lib/optparse/kwargs.rb +0 -27
- data/lib/llm/shell/internal/optparse/lib/optparse/shellwords.rb +0 -7
- data/lib/llm/shell/internal/optparse/lib/optparse/time.rb +0 -11
- data/lib/llm/shell/internal/optparse/lib/optparse/uri.rb +0 -7
- data/lib/llm/shell/internal/optparse/lib/optparse/version.rb +0 -80
- data/lib/llm/shell/internal/optparse/lib/optparse.rb +0 -2469
- data/lib/llm/shell/internal/paint/lib/paint/constants.rb +0 -104
- data/lib/llm/shell/internal/paint/lib/paint/pa.rb +0 -13
- data/lib/llm/shell/internal/paint/lib/paint/rgb_colors.rb +0 -14
- data/lib/llm/shell/internal/paint/lib/paint/shortcuts.rb +0 -100
- data/lib/llm/shell/internal/paint/lib/paint/shortcuts_version.rb +0 -5
- data/lib/llm/shell/internal/paint/lib/paint/util.rb +0 -16
- data/lib/llm/shell/internal/paint/lib/paint/version.rb +0 -5
- data/lib/llm/shell/internal/paint/lib/paint.rb +0 -261
- data/lib/llm/shell/internal/reline/lib/reline/config.rb +0 -378
- data/lib/llm/shell/internal/reline/lib/reline/face.rb +0 -199
- data/lib/llm/shell/internal/reline/lib/reline/history.rb +0 -76
- data/lib/llm/shell/internal/reline/lib/reline/io/ansi.rb +0 -322
- data/lib/llm/shell/internal/reline/lib/reline/io/dumb.rb +0 -120
- data/lib/llm/shell/internal/reline/lib/reline/io/windows.rb +0 -530
- data/lib/llm/shell/internal/reline/lib/reline/io.rb +0 -55
- data/lib/llm/shell/internal/reline/lib/reline/key_actor/base.rb +0 -37
- data/lib/llm/shell/internal/reline/lib/reline/key_actor/composite.rb +0 -17
- data/lib/llm/shell/internal/reline/lib/reline/key_actor/emacs.rb +0 -517
- data/lib/llm/shell/internal/reline/lib/reline/key_actor/vi_command.rb +0 -518
- data/lib/llm/shell/internal/reline/lib/reline/key_actor/vi_insert.rb +0 -517
- data/lib/llm/shell/internal/reline/lib/reline/key_actor.rb +0 -8
- data/lib/llm/shell/internal/reline/lib/reline/key_stroke.rb +0 -119
- data/lib/llm/shell/internal/reline/lib/reline/kill_ring.rb +0 -125
- data/lib/llm/shell/internal/reline/lib/reline/line_editor.rb +0 -2356
- data/lib/llm/shell/internal/reline/lib/reline/unicode/east_asian_width.rb +0 -1292
- data/lib/llm/shell/internal/reline/lib/reline/unicode.rb +0 -421
- data/lib/llm/shell/internal/reline/lib/reline/version.rb +0 -3
- data/lib/llm/shell/internal/reline/lib/reline.rb +0 -527
- data/lib/llm/shell/internal/tomlrb/lib/tomlrb/generated_parser.rb +0 -712
- data/lib/llm/shell/internal/tomlrb/lib/tomlrb/handler.rb +0 -268
- data/lib/llm/shell/internal/tomlrb/lib/tomlrb/local_date.rb +0 -35
- data/lib/llm/shell/internal/tomlrb/lib/tomlrb/local_date_time.rb +0 -42
- data/lib/llm/shell/internal/tomlrb/lib/tomlrb/local_time.rb +0 -40
- data/lib/llm/shell/internal/tomlrb/lib/tomlrb/parser.rb +0 -21
- data/lib/llm/shell/internal/tomlrb/lib/tomlrb/scanner.rb +0 -92
- data/lib/llm/shell/internal/tomlrb/lib/tomlrb/string_utils.rb +0 -40
- data/lib/llm/shell/internal/tomlrb/lib/tomlrb/version.rb +0 -5
- data/lib/llm/shell/internal/tomlrb/lib/tomlrb.rb +0 -49
- data/lib/llm/shell/markdown.rb +0 -83
- data/lib/llm/shell/options.rb +0 -39
- data/lib/llm/shell/renderer.rb +0 -51
- data/lib/llm/shell/repl.rb +0 -111
- data/lib/llm/shell/tool.rb +0 -42
- data/lib/llm/shell/tools/read_file.rb +0 -15
- data/lib/llm/shell/tools/system.rb +0 -17
- data/lib/llm/shell/tools/write_file.rb +0 -16
- data/lib/llm/shell/version.rb +0 -8
- data/lib/llm/shell.rb +0 -132
- data/lib/llm-shell.rb +0 -3
- data/libexec/llm-shell/shell +0 -43
- data/share/llm-shell/prompts/default.txt +0 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 893a1e0d06613c74c57690458a780c334a30f0e265a3bdfd0e2a17b93f96d8f3
|
|
4
|
+
data.tar.gz: cf2cb67da47f2817fa7c1fa52b491c3564918c228766a915d93b1c1bd2f59f9e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 414008dcde8859de7f6189b75a883c82afc622143fe06bf1cb6a9fc8f60f113f681235224be75f1dd5aa8d62acd9bc921d32f315b2603edbdf3b5081e2033e7f
|
|
7
|
+
data.tar.gz: 2c54a22daf9ad8cb887797027d3012b482f3c782585736268a6bdd7a2eaa0ea22fde3d7ab168769d71d679520d80d9890155d5b675bfa6ef30cd3a154aa23f8d
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Robert Gleeson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,164 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- 📤 Attach local files as conversation context
|
|
26
|
-
- 🔧 Extend with your own functions and tool calls
|
|
27
|
-
- 🚀 Extend with your own console commands
|
|
28
|
-
|
|
29
|
-
#### Shell
|
|
30
|
-
|
|
31
|
-
- 🤖 Builtin auto-complete powered by Readline
|
|
32
|
-
- 🎨 Builtin syntax highlighting powered by Coderay
|
|
33
|
-
- 📄 Deploys the less pager for long outputs
|
|
34
|
-
- 📝 Advanced Markdown formatting and output
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## Customization
|
|
38
|
-
|
|
39
|
-
#### Tools
|
|
40
|
-
|
|
41
|
-
> For security and safety reasons, a user must confirm the execution of
|
|
42
|
-
> all function calls before they happen
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Tools are loaded at boot time. Custom tools can be added to the
|
|
46
|
-
`${HOME}/.local/share/llm-shell/tools/` directory. The tools are
|
|
47
|
-
shared with the LLM and the LLM can request their execution.
|
|
48
|
-
The LLM is also made aware of a tool's return value after
|
|
49
|
-
it has been called.
|
|
50
|
-
See the
|
|
51
|
-
[tools/](lib/llm/shell/tools/)
|
|
52
|
-
directory for more examples:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
```ruby
|
|
56
|
-
class System < LLM::Tool
|
|
57
|
-
name "system"
|
|
58
|
-
description "Run a system command"
|
|
59
|
-
param :command, String, "The command to execute", required: true
|
|
60
|
-
|
|
61
|
-
def call(command:)
|
|
62
|
-
ro, wo = IO.pipe
|
|
63
|
-
re, we = IO.pipe
|
|
64
|
-
Process.wait Process.spawn(command, out: wo, err: we)
|
|
65
|
-
[wo,we].each(&:close)
|
|
66
|
-
{stderr: re.read, stdout: ro.read}
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
#### Commands
|
|
72
|
-
|
|
73
|
-
llm-shell can be extended with your own console commands that take
|
|
74
|
-
precendence over messages sent to the LLM. Custom commands can be
|
|
75
|
-
added to the `${HOME}/.local/share/llm-shell/commands/` directory.
|
|
76
|
-
See the
|
|
77
|
-
[commands/](lib/llm/shell/commands/)
|
|
78
|
-
directory for more examples:
|
|
79
|
-
|
|
80
|
-
```ruby
|
|
81
|
-
class SayHello < LLM::Command
|
|
82
|
-
name "say-hello"
|
|
83
|
-
description "Say hello to somebody"
|
|
84
|
-
|
|
85
|
-
def call(name)
|
|
86
|
-
io.rewind.print "Hello, #{name}!"
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
#### Prompts
|
|
92
|
-
|
|
93
|
-
> It is recommended that custom prompts instruct the LLM to emit markdown,
|
|
94
|
-
> otherwise you might see unexpected results because llm-shell assumes the LLM
|
|
95
|
-
> will emit markdown.
|
|
96
|
-
|
|
97
|
-
The prompt can be changed by adding a file to the `${HOME}/.local/share/llm-shell/prompts/`
|
|
98
|
-
directory, and then choosing it at boot time with the `-r PROMPT`, `--prompt PROMPT`
|
|
99
|
-
options. Generally you probably want to fork [default.txt](share/llm-shell/prompts/default.txt)
|
|
100
|
-
to conserve the original prompt rules around markdown and files, then modify it to
|
|
101
|
-
suit your own needs and preferences.
|
|
102
|
-
|
|
103
|
-
## Settings
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
The console client can be configured at the command line through option switches,
|
|
107
|
-
or through a TOML file. The TOML file can contain the same options that could be
|
|
108
|
-
specified at the command line. For cloud providers the key option is the only
|
|
109
|
-
required parameter, everything else has defaults. The TOML file is read from the
|
|
110
|
-
path `${HOME}/.llm-shell/config.toml` and it has the following format:
|
|
111
|
-
|
|
112
|
-
```toml
|
|
113
|
-
# ~/.config/llm-shell.toml
|
|
114
|
-
|
|
115
|
-
[openai]
|
|
116
|
-
key = "YOURKEY"
|
|
117
|
-
|
|
118
|
-
[gemini]
|
|
119
|
-
key = "YOURKEY"
|
|
120
|
-
|
|
121
|
-
[anthropic]
|
|
122
|
-
key = "YOURKEY"
|
|
123
|
-
|
|
124
|
-
[xai]
|
|
125
|
-
key = "YOURKEY"
|
|
126
|
-
|
|
127
|
-
[deepseek]
|
|
128
|
-
key = "YOURKEY"
|
|
129
|
-
|
|
130
|
-
[ollama]
|
|
131
|
-
host = "localhost"
|
|
132
|
-
model = "deepseek-coder:6.7b"
|
|
133
|
-
|
|
134
|
-
[llamacpp]
|
|
135
|
-
host = "localhost"
|
|
136
|
-
model = "qwen3"
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Usage
|
|
140
|
-
|
|
141
|
-
#### CLI
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
Usage: llm-shell [OPTIONS]
|
|
145
|
-
-p, --provider NAME Required. Options: gemini, openai, anthropic, ollama or llamacpp.
|
|
146
|
-
-k, --key [KEY] Optional. Required by gemini, openai, and anthropic.
|
|
147
|
-
-m, --model [MODEL] Optional. The name of a model.
|
|
148
|
-
-h, --host [HOST] Optional. Sometimes required by ollama.
|
|
149
|
-
-o, --port [PORT] Optional. Sometimes required by ollama.
|
|
150
|
-
-r, --prompt [PROMPT] Optional. The prompt to use.
|
|
151
|
-
-v, --version Optional. Print the version and exit
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
## Install
|
|
155
|
-
|
|
156
|
-
llm-shell can be installed via [rubygems.org](https://rubygems.org/gems/llm-shell)
|
|
157
|
-
|
|
158
|
-
gem install llm-shell
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://r.uby.dev">
|
|
3
|
+
<img
|
|
4
|
+
src="rubydev.svg"
|
|
5
|
+
width="400"
|
|
6
|
+
height="200"
|
|
7
|
+
border="0"
|
|
8
|
+
alt="a r.uby.dev project"
|
|
9
|
+
>
|
|
10
|
+
</a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
> [r.uby.dev](https://r.uby.dev/) project.
|
|
14
|
+
|
|
15
|
+
Welcome to the canonical llm-shell repository.
|
|
16
|
+
|
|
17
|
+
This repository provides a RubyGem that includes
|
|
18
|
+
the [llm.rb](https://github.com/r-uby-dev/llm) runtime
|
|
19
|
+
and the optional dependencies that it requires to
|
|
20
|
+
run the llm.rb console.
|
|
21
|
+
|
|
22
|
+
It is a convenience gem that reduces installing the
|
|
23
|
+
llm.rb console to a single line: `gem install llm-shell`.
|
|
159
24
|
|
|
160
25
|
## License
|
|
161
26
|
|
|
162
|
-
|
|
163
|
-
<br>
|
|
27
|
+
MIT. <br>
|
|
164
28
|
See [LICENSE](./LICENSE)
|
data/exe/llm-shell
ADDED
data/llm-shell.gemspec
CHANGED
|
@@ -1,42 +1,36 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative "lib/llm/shell/version"
|
|
4
|
-
|
|
5
3
|
Gem::Specification.new do |spec|
|
|
6
4
|
spec.name = "llm-shell"
|
|
7
|
-
spec.version =
|
|
8
|
-
spec.authors = ["
|
|
9
|
-
spec.email = ["
|
|
5
|
+
spec.version = "0.11.0"
|
|
6
|
+
spec.authors = ["Robert Gleeson"]
|
|
7
|
+
spec.email = ["robert@r.uby.dev"]
|
|
8
|
+
|
|
9
|
+
spec.summary = "The llm.rb console in a single RubyGem"
|
|
10
|
+
spec.description = <<~DESCRIPTION
|
|
11
|
+
The llm.rb console distributed as a single RubyGem that includes the optional
|
|
12
|
+
llm.rb dependencies. It is a convenience gem that reduces installing the
|
|
13
|
+
llm.rb console to a single line: `gem install llm-shell`.
|
|
14
|
+
DESCRIPTION
|
|
10
15
|
|
|
11
|
-
spec.
|
|
12
|
-
|
|
13
|
-
"Large Language Models (LLMs)."
|
|
14
|
-
spec.description = spec.summary
|
|
15
|
-
spec.homepage = "https://github.com/llmrb/llm-shell"
|
|
16
|
-
spec.license = "0BSD"
|
|
17
|
-
spec.required_ruby_version = ">= 3.2"
|
|
16
|
+
spec.license = "MIT"
|
|
17
|
+
spec.required_ruby_version = ">= 3.3.0"
|
|
18
18
|
|
|
19
|
+
spec.homepage = "https://r.uby.dev"
|
|
19
20
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
20
|
-
spec.metadata["source_code_uri"] =
|
|
21
|
+
spec.metadata["source_code_uri"] = "https://github.com/r-uby-dev/llm-shell"
|
|
22
|
+
spec.metadata["documentation_uri"] = spec.homepage
|
|
21
23
|
|
|
22
|
-
spec.files = Dir[
|
|
23
|
-
|
|
24
|
-
"lib/*.rb", "lib/**/*.rb",
|
|
25
|
-
"libexec/*", "libexec/**/*",
|
|
26
|
-
"share/llm-shell/prompts/*",
|
|
27
|
-
"bin/*", "llm-shell.gemspec"
|
|
28
|
-
]
|
|
29
|
-
spec.require_paths = ["lib"]
|
|
24
|
+
spec.files = Dir["LICENSE", "README.md", "llm-shell.gemspec", "exe/llm-shell"]
|
|
25
|
+
spec.bindir = "exe"
|
|
30
26
|
spec.executables = ["llm-shell"]
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
spec.
|
|
36
|
-
spec.
|
|
37
|
-
spec.
|
|
38
|
-
spec.
|
|
39
|
-
spec.
|
|
40
|
-
spec.add_development_dependency "vcr", "~> 6.0"
|
|
41
|
-
spec.add_development_dependency "dotenv", "~> 2.8"
|
|
27
|
+
|
|
28
|
+
##
|
|
29
|
+
# The dependencies that are required to run
|
|
30
|
+
# the llm.rb console
|
|
31
|
+
spec.add_dependency "llm.rb", "~> 15.3"
|
|
32
|
+
spec.add_dependency "test-cmd.rb", "~> 2.7"
|
|
33
|
+
spec.add_dependency "curses", "~> 1.7"
|
|
34
|
+
spec.add_dependency "kramdown", "~> 2.5"
|
|
35
|
+
spec.add_dependency "unicode-display_width", "~> 3.2"
|
|
42
36
|
end
|