# gh gist create

Share a snippet in seconds.

## Quick answer
```
gh gist create script.sh
```

## Syntax
```
gh gist create [<files>... | -] [flags]
```

## Examples

# Create a secret gist from a file
gh gist create notes.md

# Create a public gist with a description
gh gist create app.py --public --desc "example"

# Gist from piped output
cat error.log | gh gist create -

# Bundle several files into one gist
gh gist create main.go go.mod

# Create and open in the browser
gh gist create snippet.js --web

## Key flags

  -p, --public	Make the gist public (default is secret).
  -d, --desc	Description for the gist.
  -f, --filename	Set the filename when reading from stdin.
  -w, --web	Open the new gist in the browser.

Full guide: https://ghcli.com/gh-gist-create.php
