pub enum ToolCommand {
Install {
package: String,
php: Option<String>,
with: Vec<String>,
force: bool,
},
Uninstall {
package: String,
},
Inject {
package: String,
with: Vec<String>,
},
Uninject {
package: String,
with: Vec<String>,
},
List,
Dir {
package: Option<String>,
},
Run(ToolRunArgs),
Bgx(BgxArgs),
Upgrade {
package: Option<String>,
all: bool,
reinstall: bool,
},
}Variants§
Install
Install a tool. Pass <vendor>/<name> optionally followed by
@<constraint> (e.g. phpstan/phpstan@^1.10)
Fields
php: Option<String>Pin the tool to a specific PHP. Accepts a version (8.3,
8.3.12) or a constraint (~8.3, >=8.2,<8.4). When the
requested PHP isn’t installed, bougie installs it
automatically. Defaults to the highest installed NTS PHP
Uninstall
Remove an installed tool by its <vendor>/<name> identifier
Inject
Add an extra composer package or PHP extension to an installed tool. Re-resolves the tool’s lock and updates the vendor tree in place
Fields
Uninject
Remove an extra previously added via --with / inject
Fields
List
List installed tools
Dir
Print a tool’s install directory, or the tools root if no package is given
Run(ToolRunArgs)
Run an installed-or-cached tool one-off. Reuses an existing
persistent install if (package, constraint, php, with) match
exactly; otherwise materialises into the ephemeral cache.
bgx is provided as a convenient alias for bougie tool run;
their behavior is identical
Bgx(BgxArgs)
Upgrade
Re-resolve a tool’s lock and bring its vendor tree up to date.
Pass --all to walk every installed tool, or --reinstall to
wipe and rebuild from scratch (recovery for broken state)
Trait Implementations§
Source§impl Debug for ToolCommand
impl Debug for ToolCommand
Source§impl FromArgMatches for ToolCommand
impl FromArgMatches for ToolCommand
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>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for ToolCommand
impl Subcommand for ToolCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand