A Ruby toolkit for building complete and robust CLI commands.
MIT License
Bot releases are hidden (Show)
CommandKit::Interactive#ask_multiline
.CommandKit::Open
.CommandKit::Options::VerboseLevel
.Published by postmodern 4 months ago
CommandKit::Inflector.camelize
to convert foo-1234-5678
to Foo_1234_5678
.CommandKit::Printing::Indent#puts
.Published by postmodern 7 months ago
Published by postmodern 7 months ago
Array
option values were only setting the option's valueArray
value.Published by postmodern 7 months ago
CommandKit::Interactive#ask
to remove the newline from the read user input.Published by postmodern 8 months ago
--help
output for options with multi-line descriptionsdesc: ['Line 1', 'Line 2', ...]
).Published by postmodern 9 months ago
require_relative
to improve load-times.# frozen_string_literal: true
to all files.Published by postmodern 10 months ago
CommandKit::Env::Shell
.CommandKit::Env::Prefix
.CommandKit::Completion::Install
.Published by postmodern 10 months ago
usage
if it's already been set.Published by postmodern 10 months ago
CommandKit::BugReport
.CommandKit::Edit
.CommandKit::Printing::Fields
.CommandKit::Printing::Lists
.CommandKit::Printing::Tables
.NO_COLOR
environment variable is--longopt[=VALUE]
).Published by postmodern 10 months ago
CommandKit::FileUtils
.CommandKit::FileUtils#erb #erb
.CommandKit::Colors::ANSI::RESET_FG RESET_FG
.CommandKit::Colors::ANSI.bright_black bright_black
.CommandKit::Colors::ANSI.gray gray
.CommandKit::Colors::ANSI.bright_red bright_red
.CommandKit::Colors::ANSI.bright_green bright_green
.CommandKit::Colors::ANSI.bright_yellow bright_yellow
.CommandKit::Colors::ANSI.bright_blue bright_blue
.CommandKit::Colors::ANSI.bright_magenta bright_magenta
.CommandKit::Colors::ANSI.bright_cyan bright_cyan
.CommandKit::Colors::ANSI.bright_white bright_white
.CommandKit::Colors::ANSI.on_bright_black on_bright_black
.CommandKit::Colors::ANSI.on_gray on_gray
.CommandKit::Colors::ANSI.on_bright_red on_bright_red
.CommandKit::Colors::ANSI.on_bright_green on_bright_green
.CommandKit::Colors::ANSI.on_bright_yellow on_bright_yellow
.CommandKit::Colors::ANSI.on_bright_blue on_bright_blue
.CommandKit::Colors::ANSI.on_bright_magenta on_bright_magenta
.CommandKit::Colors::ANSI.on_bright_cyan on_bright_cyan
.CommandKit::Colors::ANSI.on_bright_white on_bright_white
.Allow grouping options into categories:
option :opt1, category: 'Foo Options',
desc: 'Option 1'
option :opt2, category: 'Foo Options',
desc: 'Option 1'
Allow options to have multi-line descriptions:
option :opt1, short: '-o',
desc: [
'line1',
'line2',
'...'
]
Allow arguments to have multi-line descriptions:
argument :arg1, desc: [
'line1',
'line2',
'...'
]
CommandKit::ProgramName#command_name
.Published by postmodern 10 months ago
NotImplementedError
exception in CommandKit::Help::Man#help_man#help_man
ifCommandKit::Help::Man::ClassMethods#man_dir .man_dir
was not set.Published by postmodern 10 months ago
CommandKit::CommandName#command_name #command_name
isCommandKit::Help::Man::ClassMethods#man_dir man_dir
.CommandKit::Help::Man::ClassMethods#man_dir man_dir
is not set, fallback--help
output.CommandKit::Usage
and CommandKit::Printing
intoCommandKit::Arguments
.CommandKit::Arguments
into CommandKit::Options
.CommandKit::Options::Parser#main
runs beforeCommandKit::Arguments#main
.CommandKit::Options#help
also callsCommandKit::Arguments#help_arguments
.CommandKit::Options#options #options
with option'svalue:
required: false, default: "foo"``), and the option's--option-flag --some-other-flag
),Class
is passed to CommandKit::Options::OptionValue.default_usage
,CommandKit::Options
andCommandKit::Arguments
.COMMAND
and ARGS
arguments.CommandKit::Env#env env
(which can be either ENV
Hash
) to work on ruby-3.1.0-preview1.command_aliases['rm'] = 'remove'
) in CommandKit::Commands#help
.1
if no command is given. This matches thegit
command.CommandKit::Commands::ClassMethods#command_aliases command_aliases
.Published by postmodern 10 months ago
CommandKit::Colors::ANSI#on_black
.CommandKit::Colors::ANSI#on_red
.CommandKit::Colors::ANSI#on_green
.CommandKit::Colors::ANSI#on_yellow
.CommandKit::Colors::ANSI#on_blue
.CommandKit::Colors::ANSI#on_magenta
.CommandKit::Colors::ANSI#on_cyan
.CommandKit::Colors::ANSI#on_white
.CommandKit::Man
.CommandKit::OS#bsd?
.CommandKit::OS#freebsd?
.CommandKit::OS#netbsd?
.CommandKit::OS#openbsd?
.CommandKit::OS#os
.CommandKit::OS#unix?
.CommandKit::OS::Linux
.CommandKit::OpenApp
.CommandKit::PackageManager
.CommandKit::Pager#pipe_to_pager
.CommandKit::Sudo
.CommandKit::Terminal#tty?
.CommandKit::Inflector.camelize
andCommandKit::Inflector.underscore
to use StringScanner.CommandKit::OS#initialize
to accept an os:
keyword to override thePublished by postmodern over 3 years ago