Register console commands
559863
protected function registerConsoleCommands()
    {
        $this->commands([
            InfoCommand::class,
            SchemaCreateCommand::class,
            SchemaUpdateCommand::class,
            SchemaDropCommand::class,
            SchemaValidateCommand::class,
            ClearMetadataCacheCommand::class,
            ClearResultCacheCommand::class,
            ClearQueryCacheCommand::class,
            EnsureProductionSettingsCommand::class,
            GenerateProxiesCommand::class
        ]);
    }
691086
public function registerCommands()
	{
		$this->app->singleton('command.cache.clear', function($app)
		{
			return new ClearCommand($app['cache']);
		});

		$this->app->singleton('command.cache.table', function($app)
		{
			return new CacheTableCommand($app['files'], $app['composer']);
		});

		$this->commands('command.cache.clear', 'command.cache.table');
	}
690620
def register(self, command):
        
        command = command()
        if command.name in self.commands:
            raise ConsoleError(
                "Command %s already registered!" % command.name
            )

        command.create_parser(self.subparsers)
        self.commands[command.name] = command
1244227
public function registerCommands(Console $console)
    {
        $commands = (array) $this->get('console.commands');

        foreach ($commands as $class) {
            if (class_exists($class) && is_subclass_of($class, Command::class)) {
                $console->addCommand($this->container->createObject($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']]);
        });
    }
495590
private function registerArtisanCommands() {
        $this->commands([
            \BackupManager\Laravel\Laravel4DbBackupCommand::class,
            \BackupManager\Laravel\Laravel4DbRestoreCommand::class,
            \BackupManager\Laravel\Laravel4DbListCommand::class
        ]);
    }
388661
def register_command(self, command):
		
		if(command.opcode() in self.commands_by_opcode):
			raise SetupError("Command with opcode {}(mnemonic: {}) already registered".format(command.opcode(), command.mnemonic()))
		command.membus = self.memory_bus
		command.devbus = self.device_bus
		command.register_interface = self.register_interface
		self.commands_by_opcode[command.opcode()] = command
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;
}
625996
public void registerCommands(final List<Class<Command>> commands) {
        setScope(ConfigScope.ClasspathScan.getType());
        for (Class<Command> cmd : commands) {
            register(ConfigItem.Command, cmd);
        }
        closeScope();
    }
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)
237569
public function registerCommands()
    {
        foreach ($this->commandsStack as $key => $command) {
            $this->resolveConsoleCommand('\\'.$command);
        }

        return $this;
    }
363930
private function registerCommands()
    {
        // monashee:backup
        $this->app['command.monashee.backup'] = $this->app->share(function() {
            return $this->app->make('Monashee\Backup\Commands\MonasheeBackup');
        });

        $this->commands('command.monashee.backup');
    }
