diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-02 02:44:16 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-02 02:44:16 +0900 |
| commit | f8633e1647e42700ee20c8b77353ef992800dc76 (patch) | |
| tree | d594d42ec9bb165b2e49bd32366a47ac29a0370a /crates/shirabe/src/main.rs | |
| parent | 20dbcf11b86cb03c451ba1d5cd9efe17b68fa66d (diff) | |
| download | php-shirabe-feat/cli-parse.tar.gz php-shirabe-feat/cli-parse.tar.zst php-shirabe-feat/cli-parse.zip | |
feat(cli): parse the Composer CLI with bpaf combinatorsfeat/cli-parse
Add a cli module that reproduces every command's argument/option set
from the PHP configure() definitions using bpaf combinators (no derive).
Output is per-command typed structs plus a top-level Command enum; the
bridge into Symfony Console Input is deferred. Verbosity is unified into
the global option and bump-after-update models VALUE_OPTIONAL as a
three-state enum. Known limitation (bundled subcommand short flags) is
recorded as a TODO in the module.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/main.rs')
| -rw-r--r-- | crates/shirabe/src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/shirabe/src/main.rs b/crates/shirabe/src/main.rs index 0672e51..597c30a 100644 --- a/crates/shirabe/src/main.rs +++ b/crates/shirabe/src/main.rs @@ -1,3 +1,8 @@ +use shirabe::cli; + fn main() { - println!("Hello, World!"); + let parsed = cli::cli().run(); + // TODO(phase-b): bridge the parsed CLI into Symfony Console's Input and + // dispatch through Application::run. For now we only parse. + let _ = parsed; } |
