glab-snippet(1)

glab-snippet1

Create snippets.

Usage

glab snippet [flags]

Overview

Snippets store and share small pieces of code or text. A snippet can belong to a project, or to your personal account when you pass --personal.

To view and edit existing snippets, use the GitLab UI or glab api with the Project snippets API ⟨https://docs.gitlab.com/api/project_snippets/⟩ or personal Snippets API ⟨https://docs.gitlab.com/api/snippets/⟩.

Options

-R, --repo=""
Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.

Options inherited from parent commands

-h, --help[=false]
Show help for this command.

Examples

glab snippet create --title "Title of the snippet" --filename "main.go"

Releases

2 releases since Debian 13 (Trixie); the text changed 1 time.

  1. 13
  2. Arch

From glab 1.126.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.