PHPackages                             deable/console - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. deable/console

ActiveLibrary[CLI &amp; Console](/categories/cli)

deable/console
==============

Simpliest way to use console on your nette project.

v1.0.1(10mo ago)0561MITPHPPHP &gt;= 7.3

Since Feb 10Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/deable/console)[ Packagist](https://packagist.org/packages/deable/console)[ RSS](/packages/deable-console/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

deable / console
================

[](#deable--console)

Simple symfony console implementation for nette framework with synchronized commands. Thanks to this library, you can simplify your workflow with the console commands and [Nette Framework](https://nette.org/).

Requirements
------------

[](#requirements)

This library was developed for PHP 7.3 or newer, designed for [Nette Framework](https://nette.org/) version 3.1 or newer.

Installation
------------

[](#installation)

The best way to install this library is using [Composer](https://getcomposer.org/):

```
$ composer require deable/console
```

Usage
-----

[](#usage)

Add extension to your application configuration:

```
extensions:
    console: Deable\Console\ConsoleExtension(%consoleMode%)

console:
    name: App Console
    url: https://my-project.lndo.site/
    locksDir: %tempDir%/console-locks

search:
    commands:
        in: %appDir%/Console
        files: *Command.php

```

To enable auto-detection of debug mode from console, use something like this in your `Bootstrap.php`:

```
ConsoleHelper::setupMode($configurator, function () use ($configurator) {
    $configurator->setDebugMode(self::COOKIE_SECRET . '@' . ($_SERVER['REMOTE_ADDR'] ?? php_uname('n')));
});
```

To run your console application, create file `bin/console.php` like this:

```
