PHPackages                             vaneves/apirus - 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. vaneves/apirus

ActiveProject[API Development](/categories/api)

vaneves/apirus
==============

v1.0.3(5y ago)9804[3 issues](https://github.com/vaneves/apirus/issues)[1 PRs](https://github.com/vaneves/apirus/pulls)MITPHP

Since May 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/vaneves/apirus)[ Packagist](https://packagist.org/packages/vaneves/apirus)[ RSS](/packages/vaneves-apirus/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (6)Versions (10)Used By (0)

Apirus - Doc Generator
======================

[](#apirus---doc-generator)

[![Apirus](https://user-images.githubusercontent.com/146581/82272220-50305680-9950-11ea-92d5-38cbe914d98f.png)](https://user-images.githubusercontent.com/146581/82272220-50305680-9950-11ea-92d5-38cbe914d98f.png)

PHP application to create beautiful rest API documentation using markdown. Inspired by [readme.com](https://readme.com/).

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

[](#installation)

To install, run the command:

```
composer create-project --prefer-dist vaneves/apirus

```

After downloading, go to the application directory and copy the `.env.example` file as `.env`.

```
cp .env.example .env

```

Building
--------

[](#building)

To compile the HTML output, just run the following command:

```
php apirus

```

### .env Configuration

[](#env-configuration)

You can configure settings to compile the API, to do so just edit the `.env` file and change the value of the variables.

```
API_URL=http://example.com/api

SOURCE=
DIST=
THEME=
HIGHTLIGHT=

```

VariableDescriptionDefaultAPI\_URLBase URL of requestsSOURCEPath the markdown files./docsDISTDestination folder./publicTHEMETheme name./themes/defaultHIGHTLIGHTHighlight styledarkThe `API_URL` variable is used to not repeat the complete URL of the request in all markdown files. You can use it `{{API_URL}}`, for example:

```
---
url: "`{{API_URL}}/api/items"
---

```request:cURL
curl --location --request GET '`{{API_URL}}/api/items' \
--header 'Content-Type: application/json'
```

```

### Optional Arguments

[](#optional-arguments)

You can enter arguments for changing the build. The accepted arguments are:

ArgumentShortDescriptionDefaulthelpPrints a usage statementwatchWatching files changessrcsPath the markdown files`SOURCE`distdDestination folder`DIST`themetTheme name`THEME`highlighthHighlight style`HIGHTLIGHT`Example:

```
php apirus --src my-docs --theme mytheme -h monokai

```

**If an argument is defined when compiling, it will overwrite the values defined in `.env`.**

### Watching Files

[](#watching-files)

In development environment you can use the `--watch` argument so that Apirus can see the directory where the markdown files are, as soon as there is a change (create, change or delete), it will automatically rebuild. For example:

```
php apirus --watch

```

You can pass other arguments as usual, for example:

```
php apirus --src ../my-docs --theme ../mytheme --watch

```

Creating Documentation
----------------------

[](#creating-documentation)

By default, the directory where the markdown files are located is in `docs`. But you can change. Within that directory you must create other directories, where each one will correspond to an item in the menu, for example:

```
docs/
├── 00 - Getting started
|   ├── 00 - Description.md
|   └── 01 - Another section.md
└── 01 - Account
    ├── 00 - Auth.md
    ├── 01 - Register.md
    └── 02 - Recover password.md

```

The directory name will be used for the menu section title. But the numbering will be removed, as it is only used for ordering. For example `00 - Getting started` will generate the title` Getting started`.

In the directories you will create a file for each section. The file name is ignored if it has the `title` meta inside it. But if you don't have the `title` meta, the file name will be used in the menu. For example, `01 - Another section.md` will have the item in the` Another section` menu.

### Meta

[](#meta)

"Meta" are used to build a section of your documentation. It is optional to inform the meta, but if defined, it must be of the following structure:

```
---
title: Get example
method: GET
url: "http://example.com/api/items"
---
```

As I said, all are optional. If you leave the `title` blank, the file name without the format and initial numbering (used for sorting) will be used. If you leave the `method` or` url` blank, this information will not be rendered.

**The "meta" must be entered at the beginning of the file.**

### Requests

[](#requests)

You can define several examples of requests, in several languages. It is somewhat similar to the code block, but we use the word `request` and in front of it the name of the language. For example:

```
```request:cURL
curl --location --request GET 'http://example.com/api/items' \
--header 'Content-Type: application/json'
```

```

```
```request:Python
import requests
url = "http://example.com/api/items"
headers = {
  'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
```

```

Each language block will be a tab with an example request on the interface. You can place a request block anywhere in the file.

### Reponses

[](#reponses)

You can define examples of request responses. It is similar to a block of code, but this time you enter the HTTP code of the response. For example:

```
```response:200
[{
    "id": 1,
    "name": "example 1"
}, {
    "id": 2,
    "name": "example 2"
}, {
    "id": 3,
    "name": "example 3"
}]
```

```

```
```response:401
{
	"error": "Invalid token"
}
```

```

Each block will be a tab with a response example. You can place a response block anywhere in the file.

### Description

[](#description)

Any information other than the meta, requisition block or return block, will be part of the section description. You can use any markdown markup as per the [Parsedown](https://github.com/erusev/parsedown) library.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 95.2% 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 ~2 days

Total

4

Last Release

2181d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78dd10e51f9ab3b0d703a4f61c9bd1415deb74b6401a3468b221e9f5f73fc990?d=identicon)[vaneves](/maintainers/vaneves)

---

Top Contributors

[![vaneves](https://avatars.githubusercontent.com/u/146581?v=4)](https://github.com/vaneves "vaneves (40 commits)")[![ferleonardo](https://avatars.githubusercontent.com/u/3298334?v=4)](https://github.com/ferleonardo "ferleonardo (2 commits)")

---

Tags

documentation-generatorphp

### Embed Badge

![Health badge](/badges/vaneves-apirus/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)

PHPackages © 2026

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