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
- Host: GitHub
- URL: https://github.com/sindresorhus/package-directory-cli
- Owner: sindresorhus
- License: mit
- Created: 2015-09-01T08:08:23.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2023-11-04T08:46:46.000Z (about 2 years ago)
- Last Synced: 2024-04-14T11:09:15.444Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 23
- Watchers: 7
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-cli-apps - pkg-dir-cli - Find the root directory of a npm package. (Development / Npm)
- fucking-awesome-cli-apps - pkg-dir-cli - Find the root directory of a npm package. (Development / Npm)
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