PHPackages                             steveedson/bitbar-php - 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. steveedson/bitbar-php

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

steveedson/bitbar-php
=====================

PHP Formatter for BitBar plugins

0.4.4(8y ago)673095[1 issues](https://github.com/SteveEdson/bitbar-php/issues)MITPHPPHP &gt;=5.3.0

Since Jan 22Pushed 7y ago3 watchersCompare

[ Source](https://github.com/SteveEdson/bitbar-php)[ Packagist](https://packagist.org/packages/steveedson/bitbar-php)[ RSS](/packages/steveedson-bitbar-php/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (5)DependenciesVersions (18)Used By (0)

BitBar PHP Formatter
====================

[](#bitbar-php-formatter)

[![Latest Stable Version](https://camo.githubusercontent.com/b5e2e2a962507e4bc66bcb455d587229c2443465b96ff2ebd578c013e384845f/68747470733a2f2f706f7365722e707567782e6f72672f73746576656564736f6e2f6269746261722d7068702f762f737461626c65)](https://packagist.org/packages/steveedson/bitbar-php) [![Total Downloads](https://camo.githubusercontent.com/dc42a35f66b64979d36d4974a4d3b78aa553a6102fc36473b5a9582ac67f240a/68747470733a2f2f706f7365722e707567782e6f72672f73746576656564736f6e2f6269746261722d7068702f646f776e6c6f616473)](https://packagist.org/packages/steveedson/bitbar-php) [![Latest Unstable Version](https://camo.githubusercontent.com/70c65dcd7bdbcaa6e23554f8434b562749a77207ab185f9893f904895b1591e6/68747470733a2f2f706f7365722e707567782e6f72672f73746576656564736f6e2f6269746261722d7068702f762f756e737461626c65)](https://packagist.org/packages/steveedson/bitbar-php) [![License](https://camo.githubusercontent.com/5e9eee12b62ee670a0f3579f83584a6f6b79b39e762e84b68b740d63fb53932c/68747470733a2f2f706f7365722e707567782e6f72672f73746576656564736f6e2f6269746261722d7068702f6c6963656e7365)](https://packagist.org/packages/steveedson/bitbar-php)[![FOSSA Status](https://camo.githubusercontent.com/c498d0ff0e5ab8c8b1ffe6448acbe243b427619e1fa45e0d150d8898bf8f782a/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d25324653746576654564736f6e2532466269746261722d7068702e7376673f747970653d736869656c64)](https://app.fossa.io/projects/git%2Bgithub.com%2FSteveEdson%2Fbitbar-php?ref=badge_shield)

Installing
----------

[](#installing)

Currently, BitBar reads any file in your directory a plugin, and tries to execute it. To workaround this, create a hidden folder, beginning with a dot, for example `.bitbar/`. In this directory create or edit your `composer.json` to include the library:

```
{
  "require": {
    "steveedson/bitbar-php": "dev-master"
  }
}
```

or run `$ composer require "steveedson/bitbar-php"`

### File Structure

[](#file-structure)

You file structure inside your plugins directory, should look something like:

```
.
├── .bitbar/
│   ├── composer.json
│   └── vendor/
└── test.5m.php

```

Usage
-----

[](#usage)

In your BitBar plugins directory, create a file, e.g. `test.5m.php`. Don't forget to add the shebang at the beginning.

```
#!/usr/bin/php
