---
name: "hub-gist"
section: "1"
platform: "linux"
package: "hub"
version: "2.14.2-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/hub-gist"
---

# hub-gist(1)

Create and print GitHub Gists

## NAME

hub-gist - Create and print GitHub Gists

## SYNOPSIS

`hub gist` create \[-oc\] \[--public\] \[*FILES*...\]\
 `hub gist` show *ID* \[*FILENAME*\]

## COMMANDS

*create*

Create a new gist. If no *FILES* are specified, the content is read from standard input.

*show*

Print the contents of a gist. If the gist contains multiple files, the operation will error out unless *FILENAME* is specified.

## OPTIONS

- \--public

  Make the new gist public (default: false).

- \-o, --browse

  Open the new gist in a web browser.

- \-c, --copy

  Put the URL of the new gist to clipboard instead of printing it.

## EXAMPLES

```
$ echo hello | hub gist create --public
$ hub gist create file1.txt file2.txt
# print a specific file within a gist:
$ hub gist show ID testfile1.txt
```

## SEE ALSO

[hub(1)](/hub/1.md), [hub-api(1)](/hub-api/1.md)
