https://github.com/clevertech/browse
Command line utility to open links found in package.json
https://github.com/clevertech/browse
Last synced: over 1 year ago
JSON representation
Command line utility to open links found in package.json
- Host: GitHub
- URL: https://github.com/clevertech/browse
- Owner: clevertech
- Created: 2017-11-22T16:51:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-22T17:51:58.000Z (over 8 years ago)
- Last Synced: 2025-01-16T18:27:12.897Z (over 1 year ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Browse
Command line utility to open links found in package.json
## Usage
Put in your `package.json` file a bunch of links with any tree strcuture you prefer. The leaves must be URLs.
```json
{
"browse": {
"website": "https://example.com/",
"sentry": "https://sentry.example.com/example/project-name/",
"development": {
"server": {
"api": "https://api-dev.example.com/",
"frontend": "https://dev-dev.example.com/"
},
"sumologic": {
"api": "https://www.sumologic.com/whatever",
"cms": "https://www.sumologic.com/whatever",
"frontend": "https://www.sumologic.com/whatever"
}
}
}
}
```
Now you have a few options:
### Using npx
Just run this in the directory where your `package.json` file is:
```
npx github:clevertech/browse [path]
```
### Installing locally
Install by using either:
```
npm install @clevertech.biz/browse -D
yarn install @clevertech.biz/browse -D
```
Add a local script in your `package.json`:
```json
{
"scripts": {
"browse": "browse"
}
}
```
Then run:
```
npm/yarn run browse [path]
```
### Installing globally
```
npm/yarn install @clevertech.biz/browse -g
```
Then just run
```
browse [path]
```
## Autocomplete
`browse` works in two different ways. If you don't provide any command line argument it will print all available links and an autocomplete interface.
If you provide the path, it will open the link right away.