Skip to main content

Command

Enum Command 

Source
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

§toml: bool

Place bougie configuration in a bougie.toml file.

§name: Option<String>

Set the package name (vendor/package) of the generated composer.json. Overrides the name from a --starter manifest.

§starter: Option<String>

Scaffold from a starter pack: a built-in alias (e.g. mageos) or an https URL serving a starter manifest. Writes the starter’s composer.json instead of the empty default.

§start: bool

After scaffolding, bring the project up — equivalent to bougie start (sync the toolchain + vendor, then run the project recipe). Unix-only.

§

New

Create a new project in a new directory.

Fields

§directory: String

Directory to create under the current directory and scaffold the project into.

§toml: bool

Place bougie configuration in a bougie.toml file.

§name: Option<String>

Set the package name (vendor/package) of the generated composer.json. Overrides the name from a --starter manifest.

§starter: Option<String>

Scaffold from a starter pack: a built-in alias (e.g. mageos) or an https URL serving a starter manifest.

§start: bool

After scaffolding, bring the project up — equivalent to bougie start. Unix-only.

§

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

§packages: Vec<String>

Packages to add, vendor/pkg or vendor/pkg@<constraint>.

§dev: bool

Add to require-dev instead of require.

§with_dependencies: bool

Also update the new packages’ dependencies (-w).

§with_all_dependencies: bool

Also update all dependencies, including shared ones (-W).

§no_sync: bool

Update composer.json + composer.lock but don’t install into vendor/.

§frozen: bool

Edit composer.json only — don’t touch the lock or vendor/.

§working_dir: Option<PathBuf>

Run in this directory instead of CWD (-d).

§dry_run: bool

Resolve and report what would change without writing anything.

§

Remove

Remove one or more packages from the project and sync. The uv-flavored twin of composer remove.

Fields

§packages: Vec<String>

Packages to remove (vendor/name).

§dev: bool

Remove from require-dev instead of require.

§no_sync: bool

Re-resolve composer.lock but don’t touch vendor/.

§frozen: bool

Edit composer.json only — don’t touch the lock or vendor/.

§working_dir: Option<PathBuf>

Run in this directory instead of CWD (-d).

§dry_run: bool

Resolve and report what would change without writing anything.

§

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

§working_dir: Option<PathBuf>

Run in this directory instead of CWD (-d).

§dry_run: bool

Resolve and report what would change without writing the lock.

§

Tree

Print the project’s dependency tree (native; uv’s uv tree). Reads composer.lock.

Fields

§package: Option<String>

Root the tree at this package instead of the project.

§no_dev: bool

Skip dev dependencies.

§working_dir: Option<PathBuf>

Run in this directory instead of CWD (-d).

§

Outdated

List installed packages with a newer version available (native; like uv/pnpm outdated). Reads composer.lock and queries the configured repositories.

Fields

§packages: Vec<String>

Optional vendor/name filters; with none, all are considered.

§direct: bool

Only the project’s direct dependencies (--direct / -D).

§major_only: bool

Only packages with a new major version.

§minor_only: bool

Only packages with a new minor version.

§patch_only: bool

Only packages with a new patch version.

§no_dev: bool

Skip dev dependencies.

§strict: bool

Exit non-zero if any package is outdated.

§working_dir: Option<PathBuf>

Run in this directory instead of CWD (-d).

§

Sync

Install everything the project requires.

Fields

§offline: bool

Don’t try to download anything, this will fail if there are uncached packages.

§dry_run: bool

Show the plan, change nothing on disk.

§scripts: bool

Run composer.json root scripts for this sync, overriding [scripts] run in bougie.toml. Off by default (opt-in).

§no_scripts: bool

Skip composer.json root scripts for this sync, overriding [scripts] run = true in bougie.toml.

§

Run

Run a command in the project environment.

Fields

§with: Vec<String>

Add a temporary extension for this invocation.

§no_sync: bool

Skip the implicit bougie sync before running.

§xdebug: bool

Layer 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.

§argv: Vec<String>

Command and arguments. -- separator is optional.

§

Php(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

§wrapper: PathBuf

Path to the tool wrapper script the kernel handed us as argv[1] via the shebang.

§args: Vec<OsString>

User-supplied arguments to the tool, passed through to PHP.

§

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

§no_sync: bool

Skip the implicit bougie sync prologue.

§dry_run: bool

Show what would run, but don’t execute.

§explain: bool

Explain why each step runs or skips.

§no_builtin: bool

Ignore the builtin recipe; use only bougie.toml.

§recipe: Option<String>

Force a specific builtin (e.g. magento).

§

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

§names: Vec<String>

Service names to stop. Empty = every declared service.

§purge: bool

Destroy persisted tenant data (e.g. FLUSHDB on redis). Off by default — bougie start should restore state.

§

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

§task: Option<String>

Task to run. With none, the available tasks are listed.

§list: bool

List available tasks instead of running.

§dry_run: bool

Show what would run, but don’t execute.

§explain: bool

Explain why each step runs or skips.

§no_sync: bool

Skip the implicit bougie sync prologue.

§no_builtin: bool

Ignore the builtin recipe; use only bougie.toml.

§recipe: Option<String>

Force a specific builtin (e.g. magento).

§print: bool

Print the merged recipe to stdout instead of running.

§

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.

Fields

§args: Vec<OsString>

Arguments forwarded verbatim to wick (paths, --check, --diff, - for stdin, …).

Trait Implementations§

Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Command

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

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<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Command

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.