PHPackages                             inroutephp/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. [API Development](/categories/api)
4. /
5. inroutephp/console

ActiveProject[API Development](/categories/api)

inroutephp/console
==================

Inroute compilation tool for the command line.

1.1.0(6y ago)0261UnlicensePHPPHP &gt;=7.2

Since Dec 12Pushed 6y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (4)Versions (7)Used By (1)

[![Inroute](https://raw.githubusercontent.com/inroutephp/inroute/master/res/logo.png "Inroute")](https://raw.githubusercontent.com/inroutephp/inroute/master/res/logo.png)

inroutephp/console
==================

[](#inroutephpconsole)

[![Packagist Version](https://camo.githubusercontent.com/da6036ae3deccfc2b6ca6a3de42d36746a503b5a7eb7e497d94d2aaabf81dd99/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e726f7574657068702f636f6e736f6c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/inroutephp/console)[![Build Status](https://camo.githubusercontent.com/516c9acfe7e5ff6952bd2ee455e3def642b8df3a8e278e7e3bdd872c06301a45/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f696e726f7574657068702f636f6e736f6c652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/inroutephp/console)

Inroute compilation tool for the command line.

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

[](#installation)

The inroute console component should be installed as a development dependency. To execute a compiled router however the inroute runtime must be avaliable. That leaves us with a two step installation process:

```
composer require inroutephp/inroute
composer require --dev inroutephp/console
```

Build configuration
-------------------

[](#build-configuration)

By default the build configuration is read from a file named `inroute.json` in the current working directory. A simple configuration file can look like:

```
{
    "source-dir": "src/Controller",
    "source-prefix": "MyApp\\Controller",
    "target-filename": "src/HttpRouter.php",
    "target-namespace": "MyApp",
    "target-classname": "HttpRouter"
}
```

The following is a list of possible configuration values:

### autoload

[](#autoload)

Path to project autoloader. Defaults to `vendor/autoload.php`.

### container

[](#container)

The classname of a compile time container. Only needed if compile time objects have dependencies that needs to be injected.

### bootstrap

[](#bootstrap)

Classname of compile time bootstrap script. Should normally not be needed.

### source-dir

[](#source-dir)

Directory to scan for annotated routes. Relative to current working dir.

### source-prefix

[](#source-prefix)

psr-4 namespace prefix to use when scanning directory. Found `.php` files are assumed to contain classes with this namespace prefix.

### source-classes

[](#source-classes)

Array of source classnames, use instead of or togheter with directory scanning.

### ignore-annotations

[](#ignore-annotations)

Array of annotations to ignore during compilation.

### route-factory

[](#route-factory)

Classname of route factory, default should normally be fine.

### compiler

[](#compiler)

Classname of compiler, default should normally be fine.

### core-compiler-passes

[](#core-compiler-passes)

Array of core compiler passes, default should normally be fine.

### compiler-passes

[](#compiler-passes)

Array of custom compiler passes.

### code-generator

[](#code-generator)

The code generator to use, default should normally be fine.

### target-filename

[](#target-filename)

Path to router dump destination. If this file exists it will be overwritten.

### target-namespace

[](#target-namespace)

The namespace of the generated router (defaults to no namespace).

### target-classname

[](#target-classname)

The classname of the generated router (defaults to `HttpRouter`).

Usage
-----

[](#usage)

### Building

[](#building)

To build project router simply run

```
vendor/bin/inroute build
```

For mor information

```
vendor/bin/inroute build -h
```

### Debugging

[](#debugging)

To view debug information on the generated router run

```
vendor/bin/inroute debug
```

For more conprehensive output try

```
vendor/bin/inroute debug -v
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Recently: every ~94 days

Total

6

Last Release

2333d ago

PHP version history (2 changes)1.0.0-beta1PHP ^7.1

1.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0af6567c7f4f5518a422192675445464fdcf18acbc9459b3205da9fd446f8d0?d=identicon)[hanneskod](/maintainers/hanneskod)

---

Top Contributors

[![hanneskod](https://avatars.githubusercontent.com/u/1369274?v=4)](https://github.com/hanneskod "hanneskod (16 commits)")

---

Tags

middlewareopenapiannotationspsr-15web-router

### Embed Badge

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

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

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[darkaonline/swagger-lume

OpenApi or Swagger integration to Lumen

3372.3M3](/packages/darkaonline-swagger-lume)[tobion/openapi-symfony-routing

Loads routes in Symfony based on OpenAPI/Swagger annotations

4219.5k](/packages/tobion-openapi-symfony-routing)[hkarlstrom/openapi-validation-middleware

PSR-7 and PSR-15 OpenAPI Validation Middleware

95198.8k1](/packages/hkarlstrom-openapi-validation-middleware)[psx/api

Parse and generate API specification formats

37178.0k4](/packages/psx-api)[wapmorgan/openapi-generator

OpenApi configuration generator directly from PHP code (PhpDoc, functions signature and type hints) and projects (for yii2, slim, laravel). Can be used with a large monolithic backend to maintain big API documentation

202.8k](/packages/wapmorgan-openapi-generator)

PHPackages © 2026

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