.Dd 2024-May-25 .Dt GCLI-SNIPPETS 1 .Os gcli 2.3.0 .Sh NAME .Nm gcli snippets .Nd manage Gitlab snippets .Sh SYNOPSIS .Nm .Op Fl l .Op Fl s .Op Fl n Ar n .Nm .Cm delete .Ar snippet-id .Nm .Cm get .Ar snippet-id .Sh DESCRIPTION Use .Nm to list, create, download or delete GitLab snippets. Without a subcommand specified, .Nm will list all of your own snippets. .Sh OPTIONS .Bl -tag -width indent .It Fl l , -long Print a long list instead of a short table. .It Fl s , -sorted Reverse the output such that most recent items appear at the bottom. .It Fl n , -count Ar n Fetch at least .Ar n snippets. Setting .Ar n to -1 will fetch all snippets. Default: 30. Note that on users with many snippets fetching all snippets can take a considerable amount of time and may result in rate limiting by the GitLab API. .El .Sh SUBCOMMANDS .Bl -tag -width indent .It Cm delete Delete a snippet. .It Cm get Fetch the raw contents of the snippet. .El .Sh EXAMPLES List all of your snippets: .Bd -literal -offset indent $ gcli -t gitlab snippets .Ed .Pp Delete snippet with id 69420: .Bd -literal -offset indent $ gcli -t gitlab snippets delete 69420 .Ed .Pp Print snippet with id 69420 into your pager: .Bd -literal -offset indent $ gcli -t gitlab snippets get 69420 | $PAGER .Ed .Sh SEE ALSO .Xr git 1 , .Xr gcli 1 .Sh AUTHORS .An Nico Sonack aka. herrhotzenplotz Aq Mt nsonack@herrhotzenplotz.de and contributors. .Sh BUGS .Bl -dash .It This subcommand only works on Gitlab. It is not implemented for GitHub, as GitHub Gists work differently. .It Creating snippets is currently unimplemented. .It There is no .Fl y flag to ask the user whether he is sure about deleting a snippet. .El .Pp Please report bugs via E-Mail to .Mt ~herrhotzenplotz/gcli-discuss@lists.sr.ht . .Pp Alternatively you can report them on any of the forges linked at .Lk https://herrhotzenplotz.de/gcli . However, the preferred and quickest method is to use the mailing list.