PHPackages                             krislux/anano-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. krislux/anano-console

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

krislux/anano-console
=====================

Command interface, designed for Anano2 but works fine stand-alone.

v1.0.5(8y ago)174MITPHPPHP &gt;=5.6.0

Since Jun 9Pushed 8y ago1 watchersCompare

[ Source](https://github.com/krislux/anano-console)[ Packagist](https://packagist.org/packages/krislux/anano-console)[ RSS](/packages/krislux-anano-console/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (3)Used By (0)

Anano-Console - stand-alone CLI interface / task runner.
========================================================

[](#anano-console---stand-alone-cli-interface--task-runner)

What
----

[](#what)

This is mainly a simple framework, intended to make it easier to create and manage your own CLI tasks in any project.

The main feature is automatic documentation using reflection, making it easy to create, use and manage helper functions, as well as recall how to use them in the future, and share them with other developers.

Usage
-----

[](#usage)

After following the installation instructions below, simply open a terminal in your project root and run:

`php run`

Because of the automatic documentation, most of the use will be self-explanatory.
You can run any command with `php run filename:methodname` and get help on use by suffixing --help to any command, with or without method, e.g. `php run command --help` or `php run command:make --help`.

To get started making your own command files, run `php run command:make example`, which will create an ExampleCommand.php in the first listed directory in the configuration, containing a lot of helpful comments and example methods. Or if you know what you are doing, pass --clean to get a barebones command file, ready for you to fill out.

### Parameters

[](#parameters)

Anano-Console approximates a standard GNU/Bash parameter syntax. There are four types of parameters:

- The command. This must always be the first argument, and will usually consist of a file and method separated by a colon.
- Positional arguments. These have no prefix and are mapped to function parameters in PHP. These must be in a specific order.
- Long options. These are prefixed with `--` and can have a value designated with `=` - e.g. `--arg=value`. Position is irrelevant.
- Short options. Generally aliases of long options, prefixed with `-`, limited to one character and can't have a value. Position is irrelevant.

Short options can be grouped, i.e. `-a -b -c` is the same as `-abc`.
All options can come before, after or inbetween positional arguments - all that matters there is the order.

### Coding

[](#coding)

A command file has access to some helpful methods to access arguments, etc.

- `$this->hasOption('a', 'aaaa')` - (bool) Check if either short argument *a* or long argument *aaaa* is set. Number and order of arguments irrelevant.
- `$this->getOption('aaaa')` (mixed) Get value from long argument *aaaa*, or true if set with no value.
- `$this->readLine()` (mixed) Ask for user input and return it. Can also be used to pause execution.
- `$this->writeLine('string')` (void) Write 'string' to output. Very similar to a simple echo, but enforces *one* line break after.
- `$this->confirm('string')` (bool) Just a shorthand for a write and read, returns true if user agrees.

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

[](#installation)

#### For Anano:

[](#for-anano)

Navigate to the root of your [Anano 2](https://github.com/krislux/anano-2) or above installation, then run

```
composer require krislux/anano-console
```

Or *require-dev* if you do not want it on your production server.

#### Stand-alone:

[](#stand-alone)

Follow the procedure above, but after installation is complete, you must manually copy /vendor/krislux/anano-console/bin/run to your project root and set any necessary permissions.

I haven't been able to figure a way to do this automatically, as Composer doesn't run post-install scripts from libraries.

After this, you may want to open the `run` file in any text editor and have a look at the configuration part near the top.

License
-------

[](#license)

[MIT license](http://opensource.org/licenses/MIT).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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 ~6 days

Total

2

Last Release

3255d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3534e53876c61c780148840516817d50d7bd806b3697e188f869cc6138c6e7c8?d=identicon)[krislux](/maintainers/krislux)

---

Tags

anano-consolecliconsole-frameworkphptask-runnertuicliconsolecommand-linetask-runneranano

### Embed Badge

![Health badge](/badges/krislux-anano-console/health.svg)

```
[![Health](https://phpackages.com/badges/krislux-anano-console/health.svg)](https://phpackages.com/packages/krislux-anano-console)
```

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B11.3k](/packages/symfony-console)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2582.1M11](/packages/nunomaduro-laravel-console-task)[splitbrain/php-cli

Easy command line scripts for PHP with opt parsing and color output. No dependencies

177817.2k28](/packages/splitbrain-php-cli)[nunomaduro/laravel-console-summary

A Beautiful Laravel Console Summary for your Laravel/Laravel Zero commands.

662.0M3](/packages/nunomaduro-laravel-console-summary)

PHPackages © 2026

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