PHPackages                             byjg/xmlnuke-cmdline - 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. byjg/xmlnuke-cmdline

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

byjg/xmlnuke-cmdline
====================

Run XMLNuke modules and classes in command line as batches and daemon/service

18PHP

Since May 14Pushed 10y ago1 watchersCompare

[ Source](https://github.com/byjg/xmlnuke-cmdline)[ Packagist](https://packagist.org/packages/byjg/xmlnuke-cmdline)[ RSS](/packages/byjg-xmlnuke-cmdline/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

XMLNuke Command Line Project
============================

[](#xmlnuke-command-line-project)

Enables run an existing XMLNuke module from the command line without to make changes in your module.

Install
-------

[](#install)

Project Level

```
composer require "byjg/xmlnuke-cmdline=dev-master"
```

Entire System

```
composer global require "byjg/xmlnuke-cmdline=dev-master"
```

Usage
-----

[](#usage)

The syntax is:

```
runxmlnuke.php SCRIPT PARAMETERS
```

for example:

```
runxmlnuke.php xmlnuke  module=Lesson1.Sample1 raw=json xpath=//mediaitem

```

The parameter SCRIPT can be:

- **xmlnuke** - Run a typical XMLNuke module with all parameters
- **ws** - Run a class that implements a SOAP interface. See more [here](/byjg/xmlnuke/wiki/Create-a-SOAP-Service).
- **daemon** - Create a Linux Daemon Service. More details below.

Running a SOAP Service
----------------------

[](#running-a-soap-service)

The SOAP service in command line only work invoking the web method through a GET request. The command line will be something like:

```
runxmlnuke.php ws  ws=/Lesson1.SOAP.SampleWebService svc=getEcho "text=Some Text"

```

Create Daemon/Services with XMLNuke
-----------------------------------

[](#create-daemonservices-with-xmlnuke)

A Service is a program that runs infinitely. You can create a service in XMLNuke by implementing a class with a method `execute()`. This method, does not need to create a Loop. XMLNuke will do a loop for you.

Example:

```
namespace Lesson1\Classes;

class Service
{
	protected $loop = 0;

	public function execute()
	{
		$this->loop++;
		echo $this->loop ."\n";

		return true;
	}

}
```

This method must return `true` to continue the service or `false` to stop it. To run this daemon:

```
sudo runxmlnuke.php daemon service=Lesson1.Classes.Service &

```

The service will run silently, but will create TWO log files:

- **/var/log/xmlnuke.daemon/Lesson1.Classes.Service.log** - All output from the service
- **/var/log/xmlnuke.daemon/Lesson1.Classes.Service.error.log** - All errors generated by the service.

### Create a init service

[](#create-a-init-service)

You can create a service in the Linux system just copying this file inside the folder `/etc/init`

Example: **sample.conf**

```
description "Sample Daemon"
author      "JG"

# used to be: start on startup
# until we found some mounts weren't ready yet while booting:
start on started mountall
stop on shutdown

# Automatically Respawn:
respawn
respawn limit 99 5

exec /opt/xmlnuke/utils/cmdline/runxmlnuke.sh daemon  service=Lesson1.Classes.Service

```

Now you can start or stop the service using:

```
service sample start

```

or

```
service sample stop

```

Putting all together
====================

[](#putting-all-together)

- **Service**:
- **Init Conf**:

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/981924?v=4)[Joao Gilberto Magalhaes](/maintainers/byjg)[@byjg](https://github.com/byjg)

---

Top Contributors

[![byjg](https://avatars.githubusercontent.com/u/981924?v=4)](https://github.com/byjg "byjg (5 commits)")

### Embed Badge

![Health badge](/badges/byjg-xmlnuke-cmdline/health.svg)

```
[![Health](https://phpackages.com/badges/byjg-xmlnuke-cmdline/health.svg)](https://phpackages.com/packages/byjg-xmlnuke-cmdline)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.1k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

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