You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
addArgument(string $name, int $mode, string $desc, $default)
See InputArgument modes
Add positional argument
addOption(string $name, string $shortcut, int $mode, string $desc, $default)
See InputOption modes
Add named option
setHidden(bool $hidden)
true to hide
Hide from occ list
InputInterface Methods (used in execute())
Method
Return
Description
getArgument(string $name)
mixed
Get argument value
getOption(string $name)
mixed
Get option value
hasArgument(string $name)
bool
Check if argument is defined
hasOption(string $name)
bool
Check if option is defined
isInteractive()
bool
Whether input is interactive
OutputInterface Methods (used in execute())
Method
Parameters
Description
writeln(string $message)
Message with optional formatting tags
Write line to stdout
write(string $message)
Message without trailing newline
Write without newline
setVerbosity(int $level)
OutputInterface::VERBOSITY_*
Set output verbosity
isVerbose()
--
Check if -v flag is set
isVeryVerbose()
--
Check if -vv flag is set
isDebug()
--
Check if -vvv flag is set
Exit Codes
Constant
Value
Meaning
Command::SUCCESS
0
Command completed successfully
Command::FAILURE
1
Command failed
Command::INVALID
2
Invalid input (wrong arguments/options)
ALWAYS return Command::SUCCESS, Command::FAILURE, or Command::INVALID from execute() -- never return arbitrary integers or forget the return statement.
Built-in Commands Reference
maintenance: Commands
Command
Options
Description
maintenance:mode
--on, --off
Toggle maintenance mode
maintenance:repair
--include-expensive
Run repair steps
maintenance:update:htaccess
--
Update .htaccess file
maintenance:mimetype:update-db
--repair-filecache
Update mimetype list
maintenance:mimetype:update-js
--
Update mimetype JS file
user: Commands
Command
Options
Description
user:add
--display-name, --group, --password-from-env
Create user
user:delete
--
Delete user
user:disable
--
Disable user
user:enable
--
Enable user
user:info
--output=json
Show user info
user:list
--limit, --offset, --output=json
List users
user:report
--
Show user count summary
user:resetpassword
--password-from-env
Reset user password
user:setting
--value, --delete
Get/set user settings
app: Commands
Command
Options
Description
app:enable
--force, --groups
Enable app
app:disable
--
Disable app
app:list
--output=json
List installed apps
app:update
--all
Update app(s)
app:install
--
Install app from app store
app:remove
--
Remove app
app:getpath
--
Show app install path
app:check-code
--
Check app code compliance
config: Commands
Command
Options
Description
config:system:set
--value, --type, --update-only
Set system config
config:system:get
--default-value
Get system config
config:system:delete
--
Delete system config key
config:app:set
--value, --type, --update-only
Set app config
config:app:get
--default-value
Get app config
config:app:delete
--
Delete app config key
config:list
--private
Export config as JSON
config:import
--
Import config from JSON
Type values for --type:string (default), boolean, integer, float.