PHPackages                             devture/symfony-web-command-bundle - 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. devture/symfony-web-command-bundle

ActiveSymfony-bundle[CLI &amp; Console](/categories/cli)

devture/symfony-web-command-bundle
==================================

Symfony bundle that allows console commands to be called from the web in a secure manner

1.1.0(3mo ago)7453↓100%BSD-3-ClausePHPPHP &gt;=8.0

Since Feb 16Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/devture/symfony-web-command-bundle)[ Packagist](https://packagist.org/packages/devture/symfony-web-command-bundle)[ RSS](/packages/devture-symfony-web-command-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (5)Used By (0)

Description
===========

[](#description)

A Symfony bundle that lets you execute your application's console commands from the web in a secure manner.

This is useful in environments where you can't run your console commands directly (from cron, etc.), but you can access the application from the web. It can let you convert cronjobs from something like this:

```
* * * * * user php /app/bin/console ticket:purge

```

to:

```
* * * * * user curl -sS -XPOST -H 'Authorization: Bearer SECRET' http://application/web-command/execute/ticket:purge

```

Installation
============

[](#installation)

Install through composer (`composer require devture/symfony-web-command-bundle:dev-master`).

Add to `config/bundles.php`:

```
Devture\Bundle\WebCommandBundle\DevtureWebCommandBundle::class => ['all' => true],
```

Configuration
-------------

[](#configuration)

Drop the following routing config in `config/packages/devture_web_command.yaml`

```
devture_web_command:
  auth_token: '%env(DEVTURE_WEB_COMMAND_AUTH_TOKEN)%'
  forced_uri: '%env(DEVTURE_WEB_COMMAND_FORCED_URI)%'
```

The environment variable `DEVTURE_WEB_COMMAND_AUTH_TOKEN` would contain your authentication secret. Make it a strong one (e.g. by using `pwgen -Bsv1 64`).

The environment variable `DEVTURE_WEB_COMMAND_FORCED_URI` contains the external URL to your application, so that "console commands" invoked locally (`curl http://localhost/web-command/...`) would still generate the correct full URLs. Example value: `https://example.com`. It can also be left blank (empty string) to avoid force-setting and rely on auto-detection.

Routing
-------

[](#routing)

Drop the following routing config in `config/routes/DevtureWebCommandBundle.yaml`:

```
DevtureWebCommandBundleWebsite:
    prefix: /web-command
    resource: "@DevtureWebCommandBundle/Resources/config/routes/website.yaml"
```

Security
--------

[](#security)

If using Symfony's Security component to [Secure URL patterns](https://symfony.com/doc/current/security.html#securing-url-patterns-access-control), you may wish to adjust the firewall to not block `/web-command` requests.

Modify: `config/packages/security.yaml`:

```
security:
  # Other stuff..

  access_control:
    # Other stuff..
    - { path: ^/web-command/, role: IS_AUTHENTICATED_ANONYMOUSLY }
    # Other stuff..
    - { path: ^/, role: ROLE_USER }
```

Usage
=====

[](#usage)

Execute commands from the web by making a `POST` request to the `/web-command/execute/:commandName` route.

You need to authenticate using the authentication token provided to the bundle (usually stored in the `DEVTURE_WEB_COMMAND_AUTH_TOKEN` environment variable).

The basic call would be something like this (using [cURL](https://curl.haxx.se/) for this example):

```
curl \
-sS \
-XPOST \
-H 'Authorization: Bearer SECRET' \
http://application/web-command/execute/commandName

```

You can `POST` a JSON payload to this URL endpoint to configure it. Example:

```
# outputVerbosity = 256 means "debug". See the `OutputInterface:VERBOSITY_` constants.

curl \
-sS \
-XPOST \
-H 'Authorization: Bearer SECRET' \
--data '{"input": {"days": 10, "--something": 4}, "outputVerbosity": 256}' \
http://application/web-command/execute/ticket:purge

```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance79

Regular maintenance activity

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~218 days

Total

4

Last Release

110d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9daf523f8e47ddeb8af23183c06721c4e89111eb4eb3f9ce264242b373e9dd80?d=identicon)[spantaleev](/maintainers/spantaleev)

---

Top Contributors

[![spantaleev](https://avatars.githubusercontent.com/u/388669?v=4)](https://github.com/spantaleev "spantaleev (20 commits)")

---

Tags

consolecronsymfony-bundlewebconsolesymfonybundlecroncommand

### Embed Badge

![Health badge](/badges/devture-symfony-web-command-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/devture-symfony-web-command-bundle/health.svg)](https://phpackages.com/packages/devture-symfony-web-command-bundle)
```

###  Alternatives

[jmose/command-scheduler-bundle

This Symfony bundle will allow you to schedule all your commands just like UNIX crontab

3301.4M1](/packages/jmose-command-scheduler-bundle)[shapecode/cron-bundle

This bundle provides scheduled execution of Symfony commands

57479.5k2](/packages/shapecode-cron-bundle)[zenstruck/console-extra

A modular set of features to reduce configuration boilerplate for your Symfony commands.

8052.7k1](/packages/zenstruck-console-extra)[nunomaduro/collision-adapter-symfony

Collision's adapter for Symfony applications. Error Reporting for console/command-line PHP applications.

4536.1k3](/packages/nunomaduro-collision-adapter-symfony)[padam87/cron-bundle

A cron job manager for symfony console.

1153.0k](/packages/padam87-cron-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
