glab(1)
π glab-snippet-create β bestie, let's make a snippet π
Okay so this is the glab(1) manual page for glab snippet create, and it's literally the group-chat explainer for creating a new snippet. The vibe: provide one or more file paths to upload, or pass --filename and pipe content from standard input. No cap, that's the core move. π«Ά
π NAME π
glab-snippet-create β create a new snippet. Short, sweet, iconic. π
β¨ SYNOPSIS β¨
glab snippet create -t [...] [flags]
π¦ DESCRIPTION π¦
Okay so here's the tea: provide one or more file paths to upload, or pass --filename and pipe content from standard input. That's the assignment. β¨
Snippets are created in the current project by default. Want it personal? Use --personal to create the snippet in your personal account instead. And use --visibility to control who can see it. Flexible, but make it intentional. π
π OPTIONS π
-d,--description=""β Description of the snippet. Set to"-"to open an editor. Editor jumpscare, but make it on purpose. π-f,--filename=""β Filename of the snippet in GitLab. So GitLab knows what to call it, bestie.-p,--personal[=false]β Create a personal snippet. The[=false]is right there; it does not start enabled by default. π«Ά-t,--title=""β (required) Title of the snippet. It's required, so don't skip it. Periodt. π-v,--visibility="private"β Limit by visibility:'public','internal', or'private'. Default is"private"; choose your visibility era wisely. π
πΈ OPTIONS INHERITED FROM PARENT COMMANDS πΈ
-h,--help[=false]β Show help for this command. The classic icon. π-R,--repo=""β Select another repository. You can use eitherOWNER/REPOorGROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted. Repo-targeting slay. π¦
π EXAMPLE π
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
π SEE ALSO π
glab-snippet(1)β go read the parent-page lore, iykyk. π
Auto generated by spf13/cobra Β· Nov 2026 Β· glab(1) β okay bye bestie, go make that snippet, mwah π
π
π¦ where this page comes from
- arch rolling: glab 1.128.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms