.nh .TH "glab" "1" "May 2026" "Auto generated by spf13/cobra" "" .SH NAME glab-snippet-create - Create a new snippet. .SH SYNOPSIS \fBglab snippet create [flags] -t [\&...] glab snippet create [flags] -t -f # reads from stdin\fP .SH DESCRIPTION Create a new snippet. .SH OPTIONS \fB-d\fP, \fB--description\fP="" Description of the snippet. Set to "-" to open an editor. .PP \fB-f\fP, \fB--filename\fP="" Filename of the snippet in GitLab. .PP \fB-p\fP, \fB--personal\fP[=false] Create a personal snippet. .PP \fB-t\fP, \fB--title\fP="" (required) Title of the snippet. .PP \fB-v\fP, \fB--visibility\fP="private" Limit by visibility: 'public', 'internal', or 'private'. .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB-h\fP, \fB--help\fP[=false] Show help for this command. .PP \fB-R\fP, \fB--repo\fP="" Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted. .SH EXAMPLE .EX glab snippet create script.py --title "Title of the snippet" echo "package main" | glab snippet new --title "Title of the snippet" --filename "main.go" glab snippet create -t Title -f "different.go" -d Description main.go glab snippet create -t Title -f "different.go" -d Description --filename different.go main.go glab snippet create --personal --title "Personal snippet" script.py .EE .SH SEE ALSO \fBglab-snippet(1)\fP