# parse-app-info

> Parse information about a Node application process and its environment. Made for Cabin.

Latest version **6.0.0** (published 2024-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install parse-app-info
pnpm add parse-app-info
yarn add parse-app-info
bun add parse-app-info
```

## Health

**Score 40/100 (D)** — status: stable.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2024-11-26 |
| First published | 2018-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14 |
| Dependencies | 5 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Philipp Kursawe |
| Maintainers | niftylettuce, pke, titanism |
| Keywords | app, appinfo, commit, git, lass, last-commit |

## Links

- npm: https://www.npmjs.com/package/parse-app-info
- Repository: https://github.com/cabinjs/parse-app-info
- Issues: https://github.com/cabinjs/parse-app-info/issues
- npm.io page: https://npm.io/package/parse-app-info

## Dependencies (5)

- [ip](https://npm.io/package/ip.md) ^2.0.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [semver](https://npm.io/package/semver.md) ^7.5.0
- [read-pkg-up](https://npm.io/package/read-pkg-up.md) 7
- [last-commit-log](https://npm.io/package/last-commit-log.md) ^3.4.0

## Recent versions

- 6.0.0 (latest) — 2024-11-26
- 5.0.0 — 2023-05-02
- 4.0.3 — 2022-02-17
- 4.0.2 — 2020-11-25
- 4.0.1 — 2020-11-23
- 4.0.0 — 2020-11-22
- 3.0.3 — 2020-06-16
- 3.0.2 — 2020-06-16
- 3.0.1 — 2020-06-15
- 3.0.0 — 2020-06-15
- 2.0.5 — 2019-12-01
- 2.0.4 — 2019-06-26
- 2.0.3 — 2019-05-02
- 2.0.2 — 2019-04-29
- 2.0.1 — 2019-04-26
- … 5 more at https://npm.io/package/parse-app-info/versions

## README

# parse-app-info

[![build status](https://github.com/cabinjs/parse-app-info/actions/workflows/ci.yml/badge.svg)](https://github.com/cabinjs/parse-app-info/actions/workflows/ci.yml)
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![made with lass](https://img.shields.io/badge/made_with-lass-95CC28.svg)](https://lass.js.org)
[![license](https://img.shields.io/github/license/cabinjs/parse-app-info.svg)](LICENSE)

> Parse information about a [Node][] application process and its environment. Made for [Cabin][].


## Table of Contents

* [Install](#install)
* [Usage](#usage)
* [Available info](#available-info)
* [Contributors](#contributors)
* [License](#license)


## Install

[npm][]:

```sh
npm install parse-app-info
```


## Usage

```js
const parseAppInfo = require('parse-app-info');

const appInfo = parseAppInfo();
```


## Available info

| Property    | Description                                                                              |
| ----------- | ---------------------------------------------------------------------------------------- |
| environment | The value of `process.env.NODE_ENV` or defaults to "development"                         |
| hostname    | Hostame of the computer (uses `process.env.HOSTNAME` or defaults to `os.hostname()`)     |
| ip          | IP address of the computer (uses `process.env.IP_ADDRESS` or defaults to `ip.address()`) |
| name        | Name of the app from `package.json`                                                      |
| node        | Version of Node.js running the app                                                       |
| pid         | Process ID from `process.pid`                                                            |
| version     | Version of the app `package.json`                                                        |
| cluster     | Cluster info of the app                                                                  |
| os          | OS info of the app                                                                       |

Additional properties when the app is in a git repository

| Property | Description                                                        |
| -------- | ------------------------------------------------------------------ |
| hash     | git hash of latest commit if the app                               |
| tag      | the latest git tag. Property is not available when there is no tag |


## Contributors

| Name                | Website                    |
| ------------------- | -------------------------- |
| **Nick Baugh**      | <https://niftylettuce.com> |
| **Philipp Kursawe** | <https://pke.github.io>    |


## License

[MIT](LICENSE) © [Philipp Kursawe](https://pke.github.io)


##

[npm]: https://www.npmjs.com/

[cabin]: https://cabinjs.com

[node]: https://nodejs.org

---
_Source: https://npm.io/package/parse-app-info · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
