PHPackages                             ssitu/euclid - 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. ssitu/euclid

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

ssitu/euclid
============

A PHP tool to map your classes and methods, so you can execute them from the comfort of your command line interface.

v2.0.2(4y ago)13MITPHP

Since May 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/I-is-as-I-does/Euclid)[ Packagist](https://packagist.org/packages/ssitu/euclid)[ Docs](https://github.com/I-is-as-I-does/Euclid)[ RSS](/packages/ssitu-euclid/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (1)Versions (8)Used By (0)

Euclid
======

[](#euclid)

Simple PHP tool to map your classes and methods, so you can execute them from the comfort of your command line interface.

### Includes:

[](#includes)

- the core Euclid class that will handle your commands, offering a **direct** mode and a **guided** one;
- a Parser, mainly to decipher direct commands;
- something resembling a CRUD class to configure your **commands map**: set hooks to **filter** through methods; operate permanent or per-instance edits; save edits, possibly to another config file; etc -- the list of available commands will updated itself;
- a companion class that will handle input, output and formatting, and can be used **independently** of Euclid;
- a sample nano bin script, allowing you to **edit CLI arguments** *before* passing them to Euclid, if you do so wish.

Getting Started
---------------

[](#getting-started)

### Prerequisites

[](#prerequisites)

- Very basic knowledge of CLI ([CLI is awesome](https://www.w3schools.com/whatis/whatis_cli.asp) – like a lot of things made in the sixties)
- PHP 8.0.3 (probably works with earlier versions; but untested)
- Composer

### Install

[](#install)

```
$ composer require ssitu/euclid
```

Set up a `bin/euclid file`, and a `euclid-config.json` to suit your needs. Sample files are available in `samples/`.

### Setup

[](#setup)

- `bin/euclid` file:

```
#!/usr/bin/php
