pub enum Command {
Show 24 variants
Init {
toml: bool,
name: Option<String>,
starter: Option<String>,
start: bool,
},
New {
directory: String,
toml: bool,
name: Option<String>,
starter: Option<String>,
start: bool,
},
Ext(ExtCommand),
Add {
packages: Vec<String>,
dev: bool,
with_dependencies: bool,
with_all_dependencies: bool,
no_sync: bool,
frozen: bool,
working_dir: Option<PathBuf>,
dry_run: bool,
},
Remove {
packages: Vec<String>,
dev: bool,
no_sync: bool,
frozen: bool,
working_dir: Option<PathBuf>,
dry_run: bool,
},
Lock {
working_dir: Option<PathBuf>,
dry_run: bool,
},
Tree {
package: Option<String>,
no_dev: bool,
working_dir: Option<PathBuf>,
},
Outdated {
packages: Vec<String>,
direct: bool,
major_only: bool,
minor_only: bool,
patch_only: bool,
no_dev: bool,
strict: bool,
working_dir: Option<PathBuf>,
},
Sync {
offline: bool,
dry_run: bool,
scripts: bool,
no_scripts: bool,
php: PhpPrefArgs,
},
Run {
with: Vec<String>,
no_sync: bool,
xdebug: bool,
php_request: Option<String>,
php: PhpPrefArgs,
argv: Vec<String>,
},
Php(PhpCommand),
Node(NodeCommand),
Composer(ComposerCommand),
Tool(ToolCommand),
ToolExec {
wrapper: PathBuf,
args: Vec<OsString>,
},
Cache(CacheCommand),
SelfCmd(SelfCommand),
Server(ServerArgs),
Services(ServicesCommand),
Projects(ProjectsCommand),
Start {
no_sync: bool,
dry_run: bool,
explain: bool,
no_builtin: bool,
recipe: Option<String>,
},
Stop {
names: Vec<String>,
purge: bool,
},
Make {
task: Option<String>,
list: bool,
dry_run: bool,
explain: bool,
no_sync: bool,
no_builtin: bool,
recipe: Option<String>,
print: bool,
},
Format {
args: Vec<OsString>,
},
}Variants§
Init
Create a new project.
Fields
name: Option<String>Set the package name (vendor/package) of the generated
composer.json. Overrides the name from a --starter manifest.
New
Create a new project in a new directory.
Fields
name: Option<String>Set the package name (vendor/package) of the generated
composer.json. Overrides the name from a --starter manifest.
Ext(ExtCommand)
Manage PHP extensions.
Add
Add one or more packages to the project and sync. The uv-flavored
twin of composer require: a bare vendor/pkg writes a >=X.Y
lower bound (vs composer require’s caret ^X.Y), and an
explicit constraint uses the @ syntax (vendor/pkg@^1.0), as in
bougie tool install / bougie ext add. Edits composer.json,
re-resolves composer.lock, and installs into vendor/.
Fields
Remove
Remove one or more packages from the project and sync. The
uv-flavored twin of composer remove.
Fields
Lock
Refresh composer.lock to match composer.json (native; uv’s
uv lock). Minimal: keeps every package at its locked version
where still valid, re-resolving only what changed. Never bumps
versions and never installs — use bougie composer update to pull
newer versions.
Fields
Tree
Print the project’s dependency tree (native; uv’s uv tree).
Reads composer.lock.
Fields
Outdated
List installed packages with a newer version available (native;
like uv/pnpm outdated). Reads composer.lock and queries the
configured repositories.
Fields
Sync
Install everything the project requires.
Fields
scripts: boolRun composer.json root scripts for this sync, overriding
[scripts] run in bougie.toml. Off by default (opt-in).
no_scripts: boolSkip composer.json root scripts for this sync, overriding
[scripts] run = true in bougie.toml.
php: PhpPrefArgsRun
Run a command in the project environment.
Fields
xdebug: boolLayer the server’s debug overlay (vendor/bougie/conf.d-debug/)
into PHP_INI_SCAN_DIR and set XDEBUG_SESSION=1 for the
child. Installs xdebug on first use if not already present.
php_request: Option<String>Run with a specific PHP interpreter. Accepts a version
(8.3, 8.3.12), a constraint (~8.3, >=8.2,<8.4), or a
path to a php binary. Forces a sync to that interpreter,
so it can’t be combined with --no-sync. Mirrors
uv run --python.
php: PhpPrefArgsPhp(PhpCommand)
Manage PHP interpreters.
Node(NodeCommand)
Manage Node.js interpreters (for projects that build frontend assets — Vite, Laravel Mix, Magento static-content deploy).
Composer(ComposerCommand)
Run Composer, reimplemented natively. bougie does not bundle or
execute the Composer phar; the common Composer surface
(install/update/require/remove/show/why/why-not/outdated/audit/
licenses/fund/status/validate/dump-autoload) runs natively, and an
unrecognized subcommand errors with a pointer to
bougie tool install composer/composer for the full upstream
Composer.
Tool(ToolCommand)
Manage globally-installed, isolated PHP CLI tools. See
TOOL_PLAN.md for the design.
ToolExec
Runtime shim invoked by tool wrappers (#!.../bougie tool-exec).
Not for direct CLI use; hidden from --help.
Fields
Cache(CacheCommand)
Manage bougie’s cache.
SelfCmd(SelfCommand)
Manage the bougie binary itself.
Server(ServerArgs)
Run the bougie development HTTP server for the current project. With no subcommand, registers the project with the shared dev server, prints its URL, and streams its log (Ctrl-C detaches). See SERVER.md.
Services(ServicesCommand)
Manage project-scoped dev services (mariadb, redis, …). See SERVICES.md and CLI.md §3.8.
Projects(ProjectsCommand)
Inspect and manage provisioned tenants across the shared dev services and the project each belongs to. Reads the on-disk tenant ledgers; no daemon required.
Start
Bring the whole project up: run the detected recipe’s start
task, whose DAG syncs the toolchain + vendor, provisions and
starts the project’s services, runs any setup, and starts the
dev server. The project lifecycle umbrella (ddev’s start).
For an individual task use bougie make <task>. Unix-only.
Fields
Stop
Bring the project down: stop its declared services (or every
service in names), including the dev-server tenant when the
server service is declared. The shared daemon and any other
project’s tenants stay up. The teardown twin of bougie start.
Unix-only.
Fields
Make
Walk a project recipe’s DAG, running tasks whose freshness
check fails. With no task, lists the available tasks; use
bougie start to bring the whole project up. See RECIPES.md.
Fields
Format
Format the project’s PHP, the way uv format runs ruff.
bougie does not bundle a formatter: on first use it downloads a
pinned wick binary (cresset-tools/wick — an unconfigurable,
Laravel Pint-style formatter), caches it, and execs it. Every
argument is forwarded verbatim to wick, so bougie format,
bougie format --check, bougie format src/ --diff, and
… | bougie format - behave exactly like the matching wick
invocation. Pin a specific wick with BOUGIE_WICK_VERSION.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
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 Command
impl Subcommand for Command
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