---
title: '`glab snippet`'
stage: AI Coding
group: Code Review
info: To determine the technical writer assigned to the Stage/Group associated with this page, see <https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments>
---

<!--
This documentation is auto generated by a script.
Please do not edit this file directly. Run `make gen-docs` instead.
-->

Create, view and manage snippets.

## Synopsis

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`.

## Examples

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

## Options

```plaintext
  -R, --repo string   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

```plaintext
  -h, --help   Show help for this command.
```

## Subcommands

- [`create`](create.md)
