Register Arbory commands
182550
private function registerCommands()
    {
        $commands = [
            'arbory.seed' => SeedCommand::class,
            'arbory.install' => InstallCommand::class,
            'arbory.generator' => GeneratorCommand::class,
            'arbory.generate' => GenerateCommand::class
        ];

        foreach( $commands as $containerKey => $commandClass )
        {
            $this->registerCommand( $containerKey, $commandClass );
        }
    }
1177414
private function registerResources()
    {
        $configFilename = __DIR__ . '/../../config/arbory.php';

        $this->mergeConfigFrom( $configFilename, 'arbory' );

        $this->publishes( [
            $configFilename => config_path( 'arbory.php' )
        ], 'config' );

        $this->publishes( [
            __DIR__ . '/../../stubs/settings.stub' => config_path( 'settings.php' )
        ], 'config' );

        $this->publishes( [
            __DIR__ . '/../../stubs/admin_routes.stub' => base_path( '/routes/admin.php' )
        ], 'config' );

        $this->publishes([
            __DIR__ . '/../../resources/lang/' => base_path('resources/lang/vendor/arbory')
        ], 'lang');

        $this->loadMigrationsFrom( __DIR__ . '/../../database/migrations' );
        $this->loadViewsFrom( __DIR__ . '/../../resources/views', 'arbory' );
    }
766367
protected function registerCommands(): void
    {
        // Register artisan commands
        foreach ($this->commands as $key => $value) {
            $this->app->singleton($value, $key);
        }

        $this->commands(array_values($this->commands));
    }
165922
protected function registerSelfUpdateCommand()
    {
        $this->getContainer()->add(SelfUpdateCommand::class)
            ->withArguments([
                \Symfony\Component\Filesystem\Filesystem::class,
                \Symfony\Component\Finder\Finder::class,
            ]);
    }
170236
protected function registerCommands()
    {
        if ($this->app->runningInConsole()) {
            $this->commands([
                Console\InstallCommand::class,
                Console\AssetsCommand::class,
                Console\HorizonCommand::class,
                Console\ListCommand::class,
                Console\PurgeCommand::class,
                Console\PauseCommand::class,
                Console\ContinueCommand::class,
                Console\StatusCommand::class,
                Console\SupervisorCommand::class,
                Console\SupervisorsCommand::class,
                Console\TerminateCommand::class,
                Console\TimeoutCommand::class,
                Console\WorkCommand::class,
            ]);
        }

        $this->commands([Console\SnapshotCommand::class]);
    }
861032
protected function registerCommands()
    {
        $this->commands([
            CheckForUpdate::class,
        ]);

        // Register custom commands from config
        collect(config('self-update.artisan_commands.pre_update'))->each(function ($command) {
            $this->commands([$command['class']]);
        });
        collect(config('self-update.artisan_commands.post_update'))->each(function ($command) {
            $this->commands([$command['class']]);
        });
    }
752453
def def_cmd(name=None, short=None, fn=None, usage=None, help=None):
    
    command = Command(name=name, short=short, fn=fn, usage=usage, help=help)
    Command.register(command)
220401
protected function registerCustomCommands()
    {
        // Keep the core default commands to have the HelpCommand
        // which is used when using the --help option
        $defaultCommands = parent::getDefaultCommands();

        // Automatically register commands by scanning namespaces for a 'DroidPlugin' class.
        //print_r($this->autoLoader);
        $prefixes = $this->autoLoader->getPrefixesPsr4();

        foreach ($prefixes as $namespace => $paths) {
            $className = $namespace . 'DroidPlugin';
            if (class_exists($className)) {
                $plugin = new $className($this);
                $commands = $plugin->getCommands();
                foreach ($commands as $command) {
                    $this->add($command);
                }
            }
        }

        foreach ($this->all() as $command) {
            if (method_exists($command, 'setInventory')) {
                $command->setInventory($this->inventory);
            }
        }

        if ($this->hasProject()) {
            $runner = new TaskRunner(
                $this,
                $this->transformer,
                new LoggerFactory,
                new ExpressionLanguage,
                $this->buildLegacyTransformer()
            );
            $enabler = $this->configureHostEnabler();
            if (! $enabler) {
                # TODO output a warning about not being able to run remote cmds
            } else {
                $runner->setEnabler($enabler);
            }
            foreach ($this->getProject()->getTargets() as $target) {
                $command = new BaseTargetCommand;
                $command->setName($target->getName());
                $command->setDescription("Run target: " . $target->getName());
                $command->setTarget($target->getName());
                $command->setTaskRunner($runner);
                foreach ($target->getArguments() as $argument) {

                    $required = InputArgument::OPTIONAL;
                    if ($argument->getRequired()) {
                        $required = InputArgument::REQUIRED;
                    }

                    $command->addArgument(
                        $argument->getName(),
                        $required,
                        $argument->getDescription()
                    );
                }
                $this->add($command);
            }
        }
    }
