webman/console
webman/console adds an Artisan-style command-line toolkit to Webman, with command registration, input/output helpers, and ready-made commands for common tasks. It helps you scaffold and manage Webman applications from the terminal with a familiar, Laravel-like developer experience.
composer require webman/console, then run php webman (Windows) or ./webman from the project root. The plugin exports a webman bootstrap file into the project root; that file is your entry point for every command.config/plugin/webman/console/app.php, and note that custom commands are registered in the app-level config/command.php. Those are the two config files you will touch most.php webman make:controller User, php webman make:model User, php webman make:middleware Auth, then php webman route:list to confirm the routes registered the way you expect. This is the fastest way to learn the package's conventions because the generated stubs show you the expected namespaces and directory layout.php webman list and php webman help <command> for signatures and options, then vendor/webman/console/src/Command/ to read the actual generator source. The source is small and is the authoritative reference for what each make:* command writes.make:controller, make:model, make:middleware, make:command, make:bootstrap, and make:exception as the starting point for new files, then immediately edit the stub. Treat generated code as a skeleton, not production code.app/command/ReportCommand.php extending Symfony\Component\Console\Command\Command, implement configure() and execute(), and add the class to config/command.php. Keep execute() thin: parse input, call a service class, write output. That way the same logic is callable from a controller or a queued job.php webman plugin:create vendor/name scaffolds under plugin/vendor/name. Develop there, run php webman plugin:export vendor/name to sync into vendor/, test, and use plugin:install / plugin:uninstall against a clean project to validate the install experience your users will get.Timer for in-process scheduling, but keep anything you might want to run manually as a console command.Table, ProgressBar, QuestionHelper, and -v/-vv/-vvv verbosity rather than hand-rolling output formatting.Command::SUCCESS / Command::FAILURE and let the shell exit code drive your pipeline. Add a --dry-run option to any command that mutates data so it can be exercised safely in CI.webman file. The root webman executable is exported by the plugin installer, not reliably created by Composer in every setup. If php webman fails with "could not open input file," reinstall the plugin or copy the file from the package. On Windows always invoke php webman; the shebang/executable bit is irrelevant there.list. Registration in config/command.php is the source of truth. Adding a class to app/command alone may not register it depending on version. Re-run php webman list after any config change; if config is cached, clear it.make:*. Generated namespaces assume app\ maps to app/ in composer.json. If a new class is "not found," run composer dump-autoload before debugging anything else.plugin:uninstall removes files and plugin config; plugin:export overwrites files under vendor/. Commit or back up config/plugin/... before running either.Gateway, request context, or warm in-memory caches exist. Bootstrap your own DB/Redis connections inside execute().execute() throws on newer Symfony versions. Write normal output to stdout and errors to ConsoleOutputInterface::getErrorOutput() so shell pipelines and log scrapers behave.php webman <command> -vvv for verbosity. If a command dies silently, check runtime/logs — the console bootstraps the framework, so framework-level exceptions land there rather than in your terminal.vendor/webman/console. Instead register your own command class; if you need to replace a built-in, register a class with the same name and confirm precedence with php webman list.How can I help you explore Laravel packages today?