GCLI-SNIPPETS(1)

πŸ“¦
version 2.13.0 Β· 5 versions
, in nixpkgs unstable, ubuntu stonking

πŸ’– GCLI-SNIPPETS πŸ’–

okay bestie, welcome to the gcli manual, section 1 for General Commands β€” this one's all about the snippets subcommand and it's gonna be so good, I promise 🫢


✨ NAME ✨

gcli snippets β€” the way you manage your GitLab snippets πŸ’…


🌸 SYNOPSIS 🌸

gcli snippets [-l] [-s] [-n n]
gcli snippets delete snippet-id
gcli snippets get snippet-id

πŸ¦‹ DESCRIPTION πŸ¦‹

So like. gcli snippets is your girl for listing, creating, downloading or deleting GitLab snippets. all four!!

And if you don't give it a subcommand? No stress. gcli snippets on its own just lists all of your own snippets. main character energy, honestly πŸ‘‘


πŸ’œ OPTIONS πŸ’œ

  • -l, --long β€” print a long list instead of a short table. basically the "tell me everything" button ✨
  • -s, --sorted β€” reverses the output, so the most recent items land at the bottom instead of the top. yes it's reversed, no I will not be explaining why, that's just the vibe πŸ™ˆ
  • -n, --count n β€” fetch at least n snippets. and if you set n to -1? bestie it fetches ALL of them. the default is 30.
⚠️ real talk: on users with many snippets, fetching all of them can take a considerable amount of time and may get you rate limited by the GitLab API. so like, hydrate, be patient, don't spam it 😭

πŸŽ€ SUBCOMMANDS πŸŽ€

  • delete β€” delete a snippet. gone. poof. πŸ’€
  • get β€” fetch the raw contents of the snippet. just the raw goods, no packaging πŸ“

⭐ EXAMPLES ⭐

List all of your snippets:

$ gcli -t gitlab snippets

Delete snippet with id 69420:

$ gcli -t gitlab snippets delete 69420

Print snippet with id 69420 into your pager:

$ gcli -t gitlab snippets get 69420 | $PAGER

🌈 SEE ALSO 🌈

git(1), gcli(1)

iykyk πŸ’…


πŸ‘‘ AUTHORS πŸ‘‘

Nico Sonack aka. herrhotzenplotz <nsonack@herrhotzenplotz.de> and contributors. iconic behavior, truly 🫢


πŸ’€ BUGS πŸ’€

  • This subcommand only works on GitLab. It is not implemented for GitHub, as GitHub Gists work differently. different site, different rules, sorry babe 😭
  • Creating snippets is currently unimplemented. yeah. it says "create" up in the description but it is not. living its truth I guess πŸ™ˆ
  • There is no -y flag to ask the user whether he is sure about deleting a snippet. so like, no safety net. be careful with that delete, fr fr πŸ’€

Please report bugs via E-Mail to https://lists.sr.ht/~herrhotzenplotz/gcli-discuss.

Alternatively you can report them on any of the forges linked at https://sr.ht/~herrhotzenplotz/gcli. However, the preferred and quickest method is to use the mailing list ✨


and that's the whole page bestie!! this was gcli 2.13.0, dated 05-Aug-2026 β€” note down the version, love you, bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from