.nh
.TH "GH-GIST-CREATE" "1" "Oct 2023" "" "GitHub CLI manual"

.SH NAME
.PP
gh-gist-create - Create a new gist


.SH SYNOPSIS
.PP
\fB\fCgh gist create [<filename>... | -] [flags]\fR


.SH DESCRIPTION
.PP
Create a new GitHub gist with given contents.

.PP
Gists can be created from one or multiple files. Alternatively, pass "-" as
file name to read from standard input.

.PP
By default, gists are secret; use '--public' to make publicly listed ones.


.SH OPTIONS
.TP
\fB\fC-d\fR, \fB\fC--desc\fR \fB\fC<string>\fR
A description for this gist

.TP
\fB\fC-f\fR, \fB\fC--filename\fR \fB\fC<string>\fR
Provide a filename to be used when reading from standard input

.TP
\fB\fC-p\fR, \fB\fC--public\fR
List the gist publicly (default: secret)

.TP
\fB\fC-w\fR, \fB\fC--web\fR
Open the web browser with created gist


.SH EXAMPLE
.PP
.RS

.nf
# publish file 'hello.py' as a public gist
$ gh gist create --public hello.py

# create a gist with a description
$ gh gist create hello.py -d "my Hello-World program in Python"

# create a gist containing several files
$ gh gist create hello.py world.py cool.txt

# read from standard input to create a gist
$ gh gist create -

# create a gist from output piped from another command
$ cat cool.txt | gh gist create


.fi
.RE


.SH SEE ALSO
.PP
\fB\fCgh-gist(1)\fR
