https://github.com/matsubara0507/ghoauth
CLI Tool to generate GitHub token by GitHub Apps
https://github.com/matsubara0507/ghoauth
github-apps haskell-application
Last synced: about 1 year ago
JSON representation
CLI Tool to generate GitHub token by GitHub Apps
- Host: GitHub
- URL: https://github.com/matsubara0507/ghoauth
- Owner: matsubara0507
- License: mit
- Created: 2021-06-12T08:05:44.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-22T10:38:44.000Z (almost 5 years ago)
- Last Synced: 2025-02-02T18:47:03.439Z (over 1 year ago)
- Topics: github-apps, haskell-application
- Language: Haskell
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ghoauth
[](https://github.com/matsubara0507/ghoauth/actions/workflows/build.yaml)
CLI Tool to generate GitHub token by GitHub Apps
## Usage
```
$ ghoauth --help
ghoauth [options]
-h --help Show this help text
--version Show version
-v --verbose Enable verbose mode: verbosity level "debug"
--client_id=TEXT GitHub Apps client ID instead of CLIENT_ID environment variable
--env-file=PATH .env file path to write access token
--env-var=TEXT Environment variable name for access token
--clip Set user_code to clipboard
```
1. [Create GitHub Apps](https://github.com/settings/apps/new)
- Enable "Expire user authorization tokens"
- Enable "Only on this account"
2. Create `.env` file (default `~/.env`)
3. Run command with (1) client_id
```
ghoauth --client_id=CLIENT_ID --clip
```
## Build
```
stack build
```
### Docker
```
stack --docker --local-bin-path=./bin install
docker build -t matsubara0507/ghoauth . --build-arg local_bin_path=./bin
```