PHPackages                             timoschinkel/codeowners-cli - 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. timoschinkel/codeowners-cli

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

timoschinkel/codeowners-cli
===========================

A cli interface for the codeowners library

1.7.0(2mo ago)75.4k↓46.3%1[1 issues](https://github.com/timoschinkel/codeowners-cli/issues)Apache-2.0PHPPHP ^8.2

Since Jan 5Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/timoschinkel/codeowners-cli)[ Packagist](https://packagist.org/packages/timoschinkel/codeowners-cli)[ RSS](/packages/timoschinkel-codeowners-cli/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (17)Used By (0)

Code owners CLI
===============

[](#code-owners-cli)

Code owners CLI is a CLI interface to simplify common operations on Code owners files using [`timoschinkel/codeowners`](https://packagist.org/packages/timoschinkel/codeowners).

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

[](#installation)

Use [Composer](https://www.getcomposer.org) for installation:

```
composer require timoschinkel/codeowners-cli
```

If you don't want Code owners CLI to be part of your project to can opt to install it globally:

```
composer global require timoschinkel/codeowners-cli
```

Usage
-----

[](#usage)

When installed as dependency of your project:

```
./vendor/bin/codeowners [options]
```

When installed globally:

```
codeowners [options]
```

**NB** When installed globally you will need to install Composer itself globally add the global Composer binary folder to your `PATH` variable, eg by adding the following line to `~/.bash_profile` or `~/.bashrc`:

```
export PATH=~/.composer/vendor/bin:$PATH
```

All commands have the options supplied by Symfony Console:

- `-q`, `--quiet`; Do no output any message
- `-v|vv|vvv`, `--verbose`; Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

When no CODEOWNERS file is specified - using `-c` or `--codeowners` - the application will search the CODEOWNERS file in the following locations based on the working directory:

- `/.github/CODEOWNERS`
- `/.bitbucket/CODEOWNERS`
- `/.gitlab/CODEOWNERS`
- `/CODEOWNERS`
- `/docs/CODEOWNERS`

Calling the command with the verbose option will print what file is used when applicable.

### Available commands

[](#available-commands)

#### `owner`

[](#owner)

Shows the owner of the path(s) passed as parameter.

```
Usage:
  owner [options] [--] ...

Arguments:
  paths                        Paths to files or directories to show code owner, separate with spaces

Options:
  -c, --codeowners=CODEOWNERS  Location of code owners file, defaults to /CODEOWNERS
  -o, --owner-only             Suppress normal output, only output the owner when applicable
```

For example:

```
codeowners owner ./src
```

#### `list-files`

[](#list-files)

Shows all files for an owner:

```
Usage:
  list-files [options] [--]  ...

Arguments:
  owner                        Codeowner for which the files should be listed
  paths                        Paths to files or directories to show code owner, separate with spaces

Options:
  -c, --codeowners=CODEOWNERS  Location of code owners file, defaults to /CODEOWNERS
```

For example:

```
codeowners list-files @team ./src
```

The output of this command can be used to feed into other tools using `xargs`:

```
codeowners list-files @team ./src | xargs
```

#### `list-unowned-files`

[](#list-unowned-files)

Shows all files that don't have an owner specified:

```
Usage:
  list-unowned-files [options] [--] ...

Arguments:
  paths                        Paths to files or directories to show code owner, separate with spaces

Options:
  -c, --codeowners=CODEOWNERS  Location of code owners file, defaults to /CODEOWNERS
      --strict                 Return a non-zero exit code when there are unowned files
```

For example:

```
codeowners list-unowned-files ./src
```

#### `list-owners`

[](#list-owners)

Shows all available owners inside the found CODEOWNERS file.

```
Usage:
  list-owners [options]

Options:
  -c, --codeowners=CODEOWNERS  Location of code owners file, defaults to /CODEOWNERS
```

For example:

```
codeowners list-owners
```

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance85

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity78

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

Recently: every ~103 days

Total

14

Last Release

60d ago

Major Versions

0.0.2 → 1.0.02020-01-08

PHP version history (5 changes)1.0.0PHP ^7.2

1.2.0PHP ^7.3 || ^8.0

1.4.0PHP ^8.0, &lt;8.3

1.4.1PHP ^8.1

1.6.1PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![timoschinkel](https://avatars.githubusercontent.com/u/31616857?v=4)](https://github.com/timoschinkel "timoschinkel (75 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/timoschinkel-codeowners-cli/health.svg)

```
[![Health](https://phpackages.com/badges/timoschinkel-codeowners-cli/health.svg)](https://phpackages.com/packages/timoschinkel-codeowners-cli)
```

###  Alternatives

[humbug/php-scoper

Prefixes all PHP namespaces in a file or directory.

7963.0M35](/packages/humbug-php-scoper)[povils/phpmnd

A tool to detect Magic numbers in codebase

5795.6M193](/packages/povils-phpmnd)[phpcr/phpcr-shell

Shell for PHPCR

721.3M8](/packages/phpcr-phpcr-shell)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[shel/neos-terminal

Neos CMS Ui terminal for running Eel expressions and other commands

1441.3k](/packages/shel-neos-terminal)[dpi/dogit

191.1k](/packages/dpi-dogit)

PHPackages © 2026

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