An open API service indexing awesome lists of open source software.

https://github.com/sindresorhus/package-directory-cli

Find the root directory of a Node.js project or npm package
https://github.com/sindresorhus/package-directory-cli

Last synced: 18 days ago
JSON representation

Find the root directory of a Node.js project or npm package

Awesome Lists containing this project

README

          

# package-directory-cli

> Find the root directory of a Node.js project or npm package

## Install

```sh
npm install --global package-directory-cli
```

## Usage

```
$ package-directory --help

Usage
$ package-directory

Examples
$ echo $PWD
/Users/sindresorhus/foo/bar
$ package-directory
/Users/sindresorhus/foo
```

## Example

```
/
└── Users
└── sindresorhus
└── foo
├── package.json
└── bar
└── example.js
```

```
$ echo $PWD
/Users/sindresorhus/foo/bar
$ package-directory
/Users/sindresorhus/foo
```

## Related

- [package-directory](https://github.com/sindresorhus/package-directory) - API for this package
- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - Find a file by walking up parent directories