1237228
private function registerCommands()
    {
        $this->commands([
            Console\Commands\SeedCountries::class,
            Console\Commands\SeedCurrencies::class,
            Console\Commands\SeedTimezones::class,
            Console\Commands\SeedTaxRates::class,
        ]);
    }
625996
public void registerCommands(final List<Class<Command>> commands) {
        setScope(ConfigScope.ClasspathScan.getType());
        for (Class<Command> cmd : commands) {
            register(ConfigItem.Command, cmd);
        }
        closeScope();
    }
556338
function _registerCommands(basedir, globalObject) {
    var commandsDir = path.resolve(basedir, "commands");

    var files;
    try {
        files = Utils.getAllFilePathsUnderDirectory(commandsDir);
        LOG.info("Found the following potential command files: {}", files);
    }
    catch (e) {
        LOG.error("Unable to register commands from the base directory '{}'. Error: {}", commandsDir, e);
        return;
    }

    var commands = [];
    for (var i = 0; i < files.length; i++) {
        var filePath = files[i];
        if (filePath.lastIndexOf(".js") !== filePath.length - 3) {
            LOG.info("File {} doesn't appear to be a JS module. Ignoring.", filePath);
            continue;
        }

        var module = require(filePath);

        if (!module.triggers || !module.handler) {
            LOG.warn("Found a module at {} but it doesn't appear to be a command handler. Ignoring.", filePath);
            continue;
        }

        if (typeof module.init === "function") {
            module.init(globalObject);
        }

        commands.push(module);
        LOG.info("Registered command from file {}", filePath);
    }

    return commands;
}
724318
public function registerCommands() : void {
		// Register a command for basset
		$this->app->singleton('command.basset', function($app) {
			return new BuildCommand($app['basset'], $app['basset.builder'], $app['basset.builder.cleaner']);
		});

		$this->commands('command.basset');
	}
26278
private function registerCLICommands()
    {
        $console = $this->app->make('console');
        $console->add(new TransifexTranslationsCommand());
        $console->add(new TransifexGlossaryCommand());
        $console->add(new ProcessGitRepositoriesCommand());
        $console->add(new AcceptPendingJoinRequestsCommand());
        $console->add(new SendNotificationsCommand());
        $console->add(new RemoveLoggedIPAddressesCommand());
        $console->add(new NotifyPackageVersionsCommand());
        $console->add(new ProcessRemotePackagesCommand());
    }
843591
protected function registerTinkerCommand(): void
    {
        $this->app->singleton('orchestra.commands.tenanti.tinker', function (Application $app) {
            return new TinkerCommand($app->make('orchestra.tenanti'));
        });
    }
334091
protected function registerCommands()
    {
        $this->app->bind('command.log-reader.delete', 'Jackiedo\LogReader\Console\Commands\LogReaderDeleteCommand');
        $this->app->bind('command.log-reader.detail', 'Jackiedo\LogReader\Console\Commands\LogReaderDetailCommand');
        $this->app->bind('command.log-reader.file-list', 'Jackiedo\LogReader\Console\Commands\LogReaderFileListCommand');
        $this->app->bind('command.log-reader.get', 'Jackiedo\LogReader\Console\Commands\LogReaderGetCommand');
        $this->app->bind('command.log-reader.remove-file', 'Jackiedo\LogReader\Console\Commands\LogReaderRemoveFileCommand');

        $this->commands('command.log-reader.delete');
        $this->commands('command.log-reader.detail');
        $this->commands('command.log-reader.file-list');
        $this->commands('command.log-reader.get');
        $this->commands('command.log-reader.remove-file');
    }
135925
def register_command(self, name, command):
        
        if name in self.commands:
            raise RuntimeError('%s is already defined' % name)
        self.commands[name] = command
1275974
protected function registerCommands()
    {
        if ($this->app->runningInConsole()) {
            $this->commands([
                ModulesCommand::class,
                ModelsCommand::class,
                EnumsCommand::class,
                RequestsCommand::class,
                MakeModuleCommand::class,
                VersionCommand::class
            ]);
        }
    }