pub struct Cli {Show 13 fields
pub path: Option<PathBuf>,
pub last: bool,
pub list: bool,
pub exclude: Vec<String>,
pub sort: Option<CliSortMode>,
pub runner: Option<CliRunner>,
pub args: Option<String>,
pub script: Option<String>,
pub dry_run: bool,
pub config: Option<PathBuf>,
pub no_config: bool,
pub debug: bool,
pub completions: Option<CliShell>,
}Expand description
Fast interactive TUI for running npm scripts.
Fields§
§path: Option<PathBuf>Path to project directory (default: current directory)
last: boolRerun last executed script (no TUI)
list: boolList scripts non-interactively (no TUI)
exclude: Vec<String>Exclude scripts matching pattern (can be repeated)
sort: Option<CliSortMode>Initial sort mode
runner: Option<CliRunner>Override package manager
args: Option<String>Arguments to pass to the selected script
script: Option<String>Run script directly without TUI
dry_run: boolShow command without executing
config: Option<PathBuf>Path to config file
no_config: boolIgnore config files
debug: boolEnable debug output
completions: Option<CliShell>Generate shell completions
Implementations§
Source§impl Cli
impl Cli
Sourcepub fn parse_args() -> Self
pub fn parse_args() -> Self
Parse command line arguments.
Sourcepub fn project_dir(&self) -> PathBuf
pub fn project_dir(&self) -> PathBuf
Get the project directory.
Returns the provided path or the current directory.
Sourcepub fn should_show_tui(&self) -> bool
pub fn should_show_tui(&self) -> bool
Check if TUI should be shown.
Sourcepub fn runner_override(&self) -> Option<Runner>
pub fn runner_override(&self) -> Option<Runner>
Get the runner override.
Sourcepub fn generate_completions(shell: CliShell)
pub fn generate_completions(shell: CliShell)
Generate shell completions and write to stdout.
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Parser for Cli
impl Parser for Cli
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnwindSafe for Cli
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more