PHPackages                             cebe/indent - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cebe/indent

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cebe/indent
===========

A small tool to convert text file indentation.

1.1.0(6y ago)17664.2k↑185.2%2[1 issues](https://github.com/cebe/indent/issues)20MITPHP

Since Apr 15Pushed 6y ago1 watchersCompare

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

READMEChangelog (4)DependenciesVersions (5)Used By (20)

indent
======

[](#indent)

A small tool to convert (or enforce) text file indentation. Tabs to spaces or spaces to tabs.

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

[](#installation)

Install via [composer](https://packagist.org/packages/cebe/indent) or just clone the repo.

### Global installation

[](#global-installation)

Install it globally using:

```
composer global require cebe/indent

```

Make sure your composer directory (`$HOME/.composer/vendor/bin`) is in your `PATH`.

Usage
-----

[](#usage)

```
indent [--tabs|--spaces] [-r [--pattern=...]] [files or directories...]

--tabs       convert all indentation to tabs. Assuming 4 spaces tab length.
--spaces     convert all indentation to spaces.

-r           recursively go over all directories given as argument and convert
             files that match --pattern.

--pattern    the pattern to match files for when using -r. Defaults to '*.php'.

--tabstop=N  define number of spaces N to replace a tab with. Defaults to 4.

--help       shows this usage information.

If no file is specified input will be read from STDIN.

```

Examples
--------

[](#examples)

Convert `myfile.php` to tabs:

```
indent --tabs myfile.php

```

Convert all `.php`-files and the `README.md` in current dir to spaces:

```
indent --spaces *.php README.md

```

Convert all `.php`-files in `dir` to tabs (recursively):

```
indent --tabs -r dir

```

Convert all `.md`-files in dir to spaces (recursively):

```
indent --spaces --pattern=*.md -r dir

```

Convert STDIN, which is the content of `myfile.php` to spaces and print the result to STDOUT:

```
cat myfile.php | ./indent --spaces

```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity66

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

Total

4

Last Release

2356d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/261a6249c6f605f3956a2fae40fbb813f6b2e1e6f2bf806180c851a965426e54?d=identicon)[cebe](/maintainers/cebe)

---

Top Contributors

[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (20 commits)")

---

Tags

code-stylehacktoberfestindentation

### Embed Badge

![Health badge](/badges/cebe-indent/health.svg)

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

###  Alternatives

[butschster/meta-tags

The most powerful and extendable tools for managing SEO Meta Tags in your Laravel project

628730.7k2](/packages/butschster-meta-tags)

PHPackages © 2026

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