https://github.com/coolstone-tech/ghr
Run a file from a GitHub repository in your command line
https://github.com/coolstone-tech/ghr
cli github nodejs
Last synced: 4 months ago
JSON representation
Run a file from a GitHub repository in your command line
- Host: GitHub
- URL: https://github.com/coolstone-tech/ghr
- Owner: coolstone-tech
- License: mit
- Created: 2024-07-16T21:01:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-17T17:28:18.000Z (almost 2 years ago)
- Last Synced: 2025-04-26T10:51:34.947Z (about 1 year ago)
- Topics: cli, github, nodejs
- Language: JavaScript
- Homepage: https://npmjs.com/package/node-ghr
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ghr - GitHub Runner
Run a file from a GitHub repository in your command line
### Installation
```bash
sudo npm install -g node-ghr
```
### Usage
```bash
ghr /
```
Where `user` is the GitHub username, `repo` is the repository name, `branch` is the branch name, `files` is the file or files to download (separated by commas), and `tempPath` is the path to download the files to.
## Default Values
- `user` and `repo` are **required**
- `branch` defaults to `master`
- `files` defaults to `index.js`
- `tempPath` defaults to `~/.ghr`
### Example
```bash
ghr systemsoftware/dirtable
```
```bash
ghr systemsoftware/dirtable master "index.js, other_file.js"
```
```bash
ghr systemsoftware/dirtable master index.js ~/temp
```
```bash
ghr systemsoftware/dirtable master index.js --c --k
```
## Remove ~/.ghr
`~/.ghr` is a directory that stores the files downloaded by ghr. To remove it, run:
```bash
ghr --clean
```
> Note: ghr will automatically attempt to remove the directory after running the repository, unless the `--keep` flag is used.
## Optional Flags
Flags can be used in any order, but must be placed after all other arguments
- `--c` or `--clear` to clear the console before running the file
- `--skip-deps` or `--sd` to skip installing dependencies
- `--keep` or `--k` to keep the directory after running the repository