public function getOptionParser() {
        $requireProject = [
            'arguments' => [
                'project' => ['help' => 'Project name (folder)', 'required' => true]
            ]
        ];

        return parent::getOptionParser()
            ->addSubCommand('all', [
                'help' => 'Same as "start" + "create" + "unseal" + "mounts"'
            ])
            ->addSubCommand('start', [
                'help' => 'Start vault'
            ])
            ->addSubCommand('stop', [
                'help' => 'Stop vault'
            ])
            ->addSubCommand('restart', [
                'help' => 'Stop vault'
            ])
            ->addSubCommand('reset', [
                'help' => 'Wipe Vault and all its configuration'
            ])
            ->addSubCommand('status', [
                'help' => 'Get the status of the Vault instance'
            ])
            ->addSubCommand('create', [
                'help' => 'Initialize Vault and store the secrets safely'
            ])
            ->addSubCommand('env', [
                'help' => join(PHP_EOL, [
                    'Export the ENV variables for using the vault CLI tool directly.',
                    'Please run: eval $(sudo bownty-cli vault env)'
                ])
            ])
            ->addSubCommand('mounts', [
                'help' => 'Create the mounts required for global operation'
            ])
            ->addSubCommand('seal', [
                'help' => 'Seal the Vault'
            ])
            ->addSubCommand('unseal', [
                'help' => 'Unseal the Vault'
            ])
            ->addSubCommand('sync_vault_key', [
                'help' => 'Sync the Vault key into Consul (used by consul-template)'
            ])
            ->addSubCommand('wait_for', [
                'help' => 'Wait for something'
            ]);
    }
public function getOptionParser() {
        $requireProject = [
            'arguments' => [
                'project' => ['help' => 'Project name (folder)', 'required' => true]
            ]
        ];

        return parent::getOptionParser()
            ->addSubCommand('all', [
                'help' => 'Same as "start" + "create" + "unseal" + "mounts"'
            ])
            ->addSubCommand('start', [
                'help' => 'Start vault'
            ])
            ->addSubCommand('stop', [
                'help' => 'Stop vault'
            ])
            ->addSubCommand('restart', [
                'help' => 'Stop vault'
            ])
            ->addSubCommand('reset', [
                'help' => 'Wipe Vault and all its configuration'
            ])
            ->addSubCommand('status', [
                'help' => 'Get the status of the Vault instance'
            ])
            ->addSubCommand('create', [
                'help' => 'Initialize Vault and store the secrets safely'
            ])
            ->addSubCommand('env', [
                'help' => join(PHP_EOL, [
                    'Export the ENV variables for using the vault CLI tool directly.',
                    'Please run: eval $(sudo bownty-cli vault env)'
                ])
            ])
            ->addSubCommand('mounts', [
                'help' => 'Create the mounts required for global operation'
            ])
            ->addSubCommand('seal', [
                'help' => 'Seal the Vault'
            ])
            ->addSubCommand('unseal', [
                'help' => 'Unseal the Vault'
            ])
            ->addSubCommand('sync_vault_key', [
                'help' => 'Sync the Vault key into Consul (used by consul-template)'
            ])
            ->addSubCommand('wait_for', [
                'help' => 'Wait for something'
            ]);
    }
public function getOptionParser ( ) { $ requireProject = [ 'arguments' => [ 'project' => [ 'help' => 'Project name (folder)' , 'required' => true ] ] ] ; return parent :: getOptionParser ( ) -> addSubCommand ( 'all' , [ 'help' => 'Same as "start" + "create" + "unseal" + "mounts"' ] ) -> addSubCommand ( 'start' , [ 'help' => 'Start vault' ] ) -> addSubCommand ( 'stop' , [ 'help' => 'Stop vault' ] ) -> addSubCommand ( 'restart' , [ 'help' => 'Stop vault' ] ) -> addSubCommand ( 'reset' , [ 'help' => 'Wipe Vault and all its configuration' ] ) -> addSubCommand ( 'status' , [ 'help' => 'Get the status of the Vault instance' ] ) -> addSubCommand ( 'create' , [ 'help' => 'Initialize Vault and store the secrets safely' ] ) -> addSubCommand ( 'env' , [ 'help' => join ( PHP_EOL , [ 'Export the ENV variables for using the vault CLI tool directly.' , 'Please run: eval $(sudo bownty-cli vault env)' ] ) ] ) -> addSubCommand ( 'mounts' , [ 'help' => 'Create the mounts required for global operation' ] ) -> addSubCommand ( 'seal' , [ 'help' => 'Seal the Vault' ] ) -> addSubCommand ( 'unseal' , [ 'help' => 'Unseal the Vault' ] ) -> addSubCommand ( 'sync_vault_key' , [ 'help' => 'Sync the Vault key into Consul (used by consul-template)' ] ) -> addSubCommand ( 'wait_for' , [ 'help' => 'Wait for something' ] ) ; }
Nice CLI validation and help output

@return mixed
Nice CLI validation and help output