Skip to content

Commit 1d34a42

Browse files
committed
Split commands and output for easy copying
1 parent ccada2b commit 1d34a42

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ USAGE:
7272
gh-token [global options] command [command options] [arguments...]
7373
7474
VERSION:
75-
2.0.0
75+
2.0.2
7676
7777
COMMANDS:
7878
generate Generate a new GitHub App installation token
@@ -90,11 +90,13 @@ GLOBAL OPTIONS:
9090
#### Run `gh token` as a `gh` CLI extension
9191

9292
```shell
93-
$ gh token generate \
93+
gh token generate \
9494
--key ./.keys/private-key.pem \
9595
--app-id 1122334 \
9696
--installation-id 5566778
97+
```
9798

99+
```json
98100
{
99101
"token": "ghs_8Joht_______________bLCMS___M0EPOhJ",
100102
"expires_at": "2023-09-08T18:11:34Z",
@@ -111,11 +113,13 @@ $ gh token generate \
111113
#### Run `gh token` and pass the key as a base64 encoded string
112114

113115
```shell
114-
$ gh token generate \
116+
gh token generate \
115117
--base64-key $(printf "%s" $APP_KEY | base64) \
116118
--app-id 1122334 \
117119
--installation-id 5566778
120+
```
118121

122+
```json
119123
{
120124
"token": "ghs_8Joht_______________bLCMS___M0EPOhJ",
121125
"expires_at": "2023-09-08T18:11:34Z",
@@ -132,12 +136,14 @@ $ gh token generate \
132136
#### Run `gh token` with GitHub Enterprise Server
133137

134138
```shell
135-
$ gh token generate \
139+
gh token generate \
136140
--base64-key $(printf "%s" $APP_KEY | base64) \
137141
--app-id 1122334 \
138142
--installation-id 5566778 \
139143
--hostname "github.example.com"
144+
```
140145

146+
```json
141147
{
142148
"token": "ghs_8Joht_______________bLCMS___M0EPOhJ",
143149
"expires_at": "2023-09-08T18:11:34Z",
@@ -154,7 +160,7 @@ $ gh token generate \
154160
#### Fetch list of installations for an app
155161

156162
```shell
157-
$ gh token installations \
163+
gh token installations \
158164
--key ./private-key.pem \
159165
--app-id 2233445
160166
```
@@ -222,14 +228,15 @@ $ gh token installations \
222228
#### Revoke an installation access token
223229

224230
```shell
225-
$ gh token revoke \
231+
gh token revoke \
226232
--token "v1.bb1___168d_____________1202bb8753b133919" \
227233
--hostname "github.example.com"
234+
```
228235

236+
```text
229237
Successfully revoked installation token
230238
```
231239

232-
233240
### Example in a workflow
234241

235242
<details>

0 commit comments

Comments
 (0)