337951
private void registerCommands() {
        commandManager.setWrongLevelMsg(languageManager.getString("command_disabled_setup_mode"));
        SubCommand money = new SubCommand("money", commandManager, null, 1);
        money.addCommand("", new MainCommand());
        money.addCommand("all", new AllCommand());
        money.addCommand("pay", new PayCommand());
        money.addCommand("give", new GiveCommand());
        money.addCommand("take", new TakeCommand());
        money.addCommand("set", new SetCommand());
        money.addCommand("delete", new DeleteCommand());
        money.addCommand("create", new CreateCommand());
        money.addCommand("balance", new BalanceCommand());
        money.addCommand("top", new TopCommand());
        money.addCommand("exchange", new ExchangeCommand());
        money.addCommand("infinite", new InfiniteCommand());
        money.addCommand("log", new LogCommand());
        commandManager.registerMainCommand("money", money);

        SubCommand bank = new SubCommand("bank", commandManager, null, 1);
        bank.addCommand("create", new BankCreateCommand());
        bank.addCommand("balance", new BankBalanceCommand());
        bank.addCommand("deposit", new BankDepositCommand());
        bank.addCommand("withdraw", new BankWithdrawCommand());
        bank.addCommand("set", new BankSetCommand());
        bank.addCommand("give", new BankGiveCommand());
        bank.addCommand("take", new BankTakeCommand());
        bank.addCommand("perm", new BankPermCommand());
        bank.addCommand("list", new BankListCommand());
        bank.addCommand("delete", new BankDeleteCommand());
        bank.addCommand("ignoreacl", new BankIgnoreACLCommand());
        commandManager.registerMainCommand("bank", bank);

        SubCommand ccsetup = new SubCommand("ccsetup", commandManager, null, 0);
        ccsetup.addCommand("", new NewSetupMainCommand());
        ccsetup.addCommand("database", new NewSetupDatabaseCommand());
        ccsetup.addCommand("currency", new NewSetupCurrencyCommand());
        ccsetup.addCommand("basic", new NewSetupBasicCommand());
        ccsetup.addCommand("convert", new NewSetupConvertCommand());
        commandManager.registerMainCommand("ccsetup", ccsetup);

        SubCommand currency = new SubCommand("currency", commandManager, null, 1);
        currency.addCommand("add", new CurrencyAddCommand());
        currency.addCommand("delete", new CurrencyDeleteCommand());
        currency.addCommand("edit", new CurrencyEditCommand());
        currency.addCommand("info", new CurrencyInfoCommand());
        currency.addCommand("default", new CurrencyDefaultCommand());
        currency.addCommand("exchange", new CurrencyExchangeCommand());
        currency.addCommand("rates", new CurrencyRatesCommand());
        currency.addCommand("list", new CurrencyListCommand());
        commandManager.registerMainCommand("currency", currency);

        SubCommand configCommand = new SubCommand("craftconomy", commandManager, null, 1);
        configCommand.addCommand("holdings", new ConfigHoldingsCommand());
        configCommand.addCommand("bankprice", new ConfigBankPriceCommand());
        configCommand.addCommand("format", new ConfigFormatCommand());
        configCommand.addCommand("clearlog", new ConfigClearLogCommand());
        configCommand.addCommand("reload", new ConfigReloadCommand());
        commandManager.registerMainCommand("craftconomy", configCommand);

        SubCommand ccgroup = new SubCommand("ccgroup", commandManager, null, 1);
        ccgroup.addCommand("create", new GroupCreateCommand());
        ccgroup.addCommand("addworld", new GroupAddWorldCommand());
        ccgroup.addCommand("delworld", new GroupDelWorldCommand());
        commandManager.registerMainCommand("ccgroup", ccgroup);

        SubCommand payCommand = new SubCommand("pay", commandManager, null, 1);
        payCommand.addCommand("", new PayCommand());
        commandManager.registerMainCommand("pay", payCommand);
    }
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');
	}
824478
public function register()
    {
        $this->commands([
                ConsoleMakeCommand::class,
                ControllerMakeCommand::class,
                EnvironmentCommand::class,
                EventMakeCommand::class,
                JobMakeCommand::class,
                KeyGenerateCommand::class,
                ListenerMakeCommand::class,
                MailMakeCommand::class,
                MiddlewareMakeCommand::class,
                ModelMakeCommand::class,
                NotificationMakeCommand::class,
                ProviderMakeCommand::class,
                ResourceMakeCommand::class,
                TestMakeCommand::class,
            ]);
    }
1360039
protected function registerCommands(): void
    {
        $this->app->singleton('command.couchbase.indexes', function ($app) {
            return new IndexFinderCommand($app['Illuminate\Database\DatabaseManager']);
        });
        $this->app->singleton('command.couchbase.primary.index.create', function ($app) {
            return new PrimaryIndexCreatorCommand($app['Illuminate\Database\DatabaseManager']);
        });
        $this->app->singleton('command.couchbase.primary.index.drop', function ($app) {
            return new PrimaryIndexRemoverCommand($app['Illuminate\Database\DatabaseManager']);
        });
        $this->app->singleton('command.couchbase.index.create', function ($app) {
            return new IndexCreatorCommand($app['Illuminate\Database\DatabaseManager']);
        });
        $this->app->singleton('command.couchbase.index.drop', function ($app) {
            return new IndexRemoverCommand($app['Illuminate\Database\DatabaseManager']);
        });
        $this->app->singleton('command.couchbase.queue.index.create', function ($app) {
            return new QueueCreatorCommand($app['Illuminate\Database\DatabaseManager']);
        });
        $this->app->singleton('command.couchbase.design.document.create', function ($app) {
            return new DesignCreatorCommand(
                $app['Illuminate\Database\DatabaseManager'],
                $app['config']->get('couchbase.design')
            );
        });
        $this->commands([
            'command.couchbase.indexes',
            'command.couchbase.primary.index.create',
            'command.couchbase.primary.index.drop',
            'command.couchbase.index.create',
            'command.couchbase.index.drop',
            'command.couchbase.queue.index.create',
            'command.couchbase.design.document.create',
        ]);
    }
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));
    }