You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
5
+
---
6
+
7
+
# Overview
8
+
9
+
This package consists of a set of packages that are responsible for executing a particular command/feature/operation.
10
+
The full list of features can be viewed [here](https://gitlab.com/gitlab-org/gitlab-shell/-/blob/main/doc/features.md).
11
+
The commands implement the common interface:
12
+
13
+
```go
14
+
typeCommandinterface {
15
+
Execute(ctx context.Context) error
16
+
}
17
+
```
18
+
19
+
A command is executed by running the `Execute` method. The execution logic mostly shares the common pattern:
20
+
21
+
- Parse the arguments and validate them.
22
+
- Communicate with GitLab Rails using [gitlabnet](https://gitlab.com/gitlab-org/gitlab-shell/-/tree/main/internal/gitlabnet) package. For example, it can be checking whether a client is authorized to execute this particular command or asking for a personal access token in order to return it to the client.
23
+
- If a command is related to Git operations, establish a connection with Gitaly using [handler](https://gitlab.com/gitlab-org/gitlab-shell/-/tree/main/internal/handler) and [gitaly](https://gitlab.com/gitlab-org/gitlab-shell/-/tree/main/internal/gitaly) packages and provide two-way communication between Gitaly and the client.
24
+
- Return results to the client.
25
+
26
+
[cmd/gitlab-shell/command](https://gitlab.com/gitlab-org/gitlab-shell/-/tree/main/cmd/gitlab-shell/command) is using this package to build a particular command based on the passed arguments.
0 commit comments